Skip to content

Commit

Permalink
chore: See, it's fixed
Browse files Browse the repository at this point in the history
- Fixed `Local Websocket` passing custom domain
- Fixed Local Websocket `Nametag` requires custom domain as output
- Fixed Output Mess, it's now marked properly for each uses
- The tool now should be take care of `InvalidURL` exceptions as `Fail`
- `WSocket` now only contains proper required headers.
  • Loading branch information
MC874 authored Jun 5, 2022
1 parent 009e83e commit dd75ad3
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions wsee.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests,re
import sys
from requests.exceptions import ReadTimeout, Timeout, ConnectionError,ChunkedEncodingError,TooManyRedirects
from requests.exceptions import ReadTimeout, Timeout, ConnectionError,ChunkedEncodingError,TooManyRedirects,InvalidURL
from urllib3.exceptions import ProtocolError,InvalidChunkLength
import os, fnmatch; os.system("clear")
import csv
Expand All @@ -21,7 +21,7 @@ class colors:
expected_response = 101
control_domain = 'd22236fd6eam5f.cloudfront.net'
payloads = { "Host": control_domain, "Upgrade": "websocket", "DNT": "1", "Accept-Language": "*", "Accept": "*/*", "Accept-Encoding": "*", "Connection": "keep-alive, upgrade", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36" }
wsocket = { "Connection": "Upgrade", "Sec-Websocket-Key": "dXP3jD9Ipw0B2EmWrMDTEw==", "Sec-Websocket-Version": "13", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36", "Upgrade": "websocket" }
wsocket = { "Connection": "Upgrade", "Sec-Websocket-Key": "dXP3jD9Ipw0B2EmWrMDTEw==", "Sec-Websocket-Version": "13", "Upgrade": "websocket" }
file_hosts = ""
columns = defaultdict(list)
txtfiles= []
Expand Down Expand Up @@ -187,6 +187,10 @@ def engine(domainlist):
print(" ["+colors.RED_BG+" FAIL "+colors.ENDC+"] " + domain + " [" +colors.RED_BG+" Redirects Loop "+colors.ENDC+"]")
F.append(str(domain))
pass
except(InvalidURL):
print(" ["+colors.RED_BG+" FAIL "+colors.ENDC+"] " + domain + " [" +colors.RED_BG+" Invalid URL "+colors.ENDC+"]")
F.append(str(domain))
pass

def menu():
print('''
Expand Down Expand Up @@ -223,7 +227,7 @@ def text():
headers = payloads
doma()
filet()
nametag = str(txtfiles[int(fileselector)-1]).removesuffix(".txt") + f"[{frontdom}]¿-[CDN]-[TXT]"
nametag = "["+str(txtfiles[int(fileselector)-1]).removesuffix(".txt") + f"]-[{frontdom}]-[CDN]-[TXT]"
executor()
uinput()
text()
Expand All @@ -235,7 +239,7 @@ def csv():
headers = payloads
doma()
csveat()
nametag = str(txtfiles[int(fileselector)-1]).removesuffix(".csv") + f"[{frontdom}]-[CDN]-[CSV]"
nametag = "["+str(txtfiles[int(fileselector)-1]).removesuffix(".csv") + f"]-[{frontdom}]-[CDN]-[CSV]"
executor()
uinput()
csv()
Expand All @@ -247,7 +251,7 @@ def enum():
headers = payloads
doma()
hacki()
nametag = str(subd) + f"[{frontdom}]-[CDN]-[ENUM]"
nametag = "["+str(subd) + f"]-[{frontdom}]-[CDN]-[ENUM]"
executor()
uinput()
enum()
Expand All @@ -266,36 +270,33 @@ def enum():
def localtext():
global headers
headers = wsocket
doma()
filet()
nametag = str(txtfiles[int(fileselector)-1]).removesuffix(".txt") + f"[{frontdom}]-[LOCAL]-[TXT]"
nametag = "["+str(txtfiles[int(fileselector)-1]).removesuffix(".txt") + f"]-[LOCAL]-[TXT]"
executor()
uinput()
text()
localtext()
localtext()

elif str(opsi)=="2":
def localcsv():
global headers
headers = wsocket
doma()
csveat()
nametag = str(txtfiles[int(fileselector)-1]).removesuffix(".csv") + f"[{frontdom}]-[LOCAL]-[CSV]"
nametag = "["+str(txtfiles[int(fileselector)-1]).removesuffix(".csv") + f"]-[LOCAL]-[CSV]"
executor()
uinput()
csv()
localcsv()
localcsv()

elif str(opsi)=="3":
def localenum():
global headers
headers = wsocket
doma()
hacki()
nametag = str(subd) + f"[{frontdom}]-[LOCAL]-[ENUM]"
nametag = "["+str(subd) + f"]-[LOCAL]-[ENUM]"
executor()
uinput()
enum()
localenum()
localenum()

else:
Expand Down

1 comment on commit dd75ad3

@MC874
Copy link
Collaborator Author

@MC874 MC874 commented on dd75ad3 Jun 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed wsocket function name inside loop

Please sign in to comment.