|
|
|
@ -84,10 +84,12 @@ def to_accs(db, data, info, profiles, vendor, accs="accs"): |
|
|
|
used_accs = used_emails(db, accs) |
|
|
|
used_accs = used_emails(db, accs) |
|
|
|
used_profiles = used_emails(db, profiles) |
|
|
|
used_profiles = used_emails(db, profiles) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n0 = 0 |
|
|
|
|
|
|
|
n1 = 0 |
|
|
|
|
|
|
|
|
|
|
|
for profile in data: |
|
|
|
for profile in data: |
|
|
|
if len(profile) < 3: |
|
|
|
if len(profile) < 3: |
|
|
|
print("\nKlart.\n") |
|
|
|
continue |
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc = {} |
|
|
|
doc = {} |
|
|
|
doc["vendor"] = vendor |
|
|
|
doc["vendor"] = vendor |
|
|
|
@ -97,6 +99,7 @@ def to_accs(db, data, info, profiles, vendor, accs="accs"): |
|
|
|
elif "login" in info: |
|
|
|
elif "login" in info: |
|
|
|
doc["email"] = profile[info.index("login")] |
|
|
|
doc["email"] = profile[info.index("login")] |
|
|
|
if doc["email"] in used_accs or doc["email"] in used_profiles: |
|
|
|
if doc["email"] in used_accs or doc["email"] in used_profiles: |
|
|
|
|
|
|
|
n1 += 1 |
|
|
|
continue |
|
|
|
continue |
|
|
|
doc["name"] = doc["email"] |
|
|
|
doc["name"] = doc["email"] |
|
|
|
if "pwd" in info: |
|
|
|
if "pwd" in info: |
|
|
|
@ -117,35 +120,37 @@ def to_accs(db, data, info, profiles, vendor, accs="accs"): |
|
|
|
for c in cookies.split(";"): |
|
|
|
for c in cookies.split(";"): |
|
|
|
cookie[c[: c.find("=")].strip()] = c[c.find("=") + 1 :].strip() |
|
|
|
cookie[c[: c.find("=")].strip()] = c[c.find("=") + 1 :].strip() |
|
|
|
else: |
|
|
|
else: |
|
|
|
cookies_base64 = cookies.strip() # .strip('=') |
|
|
|
|
|
|
|
# print() |
|
|
|
|
|
|
|
# print(cookies_base64) |
|
|
|
|
|
|
|
# print() |
|
|
|
|
|
|
|
cookies64_bytes = cookies_base64.encode("ascii") |
|
|
|
|
|
|
|
cookies_bytes = base64.b64decode(cookies64_bytes) |
|
|
|
|
|
|
|
# exit() |
|
|
|
|
|
|
|
cookies_str = ( |
|
|
|
|
|
|
|
cookies_bytes.decode("ascii") |
|
|
|
|
|
|
|
.replace("'", '"') |
|
|
|
|
|
|
|
.replace("False", "false") |
|
|
|
|
|
|
|
.replace("True", "true") |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
try: |
|
|
|
try: |
|
|
|
|
|
|
|
cookies_base64 = cookies.strip() # .strip('=') |
|
|
|
|
|
|
|
# print() |
|
|
|
|
|
|
|
# print(cookies_base64) |
|
|
|
|
|
|
|
# print() |
|
|
|
|
|
|
|
cookies64_bytes = cookies_base64.encode("ascii") |
|
|
|
|
|
|
|
cookies_bytes = base64.b64decode(cookies64_bytes) |
|
|
|
|
|
|
|
# exit() |
|
|
|
|
|
|
|
cookies_str = ( |
|
|
|
|
|
|
|
cookies_bytes.decode("ascii") |
|
|
|
|
|
|
|
.replace("'", '"') |
|
|
|
|
|
|
|
.replace("False", "false") |
|
|
|
|
|
|
|
.replace("True", "true") |
|
|
|
|
|
|
|
) |
|
|
|
cookies = json.loads(cookies_str) |
|
|
|
cookies = json.loads(cookies_str) |
|
|
|
except: |
|
|
|
|
|
|
|
|
|
|
|
cookie = {} |
|
|
|
|
|
|
|
if vendor == "159": |
|
|
|
|
|
|
|
for c in cookies["cookies"]: |
|
|
|
|
|
|
|
cookie[c["name"]] = c["value"] |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
for c in cookies: |
|
|
|
|
|
|
|
name = c["name"] |
|
|
|
|
|
|
|
del c["name"] |
|
|
|
|
|
|
|
cookie[name] = c["value"] |
|
|
|
|
|
|
|
doc["cookie"] = cookie |
|
|
|
|
|
|
|
except Exception as e: |
|
|
|
|
|
|
|
print('\n\nFel på cookie.\n', e, '\n') |
|
|
|
for i in profile: |
|
|
|
for i in profile: |
|
|
|
print(i) |
|
|
|
print(i) |
|
|
|
exit() |
|
|
|
continue |
|
|
|
cookie = {} |
|
|
|
|
|
|
|
if vendor == "159": |
|
|
|
|
|
|
|
for c in cookies["cookies"]: |
|
|
|
|
|
|
|
cookie[c["name"]] = c["value"] |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
for c in cookies: |
|
|
|
|
|
|
|
name = c["name"] |
|
|
|
|
|
|
|
del c["name"] |
|
|
|
|
|
|
|
cookie[name] = c["value"] |
|
|
|
|
|
|
|
doc["cookie"] = cookie |
|
|
|
|
|
|
|
else: |
|
|
|
else: |
|
|
|
cookie = {} |
|
|
|
cookie = {} |
|
|
|
if "birthday" in info: |
|
|
|
if "birthday" in info: |
|
|
|
@ -153,7 +158,10 @@ def to_accs(db, data, info, profiles, vendor, accs="accs"): |
|
|
|
if "token" in info: |
|
|
|
if "token" in info: |
|
|
|
doc["token"] = profile[info.index("token")].strip() |
|
|
|
doc["token"] = profile[info.index("token")].strip() |
|
|
|
db.insert_document(accs, doc) |
|
|
|
db.insert_document(accs, doc) |
|
|
|
|
|
|
|
n0 += 1 |
|
|
|
sleep(0.1) |
|
|
|
sleep(0.1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(f'\nInlagda profiler: {n0}\nProfiler redan i db: {n1}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def used_servers(profiles="profiles"): |
|
|
|
def used_servers(profiles="profiles"): |
|
|
|
@ -266,5 +274,6 @@ if __name__ == "__main__": |
|
|
|
host_arango="http://127.0.0.1", |
|
|
|
host_arango="http://127.0.0.1", |
|
|
|
port_arango=port_arango, |
|
|
|
port_arango=port_arango, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
#webshare_proxies() |
|
|
|
|
|
|
|
|
|
|
|
to_accs(db, data, info, profiles, vendor) |
|
|
|
to_accs(db, data, info, profiles, vendor) |
|
|
|
|