mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-01 22:16:41 +00:00
new roadmap with crawler and simplex chatrooms and servers
This commit is contained in:
parent
e7a2ad4a0c
commit
95a3af2a90
4 changed files with 125 additions and 2 deletions
32
SimpleX/main.py
Normal file
32
SimpleX/main.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
from websockets.sync.client import connect
|
||||
import json
|
||||
import random
|
||||
|
||||
|
||||
|
||||
def is_simplex_link_valid(simplex_link: str) -> bool:
|
||||
"""
|
||||
Connects to the group using the `simplex_link`. If the response contains error False will be returned else True.
|
||||
"""
|
||||
with connect("ws://localhost:3030") as websocket:
|
||||
query = f"/c incognito {simplex_link}"
|
||||
command = {
|
||||
'corrId': f"id{random.randint(0,999999)}",
|
||||
'cmd': query,
|
||||
}
|
||||
websocket.send(json.dumps(command))
|
||||
message = websocket.recv()
|
||||
response = json.loads(message)
|
||||
response_type = response['resp']['type']
|
||||
# print(response)
|
||||
if 'error' in response_type.lower():
|
||||
return False
|
||||
elif 'deleted' in response_type.lower():
|
||||
return False
|
||||
|
||||
print('[+] Success!',response_type)
|
||||
return True
|
||||
|
||||
if __name__ == '__main__':
|
||||
sxclink='https://simplex.chat/contact#/?v=2-7&smp=smp%3A%2F%2FBD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI%3D%40b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion%2F4woLIDlpkvXRvZmaAiWA802OwiyxekdJ%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEAzIAoE-OWDqFJXMqgunIWHPpE_u7e52Wtu8TioPc1QwI%253D&data=%7B%22groupLinkId%22%3A%22Srr1_MNob7WfPTQIY-ug5Q%3D%3D%22%7D'
|
||||
is_simplex_link_valid(sxclink)
|
Loading…
Add table
Add a link
Reference in a new issue