├── .github
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── Bug_Hunting_Colab.ipynb
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── ttmg.py
└── update.xml
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/Bug_Hunting_Colab.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Bug Hunting Colab",
7 | "provenance": [],
8 | "collapsed_sections": [
9 | "Cqy3vXXOMI06",
10 | "wZMZjX127rmx",
11 | "JXsqLabj3uhU",
12 | "i5K4z5KBuGEx",
13 | "kFQ2LUeT4TS4",
14 | "0xI8WiUPji3k",
15 | "HsvEZZy0hrp6",
16 | "fhxnTTEh50RN"
17 | ],
18 | "machine_shape": "hm"
19 | },
20 | "kernelspec": {
21 | "name": "python3",
22 | "display_name": "Python 3"
23 | },
24 | "accelerator": "GPU"
25 | },
26 | "cells": [
27 | {
28 | "cell_type": "markdown",
29 | "metadata": {
30 | "id": "IljQPB_Ydcn4"
31 | },
32 | "source": [
33 | "# ✧ Bug Bounty VPS - Made By [Hacking Guy](https://github.com/hackingguy)\n",
34 | "\n",
35 | "1. Click On JS Code Below To Make It Alive\n",
36 | "2. Then Execute Bug Bounty Hunting Cell And Wait For 10 Minutes \n",
37 | "3. You Can Enable Create VNC, if you want GUI Mode\n",
38 | "4. In Case Of Any Problem Execute Crash Colab And Restart!"
39 | ]
40 | },
41 | {
42 | "cell_type": "markdown",
43 | "metadata": {
44 | "id": "3Z8cK8h2Avbv"
45 | },
46 | "source": [
47 | "# Copy Below Javascript And Paste In Your Console **After Connecting** (Important)\n",
48 | "function ClickConnect(){\n",
49 | "console.log(\"Working\"); \n",
50 | "document.querySelector(\"colab-connect-button\").click() \n",
51 | "}setInterval(ClickConnect,6000)
\n",
52 | "\n",
53 | "### And don't Close This Tab"
54 | ]
55 | },
56 | {
57 | "cell_type": "markdown",
58 | "metadata": {
59 | "id": "wZMZjX127rmx"
60 | },
61 | "source": [
62 | "## ✧ Crash Colab to clear all RAM"
63 | ]
64 | },
65 | {
66 | "cell_type": "code",
67 | "metadata": {
68 | "id": "OH3xVkwWmPYL",
69 | "cellView": "form"
70 | },
71 | "source": [
72 | "#@title ← ឵឵ ឵Run this cell to crash your current Runtime if you're low on memory\n",
73 | "#@markdown After crashing, you'll have access to all the preoccupied storage\n",
74 | "some_str = ' ' * 5120000000000"
75 | ],
76 | "execution_count": null,
77 | "outputs": []
78 | },
79 | {
80 | "cell_type": "markdown",
81 | "metadata": {
82 | "id": "evvwMGR5KKXm"
83 | },
84 | "source": [
85 | "##[Bug Hunting Colab](https://github.com/hackingguy)\n"
86 | ]
87 | },
88 | {
89 | "cell_type": "code",
90 | "metadata": {
91 | "id": "2xhAQLgvKL11",
92 | "cellView": "form"
93 | },
94 | "source": [
95 | "#@markdown ⬅️ Click Here to Install Tools And Create SSH Tunnel
\n",
96 | "#@markdown
\n",
97 | "#@markdown Bug Hunting VPS
\n",
98 | "import os\n",
99 | "import random\n",
100 | "import string\n",
101 | "import requests\n",
102 | "import urllib.request\n",
103 | "from IPython.display import HTML, clear_output\n",
104 | "from urllib.parse import quote\n",
105 | "import time\n",
106 | " \n",
107 | "CREATE_VNC = True # @param {type:\"boolean\"}\n",
108 | "CREATE_SSH = True\n",
109 | "USE_TELERGAM_BOT = False # @param {type:\"boolean\"}\n",
110 | "TELEGRAM_API_TOKEN = \"\" # @param {type:\"string\"}\n",
111 | "TELEGRAM_CHAT_ID = \"\" # @param {type:\"string\"}\n",
112 | " \n",
113 | "HOME = os.path.expanduser(\"~\")\n",
114 | "runW = get_ipython()\n",
115 | "Version = '4.0.0'\n",
116 | "port='22'\n",
117 | " \n",
118 | "if not os.path.exists(f\"{HOME}/.ipython/ttmg.py\"):\n",
119 | " hCode = \"https://raw.githubusercontent.com/mapleHacks/Debug/main/ttmg.py\"\n",
120 | " urllib.request.urlretrieve(hCode, f\"{HOME}/.ipython/ttmg.py\")\n",
121 | " \n",
122 | "from ttmg import (\n",
123 | " runSh,\n",
124 | " loadingAn,\n",
125 | " displayUrl,\n",
126 | " findProcess,\n",
127 | " CWD,\n",
128 | " textAn,\n",
129 | " updateCheck,\n",
130 | " argoTunnel\n",
131 | ")\n",
132 | "\n",
133 | "'''\n",
134 | "if updateCheck(\"Checking updates ...\", Version): # VERSION CHECKING ...\n",
135 | " !kill -9 -1 &\n",
136 | "'''\n",
137 | "clear_output()\n",
138 | " \n",
139 | "def tgnotify(bot_message):\n",
140 | " send_text = 'https://api.telegram.org/bot' + TELEGRAM_API_TOKEN + '/sendMessage?chat_id=' + TELEGRAM_CHAT_ID + '&parse_mode=Markdown&text=' + quote(bot_message)\n",
141 | " res = requests.get(send_text)\n",
142 | " \n",
143 | " \n",
144 | "loadingAn()\n",
145 | " \n",
146 | "# password generate\n",
147 | "try:\n",
148 | " print(f\"Found old password! : {password}\")\n",
149 | "except:\n",
150 | " password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))\n",
151 | " \n",
152 | "runW.system_raw('sudo apt-get update && apt-get -y upgrade')\n",
153 | "#Set root password\n",
154 | "if os.path.exists('/var/run/sshd') == False:\n",
155 | " #Setup sshdsshd9\n",
156 | " runSh('apt install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen')\n",
157 | " runW.system_raw(\"echo root:$password | chpasswd\")\n",
158 | " os.makedirs(\"/var/run/sshd\", exist_ok=True)\n",
159 | " runW.system_raw('echo \"PermitRootLogin yes\" >> /etc/ssh/sshd_config')\n",
160 | " runW.system_raw('echo \"PasswordAuthentication yes\" >> /etc/ssh/sshd_config')\n",
161 | " runW.system_raw('echo \"ClientAliveInterval 0\" >> /etc/ssh/sshd_config')\n",
162 | " runW.system_raw('echo \"ClientAliveCountMax 3\" >> /etc/ssh/sshd_config')\n",
163 | " runW.system_raw('echo \"LD_LIBRARY_PATH=/usr/lib64-nvidia:/usr/local/nvidia/lib:/usr/local/nvidia/lib64\" >> /root/.bashrc')\n",
164 | " runW.system_raw('echo \"export LD_LIBRARY_PATH\" >> /root/.bashrc')\n",
165 | " \n",
166 | "#Run sshd\n",
167 | "if not findProcess(\"/usr/sbin/sshd\", command=\"-D\"):\n",
168 | " runSh('/usr/sbin/sshd -D &', shell=True)\n",
169 | " \n",
170 | "if CREATE_VNC:\n",
171 | " clear_output()\n",
172 | " textAn(\"Wait for almost 2 minutes.VNC is installing display manager...\")\n",
173 | " os.makedirs(f'{HOME}/.vnc', exist_ok=True)\n",
174 | " runW.system_raw('add-apt-repository -y ppa:apt-fast/stable < /dev/null')\n",
175 | " runW.system_raw('echo debconf apt-fast/maxdownloads string 16 | debconf-set-selections')\n",
176 | " runW.system_raw('echo debconf apt-fast/dlflag boolean true | debconf-set-selections')\n",
177 | " runW.system_raw('echo debconf apt-fast/aptmanager string apt-get | debconf-set-selections')\n",
178 | " runW.system_raw('apt install -y apt-fast dialog')\n",
179 | " runW.system_raw('apt-fast install -y sshpass xfce4 xfce4-goodies firefox tigervnc-standalone-server tigervnc-common xorg dbus-x11 x11-xserver-utils tigervnc-xorg-extension')\n",
180 | " runW.system_raw(rf'echo \"{password}\" | vncpasswd -f > ~/.vnc/passwd')\n",
181 | " data = \"\"\"\n",
182 | "#!/bin/bash\n",
183 | "xrdb $HOME/.Xresources\n",
184 | "startxfce4 &\n",
185 | "\"\"\"\n",
186 | " with open(f'{HOME}/.vnc/xstartup', 'w+') as wNow:\n",
187 | " wNow.write(data)\n",
188 | " os.chmod(f'{HOME}/.vnc/xstartup', 0o755)\n",
189 | " os.chmod(f'{HOME}/.vnc/passwd', 0o400)\n",
190 | " runW.system_raw(rf'sshpass -p \"{password}\" ssh -o StrictHostKeyChecking=no root@127.0.0.1 \"vncserver -depth 24 -geometry 1366x768 &\"')\n",
191 | " runSh(f'git clone https://github.com/novnc/noVNC.git {CWD}/noVNC')\n",
192 | " runSh(\"bash noVNC/utils/launch.sh --listen 6080 --vnc localhost:5901 &\",\n",
193 | " shell=True)\n",
194 | "\n",
195 | "#few necessory tools\n",
196 | "runW.system_raw('sudo apt-get install -y tmux vim htop net-tools')\n",
197 | "runW.system_raw('wget -q -O - https://gist.githubusercontent.com/hackingguy/e0e401636e38551f8fa3d793bb371110/raw/1970f5de3b273896283d5e6e54a1b628594ef814/latest-go.sh | bash')\n",
198 | "# bash aliases for tools from unethicalnoob\n",
199 | "runW.system_raw('wget -q -O - https://raw.githubusercontent.com/unethicalnoob/aliases/master/bashprofile > ~/.bash_aliases && source ~/.bash_aliases')\n",
200 | "clear_output()\n",
201 | "\n",
202 | "hostname = argoTunnel()\n",
203 | "\n",
204 | "if USE_TELERGAM_BOT:\n",
205 | " tgnotify(\"SSH Details:\\nHost:\"+hostname+\"\\nPort:\"+port+\"\\nPassword:\"+password)\n",
206 | " tgnotify(\"ssh -L 5901:127.0.0.1:5901 -N -f -l root \"+hostname+\" -p \"+port)\n",
207 | " runW.system_raw('git clone --quiet https://github.com/botgram/shell-bot && cd shell-bot && npm install --quiet && npm install --quiet pm2 -g && echo \"{ \\\\\"authToken\\\\\":\\\\\"'+TELEGRAM_API_TOKEN+'\\\\\",\\\\\"owner\\\\\":'+TELEGRAM_CHAT_ID+' }\" > config.json && pm2 start server.js')\n",
208 | " tgnotify(password)\n",
209 | "\n",
210 | "if CREATE_SSH:\n",
211 | " display(HTML(\"\"\"\"\"\"))\n",
212 | " display(HTML(\"
\"))\n",
213 | " \n",
214 | "if CREATE_VNC:\n",
215 | " display(HTML(\"\"\"'''))
68 |
69 | def findProcess(process, command="", isPid=False):
70 | from psutil import pids, Process
71 |
72 | if isinstance(process, int):
73 | if process in pids():
74 | return True
75 | else:
76 | for pid in pids():
77 | try:
78 | p = Process(pid)
79 | if process in p.name():
80 | for arg in p.cmdline():
81 | if command in str(arg):
82 | return True if not isPid else str(pid)
83 | else:
84 | pass
85 | else:
86 | pass
87 | except:
88 | continue
89 |
90 | def installAutoSSH():
91 | if checkAvailable("/usr/bin/autossh"):
92 | return
93 | else:
94 | runSh("apt-get install autossh -qq -y")
95 |
96 | def runSh(args, *, output=False, shell=False, cd=None):
97 | import subprocess, shlex
98 |
99 | if not shell:
100 | if output:
101 | proc = subprocess.Popen(
102 | shlex.split(args), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cd
103 | )
104 | while True:
105 | output = proc.stdout.readline()
106 | if output == b"" and proc.poll() is not None:
107 | return
108 | if output:
109 | print(output.decode("utf-8").strip())
110 | return subprocess.run(shlex.split(args), cwd=cd).returncode
111 | else:
112 | if output:
113 | return (
114 | subprocess.run(
115 | args,
116 | shell=True,
117 | stdout=subprocess.PIPE,
118 | stderr=subprocess.STDOUT,
119 | cwd=cd,
120 | )
121 | .stdout.decode("utf-8")
122 | .strip()
123 | )
124 | return subprocess.run(args, shell=True, cwd=cd).returncode
125 |
126 | def loadingAn(name="cal"):
127 | from IPython.display import HTML
128 |
129 | if name == "cal":
130 | return display(HTML(''))
131 | elif name == "lds":
132 | return display(HTML(''''''))
133 |
134 | def textAn(TEXT, ty='d'):
135 | from IPython.display import HTML
136 |
137 | if ty == 'd':
138 | return display(HTML(''''''))
139 | elif ty == 'twg':
140 | textcover = str(len(TEXT)*0.55)
141 | return display(HTML(''''''+TEXT+'''
'''))
142 |
143 | def updateCheck(self, Version):
144 | class UpdateChecker(object):
145 |
146 | def __init__(self):
147 | getMessage = self.getMessage
148 | getVersion = self.getVersion
149 |
150 | def getVersion(self, currentTag):
151 | from urllib.request import urlopen
152 | from lxml.etree import XML
153 |
154 | url = self.URL
155 | update = urlopen(url).read()
156 | root = XML(update)
157 | cur_version = root.find(".//"+currentTag)
158 | current = cur_version.text
159 | return current
160 |
161 | def getMessage(self, messageTag):
162 | from urllib.request import urlopen
163 | from lxml.etree import XML
164 |
165 | url = self.URL
166 | update = urlopen(url).read()
167 | root = XML(update)
168 | mess = root.find(".//"+messageTag)
169 | message = mess.text
170 | return message
171 |
172 | check = UpdateChecker()
173 | check.URL = "https://raw.githubusercontent.com/hackingguy/Bug-Hunting-Colab/master/update.xml"
174 | currentVersion = check.getVersion("currentVersion")
175 | message = check.getMessage("message")
176 |
177 | if Version != currentVersion:
178 | from IPython.display import HTML
179 |
180 | print("Script Update Checker: Version "+currentVersion+" "+message+" Your version: "+Version+"")
181 | display(HTML(''))
182 | return True
183 | else:
184 | print("Script Update Checker: Your script is up to date")
185 |
186 | def _download(url, path):
187 | try:
188 | with urllib.request.urlopen(url) as response:
189 | with open(path, 'wb') as outfile:
190 | shutil.copyfileobj(response, outfile)
191 | except:
192 | print("Failed to download ", url)
193 | raise
194 |
195 | def argoTunnel():
196 | _download("https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-amd64.tgz", "cloudflared.tgz")
197 | shutil.unpack_archive("cloudflared.tgz")
198 | cfd_proc = subprocess.Popen(
199 | ["./cloudflared", "tunnel", "--url", "ssh://localhost:22", "--logfile", "cloudflared.log", "--metrics", "localhost:49589"],
200 | stdout = subprocess.PIPE,
201 | universal_newlines = True
202 | )
203 | time.sleep(4)
204 | if cfd_proc.poll() != None:
205 | raise RuntimeError("Failed to run cloudflared. Return code:" + str(cloudflared.returncode) + "\nSee clouldflared.log for more info.")
206 | hostname = None
207 | # Sometimes it takes long time to display user host name in cloudflared metrices.
208 | for i in range(20):
209 | with urllib.request.urlopen("http://127.0.0.1:49589/metrics") as response:
210 | text = str(response.read())
211 | sub = "\\ncloudflared_tunnel_user_hostnames_counts{userHostname=\"https://"
212 | begin = text.find(sub)
213 | if begin == -1:
214 | time.sleep(10)
215 | #print("Retry reading cloudflared user hostname")
216 | continue
217 | end = text.index("\"", begin + len(sub))
218 | hostname = text[begin + len(sub) : end]
219 | break
220 | if hostname == None:
221 | raise RuntimeError("Failed to get user hostname from cloudflared")
222 | return hostname
223 |
--------------------------------------------------------------------------------
/update.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 | is now available! (Added Reconftw! (Recon Made Easy!))
4 |
5 |
--------------------------------------------------------------------------------