| [ |
| { |
| "file_name": "README.md", |
| "relative_path": "README.md", |
| "extension": ".md", |
| "size_bytes": 1793, |
| "content": "# Toutatis\n\ud83d\udc4b Hi there! For any professional inquiries or collaborations, please reach out to me at:\nmegadose@protonmail.com\n\n\ud83d\udce7 Preferably, use your professional email for correspondence. Let's keep it short and sweet, and all in English!\n\nToutatis is a tool that allows you to extract information from instagrams accounts such as e-mails, phone numbers and more </br>\nFor BTC Donations : 1FHDM49QfZX6pJmhjLE5tB2K6CaTLMZpXZ\n## \ud83d\udca1 Prerequisite\n[Python 3](https://www.python.org/downloads/release/python-370/)\n\n## \ud83d\udee0\ufe0f Installation\n### With PyPI\n\n```pip install toutatis```\n\n### With Github\n\n```bash\ngit clone https://github.com/megadose/toutatis.git\ncd toutatis/\npython3 setup.py install\n```\n\n## \ud83d\udcda Usage:\n\n### Find information from a username\n\n```\ntoutatis -u username -s instagramsessionid\n```\n\n### Find information from an Instagram ID\n\n```\ntoutatis -i instagramID -s instagramsessionid\n```\n\n## \ud83d\udcc8 Example\n\n```\nInformations about : xxxusernamexxx\nFull Name : xxxusernamesxx | userID : 123456789\nVerified : False | Is buisness Account : False\nIs private Account : False\nFollower : xxx | Following : xxx\nNumber of posts : x\nNumber of tag in posts : x\nExternal url : http://example.com\nIGTV posts : x\nBiography : example biography\nPublic Email : public@example.com\nPublic Phone : +00 0 00 00 00 00\nObfuscated email : me********s@examplemail.com\nObfuscated phone : +00 0xx xxx xx 00\n------------------------\nProfile Picture : https://scontent-X-X.cdninstagram.com/\n```\n\n## \ud83d\udcda To retrieve the sessionID\n\n\n## Thank you to :\n\n- [EyupErgin](https://github.com/eyupergin)\n- [yazeed44](https://github.com/yazeed44)\n" |
| }, |
| { |
| "file_name": "SECURITY.md", |
| "relative_path": "SECURITY.md", |
| "extension": ".md", |
| "size_bytes": 619, |
| "content": "# Security Policy\n\n## Supported Versions\n\nUse this section to tell people about which versions of your project are\ncurrently being supported with security updates.\n\n| Version | Supported |\n| ------- | ------------------ |\n| 5.1.x | :white_check_mark: |\n| 5.0.x | :x: |\n| 4.0.x | :white_check_mark: |\n| < 4.0 | :x: |\n\n## Reporting a Vulnerability\n\nUse this section to tell people how to report a vulnerability.\n\nTell them where to go, how often they can expect to get an update on a\nreported vulnerability, what to expect if the vulnerability is accepted or\ndeclined, etc.\n" |
| }, |
| { |
| "file_name": "setup.py", |
| "relative_path": "setup.py", |
| "extension": ".py", |
| "size_bytes": 831, |
| "content": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='toutatis',\n version=\"1.31\",\n packages=find_packages(),\n author=\"megadose\",\n install_requires=[\"argparse\",\"requests\",\"phonenumbers\",\"pycountry\"],\n description=\"It is a tool written to retrieve private information such as Phone Number, Mail Address, ID on Instagram accounts via API.\",\n long_description=\"It is a tool written to retrieve private information such as Phone Number, Mail Address, ID on Instagram accounts via API.\",\n include_package_data=True,\n url='http://github.com/megadose/toutatis',\n entry_points = {'console_scripts': ['toutatis = toutatis.core:main']},\n classifiers=[\n \"Programming Language :: Python\",\n \"License :: OSI Approved :: GNU General Public License v3 (GPLv3)\",\n ],\n)\n" |
| }, |
| { |
| "file_name": "CODE_OF_CONDUCT.md", |
| "relative_path": "CODE_OF_CONDUCT.md", |
| "extension": ".md", |
| "size_bytes": 5525, |
| "content": "\n# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the overall\n community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or advances of\n any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email address,\n without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n[`megadose@protonmail.com`](mailto:megadose@protonmail.com).\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][Mozilla CoC].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[Mozilla CoC]: https://github.com/mozilla/diversity\n[FAQ]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n" |
| }, |
| { |
| "file_name": "__init__.py", |
| "relative_path": "toutatis/__init__.py", |
| "extension": ".py", |
| "size_bytes": 28, |
| "content": "from toutatis.core import *\n" |
| }, |
| { |
| "file_name": "core.py", |
| "relative_path": "toutatis/core.py", |
| "extension": ".py", |
| "size_bytes": 6444, |
| "content": "import argparse\nimport requests\nfrom urllib.parse import quote_plus\nfrom json import dumps, decoder\n\nimport phonenumbers\nfrom phonenumbers.phonenumberutil import (\n region_code_for_country_code,\n region_code_for_number,\n)\nimport pycountry\n\n\ndef getUserId(username, sessionsId):\n headers = {\"User-Agent\": \"iphone_ua\", \"x-ig-app-id\": \"936619743392459\"}\n api = requests.get(\n f'https://i.instagram.com/api/v1/users/web_profile_info/?username={username}',\n headers=headers,\n cookies={'sessionid': sessionsId}\n )\n try:\n if api.status_code == 404:\n return {\"id\": None, \"error\": \"User not found\"}\n\n id = api.json()[\"data\"]['user']['id']\n return {\"id\": id, \"error\": None}\n\n except decoder.JSONDecodeError:\n return {\"id\": None, \"error\": \"Rate limit\"}\n\n\ndef getInfo(search, sessionId, searchType=\"username\" or \"id\"):\n if searchType == \"username\":\n data = getUserId(search, sessionId)\n if data[\"error\"]:\n return data\n userId = data[\"id\"]\n else:\n try:\n userId = str(int(search))\n except ValueError:\n return {\"user\": None, \"error\": \"Invalid ID\"}\n\n try:\n response = requests.get(\n f'https://i.instagram.com/api/v1/users/{userId}/info/',\n headers={'User-Agent': 'Instagram 64.0.0.14.96'},\n cookies={'sessionid': sessionId}\n )\n if response.status_code == 429:\n return {\"user\": None, \"error\": \"Rate limit\"}\n\n response.raise_for_status()\n\n info_user = response.json().get(\"user\")\n if not info_user:\n return {\"user\": None, \"error\": \"Not found\"}\n\n info_user[\"userID\"] = userId\n return {\"user\": info_user, \"error\": None}\n\n except requests.exceptions.RequestException:\n return {\"user\": None, \"error\": \"Not found\"}\n\n\ndef advanced_lookup(username):\n \"\"\"\n Post to get obfuscated login infos\n \"\"\"\n data = \"signed_body=SIGNATURE.\" + quote_plus(dumps(\n {\"q\": username, \"skip_recovery\": \"1\"},\n separators=(\",\", \":\")\n ))\n api = requests.post(\n 'https://i.instagram.com/api/v1/users/lookup/',\n headers={\n \"Accept-Language\": \"en-US\",\n \"User-Agent\": \"Instagram 101.0.0.15.120\",\n \"Content-Type\": \"application/x-www-form-urlencoded; charset=UTF-8\",\n \"X-IG-App-ID\": \"124024574287414\",\n \"Accept-Encoding\": \"gzip, deflate\",\n \"Host\": \"i.instagram.com\",\n # \"X-FB-HTTP-Engine\": \"Liger\",\n \"Connection\": \"keep-alive\",\n \"Content-Length\": str(len(data))\n },\n data=data\n )\n\n try:\n return ({\"user\": api.json(), \"error\": None})\n except decoder.JSONDecodeError:\n return ({\"user\": None, \"error\": \"rate limit\"})\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('-s', '--sessionid', help=\"Instagram session ID\", required=True)\n group = parser.add_mutually_exclusive_group(required=True)\n group.add_argument('-u', '--username', help=\"One username\")\n group.add_argument('-i', '--id', help=\"User ID\")\n args = parser.parse_args()\n\n sessionsId = args.sessionid\n search_type = \"id\" if args.id else \"username\"\n search = args.id or args.username\n infos = getInfo(search, sessionsId, searchType=search_type)\n if not infos.get(\"user\"):\n exit(infos[\"error\"])\n\n infos = infos[\"user\"]\n\n print(\"Informations about : \" + infos[\"username\"])\n print(\"userID : \" + infos[\"userID\"])\n print(\"Full Name : \" + infos[\"full_name\"])\n print(\"Verified : \" + str(infos['is_verified']) + \" | Is buisness Account : \" + str(\n infos[\"is_business\"]))\n print(\"Is private Account : \" + str(infos[\"is_private\"]))\n print(\n \"Follower : \" + str(infos[\"follower_count\"]) + \" | Following : \" + str(infos[\"following_count\"]))\n print(\"Number of posts : \" + str(infos[\"media_count\"]))\n # print(\"Number of tag in posts : \"+str(infos[\"following_tag_count\"]))\n if infos[\"external_url\"]:\n print(\"External url : \" + infos[\"external_url\"])\n print(\"IGTV posts : \" + str(infos[\"total_igtv_videos\"]))\n print(\"Biography : \" + (f\"\"\"\\n{\" \" * 25}\"\"\").join(infos[\"biography\"].split(\"\\n\")))\n print(\"Linked WhatsApp : \" + str(infos[\"is_whatsapp_linked\"]))\n print(\"Memorial Account : \" + str(infos[\"is_memorialized\"]))\n print(\"New Instagram user : \" + str(infos[\"is_new_to_instagram\"]))\n\n if \"public_email\" in infos.keys():\n if infos[\"public_email\"]:\n print(\"Public Email : \" + infos[\"public_email\"])\n\n if \"public_phone_number\" in infos.keys():\n if str(infos[\"public_phone_number\"]):\n phonenr = \"+\" + str(infos[\"public_phone_country_code\"]) + \" \" + str(infos[\"public_phone_number\"])\n try:\n pn = phonenumbers.parse(phonenr)\n countrycode = region_code_for_country_code(pn.country_code)\n country = pycountry.countries.get(alpha_2=countrycode)\n phonenr = phonenr + \" ({}) \".format(country.name)\n except: # except what ??\n pass # pass what ??\n print(\"Public Phone number : \" + phonenr)\n\n other_infos = advanced_lookup(infos[\"username\"])\n\n if other_infos[\"error\"] == \"rate limit\":\n print(\"Rate limit please wait a few minutes before you try again\")\n\n elif \"message\" in other_infos[\"user\"].keys():\n if other_infos[\"user\"][\"message\"] == \"No users found\":\n print(\"The lookup did not work on this account\")\n else:\n print(other_infos[\"user\"][\"message\"])\n\n else:\n if \"obfuscated_email\" in other_infos[\"user\"].keys():\n if other_infos[\"user\"][\"obfuscated_email\"]:\n print(\"Obfuscated email : \" + other_infos[\"user\"][\"obfuscated_email\"])\n else:\n print(\"No obfuscated email found\")\n\n if \"obfuscated_phone\" in other_infos[\"user\"].keys():\n if str(other_infos[\"user\"][\"obfuscated_phone\"]):\n print(\"Obfuscated phone : \" + str(other_infos[\"user\"][\"obfuscated_phone\"]))\n else:\n print(\"No obfuscated phone found\")\n print(\"-\" * 24)\n print(\"Profile Picture : \" + infos[\"hd_profile_pic_url_info\"][\"url\"])\n" |
| } |
| ] |