From c7e4b5f9e4f395222c1aeeabb5205bb52ac65594 Mon Sep 17 00:00:00 2001 From: MC874 Date: Tue, 14 Feb 2023 05:28:12 +0700 Subject: [PATCH] Release - Updated Docs - Pushing tests to Main - Added Requirements --- README.md | 7 +- requirements.txt | 5 + wsee.py | 922 ++++++++++++++++++++++------------------------- 3 files changed, 431 insertions(+), 503 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 18bfd29..89b7a1b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # wsee -A CDN Domain Fronting Tool or Websocket Discovery. This tool provides multiple technique to ensure target endpoint can fall under specific `protocol` or `frontable`, indicated via `101` or `200` statuses. Can be used for **Bug Hunters** to find any delicate domain related to `CDN`, `Websocket`, `HTTP/2` and `domain-fronting`. Should work on any CDN but only featured `Cloudflare` and `Cloudfront` as in-built ready to use. +A CDN Domain Fronting Tool or Websocket Discovery. This tool provides multiple technique to ensure target endpoint can fall under specific `protocol`, indicated via `101`. Can be used for **Bug Hunters** to find any delicate domain related to `CDN`, `Websocket`, and `HTTP/2`. Should work on any CDN but only featured `Cloudflare` and `Cloudfront` as in-built ready to use. ## Features - `wsee: to go` an Easy to use, scans whenever needed with Clean interactive Python script. Usable across any device that supports for `python`. PS: Even work on `Termux` and `WSL`. @@ -60,12 +60,11 @@ Latest releases introduce auto-update feature. It's a small feature but now, you # Installation **WSee** uses 3rd-party module, make sure to install `requests` before running, or else: ``` -apt install python3, python3-pip -apt install git +apt install python3, python3-pip, git git clone https://github.com/MC189/wsee cd wsee chmod +x * -python3 -m pip install requests +python3 -m pip -r requirements.txt python3 wsee.py ``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..82ac559 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +fsspec +requests +itertools +jsonmerge +setuptools \ No newline at end of file diff --git a/wsee.py b/wsee.py index e7964e7..96ef91b 100644 --- a/wsee.py +++ b/wsee.py @@ -21,32 +21,35 @@ import csv import ssl import json +import ctypes import socket import subprocess -import requests,re import os, fnmatch +import requests, re +import fsspec from time import sleep -from itertools import islice +from pathlib import Path +from jsonmerge import merge from threading import Thread from collections import defaultdict from os.path import abspath, dirname from pkg_resources import parse_version +from itertools import islice, chain, repeat from multiprocessing import Process, Manager, Value, Queue, cpu_count inpute = 'input' output = 'output' + work_at_time = 20 expected_response = 101 -cflare_domain = 'id3.sshws.me' -cfront_domain = 'd3heec68s9xyc4.cloudfront.net' - -txtfiles= [] -txtlines= [] maxi = cpu_count() -columns = defaultdict(list) -payloads = {'Host': '', 'SNI': '', 'Proxy': ''} -switch = { 'bloc': 0, 'rot': 0, 'dir': 0, 'numtotal': 0, 'numline': 0, 'nametag': 'result', 'type': '', 'loc': ''} +cflare_domain = 'id3.sshws.me' +cfront_domain = 'd20bqb0z6saqqh.cloudfront.net' +customPayloads = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', 'Upgrade-Insecure-Requests': '1', 'Accept': '*/*' } + +props = { 'Host': '', 'SNI': '', 'Proxy': '', 'nametag': 'result'} +switch = { 'bloc': 0, 'rot': 0, 'dir': 0, 'numtotal': 0, 'numline': 0, 'type': 0 } cipher = (':ECDHE-RSA-AES128-GCM-SHA256:DES-CBC3-SHA:AES256-SHA:AES128-SHA:AES128-SHA256:AES256-GCM-SHA384:AES256-SHA256:ECDHE-RSA-DES-CBC3:EDH-RSA-DES-CBC3:EECDH+AESGCM:EDH-RSA-DES-CBC3-SHA:EDH-AESGCM:AES256+EECDH:ECHDE-RSA-AES256-GCM-SHA384:ECHDE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECHDE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-A$:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK') class colors: @@ -57,136 +60,123 @@ class colors: ''' User-Input Section ''' # Takes Domain Fronting def doma(): - print('1. Custom SSH Address') - print('2. Default CloudFront') - print('3. Default CloudFlare') - print('') - ans=input(' Choose SSH : ').lower() - if ans=='1': - domain=input(' Domain : ') - payloads['Host']=f'{domain}' - elif ans=='2': - payloads['Host']=f'{cfront_domain}' - elif ans=='3': - payloads['Host']=f'{cflare_domain}' - else: - uinput() - print('') - frontdom = payloads['Host'] - print(' Selected ['+colors.GREEN_BG+f' {frontdom} '+colors.ENDC+'] as Domain Fronting!') + inputs = { '1': 'Custom SSH Address', '2': 'Default CloudFront', '3': 'Default CloudFlare' } + inputs = user_input(inputs) + if inputs == '1': + inputs = input(' inputs : ') + print('') + props['Host'] = inputs + elif inputs == '2': + props['Host'] = cfront_domain + elif inputs == '3': + props['Host'] = cflare_domain + print(' Selected ['+colors.GREEN_BG+f' {props["Host"]} '+colors.ENDC+'] as Domain Fronting!') print(' ['+ colors.RED_BG + ' INVALID ' + colors.ENDC + '] SSH Will Give 0 Result!' ) - -# Add Output -def outfile(): - print('[' + colors.RED_BG + ' Output File Name ' + colors.ENDC + ']') - nametag = input(' Input File Name : ') - switch['nametag'] = nametag print('') -# Rot Switch control +# Child Controller def option(): - global file_hosts + print('[' + colors.RED_BG + ' Output File Name ' + colors.ENDC + ']') + inputs = input(' Input File Name : ') + props['nametag'] = inputs print('') if switch['bloc'] == 1: - if switch['rot']==2: + if switch['rot'] == 2: print('[' + colors.RED_BG + ' Proxy/IP for Host Rotate ' + colors.ENDC + ']') - prox = input(' Input Proxy : ') - payloads['Proxy']=prox - elif switch['rot']==0: + inputs = input(' Input Proxy : ') + props['Proxy'] = inputs + elif switch['rot'] == 0: print('[' + colors.RED_BG + ' Hostname/SNI for Proxy Rotate' + colors.ENDC + ']') - bugger = input(' Input Hostname : ') - payloads['SNI']=bugger + inputs = input(' Input Hostname : ') + props['SNI'] = bugger print('') # Outrange input as finish def uinput(): - global switcher, payloads + global switch, props print('') print('['+colors.RED_BG+' Target Block Exceeded ' + colors.ENDC + ']' ) - print('1. Go Back to Menu') - print('2. Quit Instead') - print('') - ans=input(' Choose Option: ') - if ans=='1': + inputs = { '1': 'Go Back to Menu', '2': 'Quit Instead' } + inputs = user_input(inputs) + if inputs == '1': + props = { 'Host': '', 'SNI': '', 'Proxy': '', 'nametag': 'result'} + switch = { 'bloc': 0, 'rot': 0, 'dir': 0, 'numtotal': 0, 'numline': 0, 'type': 0 } print("\033c\033[3J\033[2J\033[0m\033[H") - payloads = {'Host': '', 'SNI': '', 'Proxy': ''} - switch = { 'bloc': '', 'rot': '', 'dir': '', 'type': '', 'loc': '', 'nametag': 'result'} menu() - elif ans=='2': - print("\033c\033[3J\033[2J\033[0m\033[H") + elif inputs == '2': exit() + +# Display Input +def user_input(inputs): + for i,j in inputs.items(): + print(f'{i}). {j}') + prompts = chain(["Choose: "], repeat("Invalid Input, Try Again: ", 2)) + prompts = map(input, prompts) + prompts = next(filter(inputs.__contains__, prompts), None) + print('') + if prompts is None: + uinput() else: - print('['+colors.RED_BG+' GGRRR! ' + colors.ENDC + '] Invalid INPUT!' ) - print('') - menu() + return prompts ''' Reading List Section ''' # Reading from Files def filet(): + txtfiles = [] num_file = 1 - print('1. Scan Files in Input Folder') - print('2. Scan Files in Current Folder') - print('3. Scan Files in Termux Host') - print('4. Scan Files in Termux') - print('5. Scan Custom Path') - print('') - ans=input(' Choose Scan Input : ').lower() - print('') - if ans=='1': + inputs = { '1': 'Scan Files in Input Folder', '2': 'Scan Files in Current Folder', '3': 'Scan Files in Termux Host', '4': 'Scan Files in Termux', '5': 'Scan Custom Path' } + inputs = user_input(inputs) + if inputs == '1': files = os.listdir(inpute) - switch['dir']=0 - elif ans=='2': + switch['dir'] = 0 + elif inputs == '2': files = [f for f in os.listdir('.') if os.path.isfile(f)] - switch['dir']=1 - elif ans=='3': + switch['dir'] = 1 + elif inputs == '3': files = os.listdir('$home/storage/shared/' + inpute) - switch['dir']=2 - elif ans=='4': + switch['dir'] = 2 + elif inputs == '4': files = os.listdir('$home/storage/shared/') - switch['dir']=3 - elif ans=='5': + switch['dir'] = 3 + elif inputs == '5': path = input(' Input your Folder: ') files = os.listdir(path) - switch['dir']=4 - else: - uinput() + switch['dir'] = 4 print(' [' + colors.RED_BG + ' Files Found ' + colors.ENDC + '] ') for f in files: if fnmatch.fnmatch(f, '*.txt'): - switch['type']=0 + switch['type'] = 0 elif fnmatch.fnmatch(f, '*.csv'): - switch['type']=1 - print( str(num_file),str(f)) - num_file=num_file+1 + switch['type'] = 1 + print(str(num_file), str(f)) + num_file = num_file + 1 txtfiles.append(str(f)) print('') print(' M back to Menu ') - fileselector = input(' Choose Target Files : ') - if fileselector.isdigit(): - print('') - print(' Chosen File : ' + colors.RED_BG + ' '+txtfiles[int(fileselector)-1]+' '+colors.ENDC) - print('') - direct = switch['dir'] - if direct == 0: - file_hosts = inpute +'/'+ str(txtfiles[int(fileselector)-1]) - elif direct == 1: - file_hosts = str(txtfiles[int(fileselector)-1]) - elif direct == 2: - file_hosts = './storage/shared/' + inpute +'/'+ str(txtfiles[int(fileselector)-1]) - elif direct == 3: - file_hosts = './storage/shared/' + str(txtfiles[int(fileselector)-1]) - else: - file_hosts = path - switch['loc']=file_hosts + inputs = input(' Choose Target Files : ') + print('') + print(' Chosen File : ' + colors.RED_BG + ' '+txtfiles[int(inputs)-1]+' '+colors.ENDC) + print('') + direct = switch['dir'] + if direct == 0: + processor = inpute +'/'+ str(txtfiles[int(inputs)-1]) + elif direct == 1: + processor = str(txtfiles[int(inputs)-1]) + elif direct == 2: + processor = './storage/shared/' + inpute +'/'+ str(txtfiles[int(inputs)-1]) + elif direct == 3: + processor = './storage/shared/' + str(txtfiles[int(inputs)-1]) else: - uinput() + processor = path + return processor # Reading Lines -def liner(): - switch['type']=2 - num_line=1 +def liner(processor): + switch['type'] = 2 + num_line = 1 + txtlines = [] print('[' + colors.RED_BG + ' List of String based on Lines ' + colors.ENDC + ']') - with open(switch['loc'], 'r') as liner: + with open(processor, 'r') as liner: for f in liner: print(str(num_line),str(f.strip())) num_line=num_line+1 @@ -198,334 +188,328 @@ def liner(): print(' Chosen Line : ' + colors.RED_BG + ' '+txtlines[int(lineselector)-1]+' '+colors.ENDC) print('') if lineselector.isdigit(): - switch['loc']=txtlines[int(lineselector)-1] - else: - uinput() + processor = txtlines[int(lineselector)-1] + return processor # Reading from Online enumeration def hacki(): - global domainlist - subd = input('\nInput Domain: ') - subd = subd.replace('https://','').replace('http://','') - r = requests.get('https://api.hackertarget.com/hostsearch/?q=' + subd, allow_redirects=False) - if r.text == 'error invalid host': + inputs = input('\nInput Domain: ') + print('') + inputs = inputs.replace('https://','').replace('http://','') + response = requests.get('https://api.hackertarget.com/hostsearch/?q=' + inputs) + if response.text == 'error invalid host': exit('ERR: error invalid host') else: - switch['type']=3 - domainlist = re.findall('(.*?),',r.text) + switch['type'] = 3 + processor = re.findall('(.*?),', response.text) + return processor ''' Main Control Section ''' -# Running Process -def executor(): - total = [] - for i in range(maxi): - appendix.put('ENDED') - if switch['bloc']==0: - p = Process(target=grabber, args=(appendix,Resultee,Faily)) - elif switch['bloc']==1: - p = Process(target=wsee, args=(appendix,Resultee,Faily)) - elif switch['bloc']==2: - p = Process(target=wsrect, args=(appendix,Resultee,Faily)) - else: - p = Process(target=h2srect, args=(appendix,Resultee,Faily)) - p.start() - total.append(p) - for p in total: - p.join() - p.terminate() +def reserver(processor): + Faily = Value('i', 0) + appendix = Queue() + Resulty = Value('d', 0) + columns = defaultdict(list) + if switch['type'] == 0: + with open(processor, 'r') as f: + for line in f: + appendix.put(line.strip()) + processor(appendix, Faily, Resulty) + elif switch['type']==1: + csv_file = open(processor, 'r').read() + reader = csv.reader(csv_file) + for row in reader: + for (i,v) in enumerate(row): + columns[i].append(v) + appendix.put(columns[9]+columns[3]) + csv_file.close() + processor(appendix, Faily, Resulty) + elif switch['type']==2: + appendix.put(processor) + processor(appendix, Faily, Resulty) + else: + for process in processor: + appendix.put(process) + processor(appendix, Faily, Resulty) + print(' Failed Result : ' + colors.RED_BG + ' ' + str(Faily.value) + ' ' + colors.ENDC ) + print(' Success Result : ' + colors.GREEN_BG + ' ' + str(Resulty.value) + ' ' + colors.ENDC) + print('') # Running Process and Reading text list ''' Type 0: takes txt Type 1: takes csv Type 2: takes input Type 3: takes online enum ''' - -def serv(): - global appendix, Faily, Resultee - Faily=Value('i',0) - appendix = Queue() - Resultee=Value('d',0) - if switch['type']==0: - with open(switch['loc'], 'r') as f: - for line in f: - liner = [line] + list(islice(f, work_at_time-1)) - for i in liner: - appendix.put(str(re.sub('\n', '', i.strip()))) - executor() +def server(processor): + global customPayloads + if switch['bloc'] == 3: + with open('./bin/payloads/http2', 'r') as f: + payloads = json.load(f) + else: + with open('./bin/payloads/websocket', 'r') as f: + payloads = json.load(f) + mergedPayloads = merge(payloads, customPayloads) + payloads = '' + for i, j in mergedPayloads.items(): + payloads += f"'{i}': '{j}'\r\n" + Resulty = Manager().dict() + Resulty['Success'] = 0 + Resulty['Fail'] = 0 + payloads = Value(ctypes.c_wchar_p, payloads) + appendix = Queue(99) + columns = defaultdict(list) + if switch['type'] == 0: + f = open(processor, 'r') + for line in f: + liner = [line] + list(islice(f, 9)) + for i in liner: + appendix.put(i.strip()) + executor(appendix, Resulty, payloads) + f.close() elif switch['type']==1: - with open(switch['loc'], 'r') as f: - reader = csv.reader(csv_file) - for row in reader: - for (i,v) in enumerate(row): - columns[i].append(v) + csv_file = open(processor, 'r').read() + reader = csv.reader(csv_file) + for row in reader: + for (i,v) in enumerate(row): + columns[i].append(v) appendix.put(columns[9]+columns[3]) - executor() + executor(appendix, Resulty, payloads) + csv_file.close() elif switch['type']==2: - appendix.put(str(switch['loc'])) - executor() + appendix.put(processor) + executor(appendix, Resulty, payloads) else: - for domain in domainlist: - appendix.put(domain) - executor() + for process in processor: + liner = [process] + list(islice(processor, 9)) + for i in liner: + appendix.put(i) + executor(appendix, Resulty, payloads) + print(' Failed Result : ' + colors.RED_BG + ' ' + str(Resulty['Fail']) + ' ' + colors.ENDC ) + print(' Success Result : ' + colors.GREEN_BG + ' ' + str(Resulty['Success']) + ' ' + colors.ENDC) print('') - print(' Failed Result : ' + colors.RED_BG + ' '+ str(Faily.value) +' '+ colors.ENDC ) - print(' Success Result : ' + colors.GREEN_BG + ' '+ str(Resultee.value) + ' '+colors.ENDC) + uinput() + +# Running Process +def executor(appendix, Resulty, payloads): + total = [] + for i in range(maxi): + appendix.put('ENDED') + p = Process(target = processor, args = (appendix, Resulty, payloads)) + p.start() + total.append(p) + for p in total: + p.join() + p.terminate() + +# Processing Main Process +def processor(appendix, Resulty, payloads): + while True: + onliner = appendix.get() + if onliner == 'ENDED': + break + try: + pinger() + if switch['bloc'] == 0: + grabber(onliner, Resulty) + elif switch['bloc'] == 1: + wsee(onliner, Resulty, payloads) + elif switch['bloc'] == 2: + wsrect(onliner, Resulty, payloads) + else: + h2srect(onliner, Resulty, payloads) + except(ssl.SSLError): + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' NOT SSL ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + except(socket.gaierror) or (socket.timeout): + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' INVALID ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + except(socket.error): + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' TIMEOUT ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + except Exception as e: + print(e) + pass ''' Main Process ''' # Ping DNS over TCP to check connection def pinger(): - try: - with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: - sock.settimeout(3) - sock.connect(('9.9.9.9',53)) - except socket.error as e: - print(e) - print("["+colors.RED_BG+" Check Your Internet Connection! "+colors.ENDC+"]") - sleep(3) - pinger() + while True: + try: + sock = socket.socket() + sock.settimeout(5) + sock.connect(('nghttp2.org', 80)) + sock.sendall(f'HEAD / HTTP/1.1\r\nHost: nghttp2.org\r\nConnection: Upgrade, HTTP2-Settings\r\nUpgrade: h2c\r\nHTTP2-Settings: \r\n\r\n'.encode()) + line = str(sock.recv(13)) + sock.close() + sock = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) + if int(sock[0]) == 101: + break + except socket.error as e: + print(e) + print("[" + colors.RED_BG + " Check Your Internet Connection! " + colors.ENDC + "]") + sleep(3) # Websocket SSL: Takes CDN/Local ''' Rot 0: Rotate Proxy Mode Rot 1: Direct Mode Rot 2: Rotate Host Mode Rot 3: Normal Mode''' - -def wsee(appendix,Resultee,Faily): - while True: - onliner = appendix.get() - if onliner == 'ENDED': - break +def wsee(onliner, Resulty, payloads): + sock = socket.socket() + sock.settimeout(5) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + cont = ssl.create_default_context() + cont.set_ciphers(cipher) + if switch['rot'] == 0: + sock = cont.wrap_socket(sock, server_hostname = f'{props["SNI"]}') + sock.connect((onliner, 443)) + sock.sendall(f'HEAD wss://{props["SNI"]}/ HTTP/1.1\r\nHost: {props["Host"]}\r\n{payloads.value}\r\n'.encode()) + elif switch['rot'] == 1: + sock.connect((onliner, 80)) + sock.sendall(f'HEAD / HTTP/1.1\r\nHost: {props["Host"]}\r\n{payloads.value}\r\n'.encode()) + else: + if switch['rot'] == 2: + sock = cont.wrap_socket(sock, server_hostname = onliner) + sock.connect((f'{props["Proxy"]}', 443)) + else: + sock = cont.wrap_socket(sock, server_hostname = onliner) + sock.connect((onliner, 443)) + sock.sendall(f'HEAD wss://{onliner}/ HTTP/1.1\r\nHost: {props["Host"]}\r\n{payloads.value}\r\n'.encode()) + line = str(sock.recv(13)) + resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) + if not resu: + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' EMPTY ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + else: + if int(resu[0]) == expected_response: + print(' [' + colors.GREEN_BG + ' HIT ' + colors.ENDC + '] ' + onliner + ' [' + colors.GREEN_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + print(onliner, file = open(f'{output}/{props["nametag"]}.txt', 'a')) + Resulty['Success'] += 1 else: - try: - pinger() - with socket.socket() as sock: - sock.settimeout(5) - sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - cont = ssl.create_default_context() - cont.set_ciphers(cipher) - if switch['rot']==0: - sock = cont.wrap_socket(sock, server_hostname = f'{payloads["SNI"]}') - sock.connect((onliner, 443)) - sock.sendall(bytes(f'GET wss://{payloads["SNI"]}/ HTTP/1.1\r\nHost: {payloads["Host"]}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: dXP3jD9Ipw0B2EmWrMDTEw==\r\nSec-Websocket-Version: 13\r\nSec-Websocket-Accept: GLWt4W8Ogwo6lmX9ZGa314RMRr0=\r\nSec-WebSocket-Extensions: superspeed\r\nOrigin: https://{payloads["SNI"]}\r\nPragma: no-cache\r\n\r\n', encoding='utf-8')) - elif switch['rot']==1: - sock.connect((onliner, 80)) - sock.sendall(bytes(f'GET ws://{onliner}/ HTTP/1.1\r\nHost: {payloads["Host"]}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: dXP3jD9Ipw0B2EmWrMDTEw==\r\nSec-Websocket-Version: 13\r\nSec-Websocket-Accept: GLWt4W8Ogwo6lmX9ZGa314RMRr0=\r\nSec-WebSocket-Extensions: superspeed\r\nOrigin: https://{onliner}\r\nPragma: no-cache\r\n\r\n', encoding='utf-8')) - else: - if switch['rot']==2: - sock = cont.wrap_socket(sock, server_hostname = onliner) - sock.connect((f'{payloads["Proxy"]}', 443)) - else: - sock = cont.wrap_socket(sock, server_hostname = onliner) - sock.connect((onliner, 443)) - sock.sendall(bytes(f'GET wss://{onliner}/ HTTP/1.1\r\nHost: {payloads["Host"]}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: dXP3jD9Ipw0B2EmWrMDTEw==\r\nSec-Websocket-Version: 13\r\nSec-Websocket-Accept: GLWt4W8Ogwo6lmX9ZGa314RMRr0=\r\nSec-WebSocket-Extensions: superspeed\r\nOrigin: https://{onliner}\r\nPragma: no-cache\r\n\r\n', encoding='utf-8')) - line = str(sock.recv(13)) - resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) - if not resu: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' EMPTY '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - else: - if int(resu[0]) == expected_response: - print(' ['+colors.GREEN_BG+' HIT '+colors.ENDC+'] ' + onliner+ ' [' +colors.GREEN_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - print(onliner, file=open(f'{output}/{switch["nametag"]}.txt', 'a')) - with Resultee.get_lock(): - Resultee.value +=1 - else: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' +colors.RED_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(ssl.SSLError): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' NOT SSL '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.gaierror) or (socket.timeout): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' INVALID '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.error): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' TIMEOUT '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except Exception as e: - print(e) - pass + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + sock.close() # Websocket Direct: Takes CDN/Local ''' Rot 1: Local Mode Rot 0: Normal Mode ''' -def wsrect(appendix,Resultee,Faily): - while True: - onliner = appendix.get() - if onliner == 'ENDED': - break +def wsrect(onliner, Resulty, payloads): + sock = socket.socket() + sock.settimeout(5) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + cont = ssl.create_default_context() + cont.set_ciphers(cipher) + if switch['rot'] == 0: + sock = cont.wrap_socket(sock, server_hostname = f'{onliner}') + sock.connect((onliner, 443)) + sock.sendall(f'HEAD wss://{onliner} HTTP/1.1\r\nHost: {props["Host"]}\r\n{payloads.value}\r\n'.encode()) + else: + sock.connect((onliner, 80)) + sock.sendall(f'HEAD / HTTP/1.1\r\nHost: {onliner}\r\n{payloads.value}\r\n'.encode()) + line = str(sock.recv(13)) + resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) + if not resu: + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' EMPTY ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + else: + if int(resu[0]) == expected_response: + print(' [' + colors.GREEN_BG + ' HIT ' + colors.ENDC + '] ' + onliner + ' [' + colors.GREEN_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + print(onliner, file = open(f'{output}/{props["nametag"]}.txt', 'a')) + Resulty['Success'] += 1 else: - try: - pinger() - with socket.socket() as sock: - sock.settimeout(5) - sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - cont = ssl.create_default_context() - cont.set_ciphers(cipher) - if switch['rot'] == 0: - sock = cont.wrap_socket(sock, server_hostname = f'{onliner}') - sock.connect((onliner, 443)) - sock.sendall(bytes(f'GET / HTTP/1.1\r\nHost: {payloads["Host"]}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: dXP3jD9Ipw0B2EmWrMDTEw==\r\nSec-Websocket-Version: 13\r\nSec-Websocket-Accept: GLWt4W8Ogwo6lmX9ZGa314RMRr0=\r\nSec-WebSocket-Extensions: superspeed\r\nOrigin: http://{payloads["Host"]}\r\nPragma: no-cache\r\n\r\n', encoding='utf-8')) - else: - sock.connect((onliner, 80)) - sock.sendall(bytes(f'GET / HTTP/1.1\r\nHost: {onliner}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: dXP3jD9Ipw0B2EmWrMDTEw==\r\nSec-Websocket-Version: 13\r\nSec-Websocket-Accept: GLWt4W8Ogwo6lmX9ZGa314RMRr0=\r\nSec-WebSocket-Extensions: superspeed\r\nOrigin: http://{payloads["Host"]}\r\nPragma: no-cache\r\n\r\n', encoding='utf-8')) - line = str(sock.recv(13)) - resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) - if not resu: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' EMPTY '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - else: - if int(resu[0]) == expected_response: - print(' ['+colors.GREEN_BG+' HIT '+colors.ENDC+'] ' + onliner+ ' [' +colors.GREEN_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - print(onliner, file=open(f'{output}/{switch["nametag"]}.txt', 'a')) - with Resultee.get_lock(): - Resultee.value +=1 - else: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' +colors.RED_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(ssl.SSLError): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' NOT SSL '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.gaierror) or (socket.timeout): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' INVALID '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.error): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' TIMEOUT '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except Exception as e: - print(e) - pass + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + sock.close() # Websocket SSL: Takes CDN/Local ''' Rot 1: Local Rot 0: Normal Mode ''' -def h2srect(appendix,Resultee,Faily): - while True: - onliner = appendix.get() - if onliner == 'ENDED': - break +def h2srect(onliner, Resulty, payloads): + sock = socket.socket() + sock.settimeout(5) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + sock.connect((onliner, 80)) + if switch['rot']==0: + sock.sendall(f'HEAD / HTTP/1.1\r\nHost: {props["Host"]}\r\n{payloads.value}\r\n'.encode()) + else: + sock.connect((onliner, 80)) + sock.sendall(f'HEAD / HTTP/1.1\r\nHost: {onliner}\r\n{payloads.value}\r\n'.encode()) + line = str(sock.recv(13)) + resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) + if not resu: + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' EMPTY ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + else: + if int(resu[0]) == expected_response: + print(' [' + colors.GREEN_BG + ' HIT ' + colors.ENDC + '] ' + onliner + ' [' + colors.GREEN_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + print(onliner, file = open(f'{output}/{props["nametag"]}.txt', 'a')) + Resulty['Success'] += 1 else: - try: - pinger() - with socket.socket() as sock: - sock.settimeout(5) - sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - sock.connect((onliner, 80)) - if switch['rot']==0: - sock.sendall(bytes(f'GET h2c://{onliner}/ HTTP/1.1\r\nHost: {payloads["Host"]}\r\nUpgrade: h2c\r\nConnection: Upgrade, HTTP2-Settings\r\nHTTP2-Settings: \r\n\r\n', encoding='utf-8')) - else: - sock.connect((onliner, 80)) - sock.sendall(bytes(f'GET / HTTP/1.1\r\nHost: {onliner}\r\nUpgrade: h2c\r\nConnection: Upgrade, HTTP2-Settings\r\nHTTP2-Settings: \r\n\r\n', encoding='utf-8')) - line = str(sock.recv(13)) - resu = re.findall("b'HTTP\/[1-9]\.[1-9]\ (.*?)\ ", line) - if not resu: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' EMPTY '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - else: - if int(resu[0]) == expected_response: - print(' ['+colors.GREEN_BG+' HIT '+colors.ENDC+'] ' + onliner+ ' [' +colors.GREEN_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - print(onliner, file=open(f'{output}/{switch["nametag"]}.txt', 'a')) - with Resultee.get_lock(): - Resultee.value +=1 - else: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' +colors.RED_BG+' ' + str(resu[0]) + ' '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(ssl.SSLError): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' NOT SSL '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.gaierror) or (socket.timeout): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' INVALID '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except(socket.error): - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner + ' [' + colors.RED_BG +' TIMEOUT '+colors.ENDC+']') - with Faily.get_lock(): - Faily.value +=1 - except Exception as e: - print(e) - pass + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner + ' [' + colors.RED_BG + ' ' + str(resu[0]) + ' ' + colors.ENDC + ']') + Resulty['Fail'] += 1 + sock.close() # ZGrab Mode: Only Local; Takes 443/80 -def grabber(appendix,Resultee,Faily): - while True: - onliner = appendix.get() - if onliner == 'ENDED': - break - else: - try: - pinger() - if switch['rot']==0: - commando=f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,Sec-WebSocket-Key,Sec-WebSocket-Version,Connection' --custom-headers-values='websocket,dXP3jD9Ipw0B2EmWrMDTEw==,13,Upgrade' --remove-accept-header --dynamic-origin --use-https --port 443 --max-redirects 10 --retry-https --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" - elif switch['rot']==1: - commando =f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,Sec-WebSocket-Key,Sec-WebSocket-Version,Connection' --custom-headers-values='websocket,dXP3jD9Ipw0B2EmWrMDTEw==,13,Upgrade' --remove-accept-header --dynamic-origin --port 80 --max-redirects 10 --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" - elif switch['rot']==2: - commando=f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,HTTP2-Settings,Connection' --custom-headers-values='h2,AAMAAABkAARAAAAAAAIAAAAA,Upgrade' --remove-accept-header --dynamic-origin --use-https --port 443 --max-redirects 10 --retry-https --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" - else: - commando =f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,HTTP2-Settings,Connection' --custom-headers-values='h2c,AAMAAABkAARAAAAAAAIAAAAA,Upgrade' --remove-accept-header --dynamic-origin --port 80 --max-redirects 10 --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" - commando=subprocess.Popen(commando,shell=True,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE) - commando = commando.stdout.read().decode('utf-8') + commando.stderr.read().decode('utf-8') - rege = re.split(r'\n',commando) - if rege[0]==f'{expected_response}': - print(' ['+colors.GREEN_BG+' HIT '+colors.ENDC+'] ' + rege[1]) - print(rege[1], file=open(f'{switch["nametag"]}.txt', 'a')) - with Resultee.get_lock(): - Resultee.value +=1 - else: - print(' ['+colors.RED_BG+' FAIL '+colors.ENDC+'] ' + onliner) - with Faily.get_lock(): - Faily.value +=1 - except Exception as e: - print(e) - print(' [' + colors.RED_BG+'Check Your ZGrab Installation!'+colors.ENDC+'] ' + onliner) - menu() +def grabber(onliner, Resulty): + if switch['rot'] == 0: + commando = f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,Sec-WebSocket-Key,Sec-WebSocket-Version,Connection' --custom-headers-values='websocket,dXP3jD9Ipw0B2EmWrMDTEw==,13,Upgrade' --remove-accept-header --dynamic-origin --use-https --port 443 --max-redirects 10 --retry-https --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" + elif switch['rot'] == 1: + commando = f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,Sec-WebSocket-Key,Sec-WebSocket-Version,Connection' --custom-headers-values='websocket,dXP3jD9Ipw0B2EmWrMDTEw==,13,Upgrade' --remove-accept-header --dynamic-origin --port 80 --max-redirects 10 --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" + else: + commando = f"echo {onliner} | zgrab2 http --custom-headers-names='Upgrade,HTTP2-Settings,Connection' --custom-headers-values='h2c,AAMAAABkAARAAAAAAAIAAAAA,Upgrade' --remove-accept-header --dynamic-origin --port 80 --max-redirects 10 --cipher-suite= portable -t 10 | jq '.data.http.result.response.status_code,.domain' | grep -A 1 -E --line-buffered '^101'" + commando = subprocess.Popen(commando, shell = True, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE) + commando = commando.stdout.read().decode('utf-8') + commando.stderr.read().decode('utf-8') + rege = re.split(r'\n',commando) + if rege[0] == f'{expected_response}': + print(' [' + colors.GREEN_BG + ' HIT ' + colors.ENDC + '] ' + rege[1]) + print(rege[1], file = open(f'{props["nametag"]}.txt', 'a')) + Resulty['Success'] += 1 + else: + print(' [' + colors.RED_BG + ' FAIL ' + colors.ENDC + '] ' + onliner) + Resulty['Fail'] += 1 ''' Frontier Section ''' +# Script Updater +def updater(): + print('[' + colors.GREEN_BG + ' Script Update Available ' + colors.ENDC + ']') + inputs = { '1': 'Ignore Update', '2': 'Apply Update' } + inputs = user_input(inputs) + if inputs == '2': + os.remove('wsee.py') + + destination = Path(__file__).resolve().parent / "wsee.py" + destination.mkdir(exist_ok=True, parents=True) + fs = fsspec.filesystem("github", org="Guild-Net", repo="wsee") + fs.get(fs.ls("wsee.py"), destination.as_posix()) + + destination = Path(__file__).resolve().parent / ".wsee" + destination.mkdir(exist_ok=True, parents=True) + fs = fsspec.filesystem("github", org="Guild-Net", repo="wsee") + fs.get(fs.ls(".wsee/"), destination.as_posix(), recursive=True) + + print('[' + colors.GREEN_BG + ' Script Updated! ' + colors.ENDC + ']') + sleep(3) + exit() + else: + pass + # Check for Updates / Bin def checker(): with open('.wsee/CONFIG') as f: data = json.load(f) - if data['config']['update-wsee'] == True: - print('[' + colors.RED_BG + ' Checking for update... ' + colors.ENDC + ']') - resp = requests.get('https://raw.githubusercontent.com/MC874/wsee/main/VERSION') - with open('./.wsee/CONFIG') as f: - verlocal = f.read() - if parse_version(resp.text) > parse_version(verlocal): - print('[' + colors.GREEN_BG + ' Update Available ' + colors.ENDC + ']') - print('1) Ignore Update') - print('2) Apply Update') - ans=input(' Choose : ') - if ans=='2': - os.remove('wsee.py') - upd = requests.get('https://raw.githubusercontent.com/MC874/wsee/main/wsee.py') - with open('wsee.py', 'a') as pd: - pd.write(upd.text) - print("\033c\033[3J\033[2J\033[0m\033[H") - print('[' + colors.GREEN_BG + ' Script Updated! ' + colors.ENDC + ']') - sleep(3) - print("\033c\033[3J\033[2J\033[0m\033[H") - exit() - else: - print("\033c\033[3J\033[2J\033[0m\033[H") - else: - print('[' + colors.RED_BG + ' No Update Available ' + colors.ENDC + ']') - sleep(3) - print("\033c\033[3J\033[2J\033[0m\033[H") + if data['config']['update-wsee'] == True: + print('[' + colors.RED_BG + ' Checking for update... ' + colors.ENDC + ']') + resp = requests.get('https://raw.githubusercontent.com/MC874/wsee/main/VERSION') + with open('./.wsee/VERSION') as f: + verlocal = f.read() + if parse_version(resp.text) > parse_version(verlocal): + updater() else: - return + print('[' + colors.RED_BG + ' No Update Available ' + colors.ENDC + ']') + sleep(3) + print("\033c\033[3J\033[2J\033[0m\033[H") # Main Menu; Handles everything. def menu(): @@ -540,130 +524,70 @@ def menu(): print(' [' + colors.RED_BG + ' Domain : Fronting ' + colors.ENDC + ']') print(' ['+colors.RED_BG+' Author ' + colors.ENDC + ':' + colors.GREEN_BG + ' Kiynox ' + colors.ENDC + ']') print('') - print('1. CDN Websocket') - print('2. Local Websocket') - print('3. HTTP/2 Socket') - print('') - ans=input(' Choose Modes : ').lower() - print('') - if ans=='1': - print('1. [Fronting] Websocket SSL') - print('2. [Fronting] Websocket Proxy Rotate') - print('3. [Fronting] Websocket Host Rotate') - print('4. [Fronting] Websocket Direct') - print('') - ans=input(' Choose Modes : ').lower() - print('') - if ans=='1': - switch['bloc']=1 - switch['rot']=3 - elif ans=='2': - switch['bloc']=1 - switch['rot']=0 - elif ans=='3': - switch['bloc']=1 - switch['rot']=2 - elif ans=='4': - switch['bloc']=1 - switch['rot']=1 - elif ans=='2': - print('1. [Local] Websocket SSL') - print('2. [Local] Websocket Direct') - print('3. [Local] Websocket SSL ZGrab') - print('4. [Local] Websocket Direct ZGrab') - print('') - ans=input(' Choose Modes : ').lower() - print('') - if ans=='1': - switch['bloc']=2 - switch['rot']=0 - elif ans=='2': - switch['bloc']=2 - switch['rot']=1 - elif ans=='3': - switch['bloc']=0 - switch['rot']=0 - elif ans=='4': - switch['bloc']=0 - switch['rot']=1 - else: - uinput() - elif ans=='3': - print('1. [Fronting] HTTP/2 Direct') - print('2. [Local] HTTP/2 Direct') - print('3. [Local] HTTP/2 Direct ZGrab') - print('') - ans=input(' Choose Modes : ').lower() - print('') - if ans=='1': - switch['bloc']=3 - switch['rot']=0 - elif ans=='2': - switch['bloc']=3 - switch['rot']=1 - elif ans == '3': - switch['bloc']=0 - switch['rot']=3 - else: - uinput() - else: - uinput() - print('1. Scan File (.txt)') - print('2. Scan Online (HackerTarget)') - print('3. Scan Custom Input') - print('') - ans=input(' Choose Scan Input : ').lower() - print('') - if ans=='1': - print('1. Scan Local Files') - print('3. Scan Local Lines') - print() - ans=input(' Choose Scan Input : ').lower() - print() - if ans == '1': - filet() - outfile() - elif ans == '2': - filet() - liner() - outfile() - else: - uinput() - if switch['bloc']==1: - doma() - option() - serv() - uinput() - elif ans=='2': - if switch['bloc']==1: - doma() - hacki() - outfile() - option() - serv() - uinput() - elif ans=='3': - print('1. Scan Custom Hostname/SNI') - print('2. Scan Custom Proxy/IP') - print('') - ans = input(' Choose Scan Input: ') - print('') - if ans == '1': - cus = input(' Input Hostname : ') - elif ans == '2': - cus = input(' Input IP : ') - else: - uinput() + inputs = { '1': 'CDN Websocket', '2': 'Local Websocket', '3': 'HTTP/2 Socket' } + inputs = user_input(inputs) + if inputs == '1': + inputs = { '1': '[Fronting] Websocket SSL', '2': '[Fronting] Websocket Proxy Rotate', '3': '[Fronting] Websocket Host Rotate', '4': '[Fronting] Websocket Direct' } + inputs = user_input(inputs) + if inputs == '1': + switch['bloc'] = 1 + switch['rot'] = 3 + elif inputs == '2': + switch['bloc'] = 1 + switch['rot'] = 0 + elif inputs == '3': + switch['bloc'] = 1 + switch['rot'] = 2 + elif inputs == '4': + switch['bloc'] = 1 + switch['rot'] = 1 + elif inputs == '2': + inputs = { '1': '[Local] Websocket SSL', '2': '[Local] Websocket Direct', '3': '[Local] Websocket SSL ZGrab', '4': '[Local] Websocket Direct ZGrab' } + inputs = user_input(inputs) + if inputs == '1': + switch['bloc'] = 2 + switch['rot'] = 0 + elif inputs == '2': + switch['bloc'] = 2 + switch['rot'] = 1 + elif inputs == '3': + switch['bloc'] = 0 + switch['rot'] = 0 + elif inputs == '4': + switch['bloc'] = 0 + switch['rot'] = 1 + elif inputs == '3': + inputs = { '1': '[Fronting] HTTP/2 Direct', '2': '[Local] HTTP/2 Direct', '3': '[Local] HTTP/2 Direct ZGrab' } + inputs = user_input(inputs) + if inputs == '1': + switch['bloc'] = 3 + switch['rot'] = 0 + elif inputs == '2': + switch['bloc'] = 3 + switch['rot'] = 1 + elif inputs == '3': + switch['bloc'] = 0 + switch['rot'] = 2 + inputs = { '1': 'Scan File (.txt)', '2': 'Scan Online (HackerTarget)', '3': 'Scan Custom Input' } + inputs = user_input(inputs) + if inputs == '1': + inputs = { '1': 'Scan Local Files', '2': 'Scan Local Lines' } + inputs = user_input(inputs) + if inputs == '1': + processor = filet() + elif inputs == '2': + processor = filet() + processor = liner(processor) + elif inputs == '2': + processor = hacki() + elif inputs == '3': + processor = input(' Custom Input: ') print() - switch['loc']=cus switch['type']=2 - outfile() + if switch['bloc']==1: doma() - option() - serv() - uinput() - else: - uinput() + option() + server(processor) if __name__ == '__main__': os.chdir(dirname(abspath(__file__)))