-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
85 lines (78 loc) · 2.79 KB
/
main.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
# Copyright (c) 2024 sigmaphoned All rights reserved.
# GitHub: github.com/sigmaphoned
import requests
import os
import platform
from colorama import Fore
saves = "saves.txt"
link = "https://fragment.com/username/"
banner = f"""
{Fore.RED}made by sigmaphoned
"""
# Funzione check_user
def check_user(username):
username = username.strip()
r = requests.get(f"https://fragment.com/username/{username}", allow_redirects=False)
response = str(r.text).split('\n')
if len(response) != 1:
print(f"{Fore.GREEN}[+]{Fore.RESET} {username} is available for purchase on fragment.com")
else:
print(f"{Fore.RED}[-]{Fore.RESET} {username} is not available for purchase on fragment.com")
# Below saves usernames NOT available for purchase in a file
saves_file = open(saves, "a")
saves_file.write(f"[-] {username}\n")
saves_file.close()
# Funzione Main
# Libraries
import requests
import os
import platform
from colorama import Fore
# Variables
saves = "saves.txt"
link = "https://fragment.com/username/"
banner = f"""
{Fore.RED}made by sigmaphoned
"""
# Function to check user
def check_user(username):
username = username.strip()
r = requests.get(f"https://fragment.com/username/{username}", allow_redirects=False)
response = str(r.text).split('\n')
if len(response) != 1:
print(f"{Fore.GREEN}[+]{Fore.RESET} {username} is available for purchase on fragment.com")
else:
print(f"{Fore.RED}[-]{Fore.RESET} {username} is not available for purchase on fragment.com")
# Below saves usernames NOT available for purchase in a file
saves_file = open(saves, "a")
saves_file.write(f"[-] {username}\n")
saves_file.close()
# Main function
def main():
if "linux" in str(platform.platform()).lower():
os.system("clear")
else:
os.system("cls")
print(banner)
wordlist = input(f"{Fore.RESET}[>>] Enter the name of the wordlist file {Fore.GREEN}wordlist{Fore.RESET} -> ")
try:
wordlist_file = open(wordlist, "r")
print(f"{Fore.RESET}[>>] File {wordlist} {Fore.GREEN}loaded{Fore.RESET}!")
try:
saves_file = open(saves, "r+")
print(f"{Fore.RESET}[>>] File {saves} {Fore.GREEN}loaded{Fore.RESET}!")
saves_file.truncate(0)
saves_file.close()
pass
except FileNotFoundError:
saves_file = open(saves, "w")
print(f"{Fore.RESET}[>>] File {saves} {Fore.GREEN}created{Fore.RESET}!")
saves_file.close()
except FileNotFoundError:
print(f"{Fore.RESET}[>>] File {wordlist} {Fore.RED}not found{Fore.RESET}!")
exit()
print()
for username in wordlist_file.readlines():
check_user(username.lower())
if __name__ == "__main__":
main()