Sponge - Educational IP Logger
Description
Sponge is an open-source IP logger designed specifically for educational purposes. Upon a user's entry to your website, Sponge captures their IP address and sends it as an embed through a webhook. This tool serves as an educational resource, allowing users to explore and understand IP logging concepts in a controlled environment. Please note that Sponge is intended solely for educational use and should be used responsibly and in compliance with applicable laws and regulations.
Table of Contents
Features
Sponge offers three key features that make it valuable:
-
IP Logging and Discord Integration: Sponge logs user IP addresses and can send them to a Discord channel using Webhook.
-
Open Source and Community-Driven: As an open-source project, Sponge encourages collaboration and allows the community to contribute, improving the tool based on needs.
-
Flexibility and Customization: Sponge offers flexibility for users to customize the code, and Upgrade the user interface to meet their specific requirements.
Usage
Tutorial: Adding JavaScript code and Webhook Integration
In this tutorial, we will walk through the process of adding an Internal JavaScript IP-Logger code to your HTML file and integrating a webhook to log the IPs. We will use a JavaScript code called Sponge.js from the GitHub repository. Follow the steps below to incorporate it into your "index.html" file and set up the webhook integration.
index.html
Step 1: Open Open your index.html
file, which represents the main page of your website, in a text editor or integrated development environment (IDE) of your choice.
<head>
Tag
Step 2: Locate the In your index.html
file, find the <head>
tag. It typically appears near the top of the HTML file, right after the opening <html>
tag. The <head>
tag is used to define meta-information about your web page.
Sponge.js Script
Step 3: Add theInside the <head>
tag, add a new line to insert the script tag for the Sponge.js code. The script tag is used to link an internal JavaScript code to your HTML file. Enter the following code:
<script>
Here you enter the Sponge.js code.
</script>
Step 4: Create a Webhook
- Click on "Channel Settings" in your desired platform or application.
- Go to "Integrations" and select "Create a New Webhook".
- Rename the webhook and update the profile picture if desired.
- Copy the generated URL for the webhook.
Final Step: Update the Webhook URL
- Navigate back to the Sponge.js code that you entered in the
<head>
tag as a script. - Locate the part of the code that references the webhook URL.
- Replace the existing URL with the URL you copied in Step 4.
- Save the changes and let's Test if it works!
Developers Section
Whitelist IPs
Description: With the Whitelist IPs feature, you can block specific IP addresses from being logged or shown in Sponge.js. This provides an additional layer of control over the IP logs, allowing you to exclude certain IPs, such as your own, from being displayed.
One Person
function getDescription(ip) {
// Check if the input IP address is equal to the value of the IP address you entered below
if (ip === 'ENTER YOUR IP ADDRESS HERE') {
// If the input IP matches the predefined secure IP, return "Secured IP"
return "Secured IP";
} else {
// If the IP does not match any of the predefined secure IP addresses, return it as Diffrent user.
return ip;
}
}
Multiple People
function getDescription(ip) {
// Check if the input IP address is equal to the value of your IP address
if (ip === 'YOUR IP ADDRESS') {
// If the input IP matches your IP address, return "Secured IP"
return "Secured IP";
} else if (ip === 'FRIENDS IP ADDRESS') {
// Check if the input IP address is equal to the value of your friend's IP address
// If the input IP matches your friend's IP address, return "Secured IP"
return "Secured IP";
} else if (ip === 'FRIENDS IP ADDRESS') {
// Check if the input IP address is equal to the value of your friend's IP address
// If the input IP matches your friend's IP address, return "Secured IP"
return "Secured IP";
} else {
// If the IP does not match any of the predefined secure IP addresses, return it as Diffrent user.
return ip;
}
}
Decorate embed
The Embed Scripts let you effortlessly customize and modify embeds for the Logs. With these scrips, you can easily edit the appearance and content of embeds without the need for a step-by-step tutorial. However, it is recommended to have some coding experience to make the most of this tool.
Fields
fields: [
{
name: 'IP Address',
value: `**${getDescription(ip)}**`,
inline: true
},
{
name: 'Idk',
value: 'Test',
inline: true
},
{
name: 'USAGE',
value: '*Educational purposes!*',
inline: true // Inline means, if the Text should appear beside the others, At 3 a new lines will be Created.
}
]
Bottom Image
By incorporating a bottom image, you have the power to enhance the design of your embed, elevating its visual appeal to new heights!
image: {
url: 'https://cdn.discordapp.com/attachments/1124927704655999098/1125089283896791131/10x-featured-social-media-image-size.png'
}
Second embed
With this script, you can effortlessly create a second embed below your first embed, allowing you to add interactive elements such as clickable buttons. Enhance the user experience and provide additional functionality with just a few lines of code!
{
title: 'Second Embed',
description: 'This is the second embed with only a title and footer.',
footer: {
text: `footer`
},
color: 65280
}
Linked Text
This code snippet allows you to learn how to create linked text. For instance, I have used it in the fields code as an example.
{
name: 'Button',
value: '[Click me!](https://www.google.com)',
inline: true
}
License
This project is licensed under the MIT License.