parent
728e61de11
commit
6b2a802295
4 changed files with 192 additions and 4 deletions
Binary file not shown.
@ -0,0 +1,181 @@ |
|||||||
|
import random |
||||||
|
import subprocess |
||||||
|
from getopt import getopt |
||||||
|
from sys import argv |
||||||
|
from time import sleep |
||||||
|
|
||||||
|
from arangodb import db, get_profile, remove_profile |
||||||
|
|
||||||
|
|
||||||
|
def profile_generator(db, n): |
||||||
|
|
||||||
|
cursor = db.aql.execute( |
||||||
|
""" |
||||||
|
FOR doc IN @@col |
||||||
|
FILTER doc._to == 'members/krisjohngethin' |
||||||
|
RETURN doc._from |
||||||
|
""", |
||||||
|
bind_vars={"@col": "picture_reactions"}, |
||||||
|
) |
||||||
|
|
||||||
|
count = 0 |
||||||
|
first_names = [] |
||||||
|
last_names = [] |
||||||
|
n = int(n) + 1 |
||||||
|
for doc in cursor: |
||||||
|
name = db.collection("members").get(doc)["name"] |
||||||
|
first_names.append(name[: name.find(" ")]) |
||||||
|
last_names.append(name[name.rfind(" ") :]) |
||||||
|
|
||||||
|
with open("../data/passwords.txt") as f: |
||||||
|
words = [word for word in f.readlines()] |
||||||
|
|
||||||
|
with open("../data/servers.txt") as f: |
||||||
|
servers = [] |
||||||
|
for line in f.readlines(): |
||||||
|
if "@" in line: |
||||||
|
line = line.strip() |
||||||
|
city = line[: line.find("@")].strip() |
||||||
|
|
||||||
|
if "WireGuard" in line and line.strip()[:2] in [ |
||||||
|
"gb", |
||||||
|
"us", |
||||||
|
]: # "au", "ca" #För senare när det behövs |
||||||
|
line = line.strip() |
||||||
|
country_short = line[:2] |
||||||
|
server = line[: line.find("-")] |
||||||
|
city_short = city[city.find("(") + 1 : city.find(")")] |
||||||
|
server_name = [country_short, city_short, server + "-wireguard"] |
||||||
|
servers.append( |
||||||
|
{ |
||||||
|
"server_city": city, |
||||||
|
"server": server + "-wg.socks5.mullvad.net:1080", |
||||||
|
"server_connect": server_name, |
||||||
|
} |
||||||
|
) |
||||||
|
|
||||||
|
count = 0 |
||||||
|
for i in range(0, n - 1): |
||||||
|
name = ( |
||||||
|
first_names[random.randrange(0, len(first_names), 1)].strip() |
||||||
|
+ " " |
||||||
|
+ last_names[random.randrange(0, len(last_names), 1)].strip() |
||||||
|
) |
||||||
|
print(name, end="\r") |
||||||
|
sleep(0.1) |
||||||
|
year = str(random.randrange(74, 90)) |
||||||
|
email = name.lower().replace(" ", ".") + year + "@outlook.com" |
||||||
|
pwd = "" |
||||||
|
for _ in range(0, random.randrange(3, 6)): |
||||||
|
w = words[random.randrange(0, 10000, 1)].strip() |
||||||
|
if random.randrange(0, 3) == 0: |
||||||
|
w = w.upper() |
||||||
|
pwd = pwd + "_" + w |
||||||
|
pwd = pwd.strip("_") + str(random.randrange(5, 35)) |
||||||
|
server_info = servers.pop(random.randrange(0, len(servers))) |
||||||
|
server = server_info["server"].strip() |
||||||
|
birthday = f"{year}-{random.randrange(1, 13)}-{random.randrange(1, 30)}" |
||||||
|
_key = server[: server.find("-")] |
||||||
|
doc = { |
||||||
|
"_id": "profiles/" + _key, |
||||||
|
"_key": _key, |
||||||
|
"name": name, |
||||||
|
"email": email, |
||||||
|
"pwd": pwd, |
||||||
|
"server": server, |
||||||
|
"server_connect": server_info["server_connect"], |
||||||
|
"birthday": birthday, |
||||||
|
"created": False, |
||||||
|
"in_use": False, |
||||||
|
} |
||||||
|
# Skriv till databasen (skriver inte profiler med servarar som redan används) |
||||||
|
try: |
||||||
|
db.insert_document("profiles", doc) |
||||||
|
count += 1 |
||||||
|
except: |
||||||
|
pass |
||||||
|
|
||||||
|
print(f"Skrev {count} profiler till databasen. ") |
||||||
|
|
||||||
|
|
||||||
|
def mullvad(server): |
||||||
|
""" Anslut till Mullvad-server. """ |
||||||
|
subprocess.run( |
||||||
|
[ |
||||||
|
"mullvad", |
||||||
|
"relay", |
||||||
|
"set", |
||||||
|
"location", |
||||||
|
server[0], |
||||||
|
server[1], |
||||||
|
server[2], |
||||||
|
] |
||||||
|
) |
||||||
|
connect_to_mullvad = subprocess.Popen(["mullvad", "connect"]) |
||||||
|
connect_to_mullvad.wait() |
||||||
|
sleep(3) |
||||||
|
|
||||||
|
def create_profile(): |
||||||
|
""" Supports during the creation of a profile """ |
||||||
|
|
||||||
|
arango_server = ["se", "sto", "se2-wireguard"] |
||||||
|
|
||||||
|
while True: |
||||||
|
mullvad(arango_server) |
||||||
|
|
||||||
|
# Hämta profil |
||||||
|
profile = get_profile(created=False) |
||||||
|
|
||||||
|
# Asnlut till profilens VPN-server |
||||||
|
mullvad(profile["server_connect"]) |
||||||
|
|
||||||
|
# Öppna Brave med Outlook och Facebook |
||||||
|
subprocess.run(["open", "-a", "Brave Browser", "https://outlook.com"]) |
||||||
|
|
||||||
|
# Printa användaruppgfifter för Outlook och Facebook |
||||||
|
print() |
||||||
|
print(profile["email"][: profile["email"].find("@")]) |
||||||
|
print(profile["pwd"]) |
||||||
|
print(profile["birthday"]) |
||||||
|
print(profile["name"]) |
||||||
|
|
||||||
|
print() |
||||||
|
print() |
||||||
|
print(profile["name"]) |
||||||
|
print(profile["email"]) |
||||||
|
print(profile["pwd"]) |
||||||
|
print(profile["birthday"]) |
||||||
|
|
||||||
|
user_input = input("Done/Next/Delete/Quit: ") |
||||||
|
user_input = user_input.lower() |
||||||
|
|
||||||
|
if user_input in ["done", "d", ""]: |
||||||
|
subprocess.run(["osascript", "-e", 'quit app "Brave Browser"']) |
||||||
|
sleep(1) |
||||||
|
profile["created"] = True |
||||||
|
mullvad(arango_server) |
||||||
|
db.update_document(profile) |
||||||
|
|
||||||
|
elif user_input in ["delete", "d"]: |
||||||
|
subprocess.run(["osascript", "-e", 'quit app "Brave Browser"']) |
||||||
|
sleep(1) |
||||||
|
mullvad(arango_server) |
||||||
|
remove_profile(profile) |
||||||
|
|
||||||
|
elif user_input in ["quit", "q"]: |
||||||
|
subprocess.run(["osascript", "-e", 'quit app "Brave Browser"']) |
||||||
|
sleep(1) |
||||||
|
mullvad(arango_server) |
||||||
|
exit() |
||||||
|
else: |
||||||
|
continue |
||||||
|
|
||||||
|
if __name__ == "__main__": |
||||||
|
argv = argv[1:] |
||||||
|
opts, args = getopt(argv, "cg:", ["create", "generate"]) |
||||||
|
|
||||||
|
for o, a in opts: |
||||||
|
if o in ["-g", "--generate"]: |
||||||
|
profile_generator(db, a) |
||||||
|
if o in ['-c', '--create']: |
||||||
|
create_profile() |
||||||
Loading…
Reference in new issue