This project integrates an AutoPcap plugin
with a Discord bot to automate the capture and analysis of .pcap files.
The AutoPcap plugin enhances Pwngotchi’s capabilities
by automating the upload of captured packets to Discord via a webhook.
Simultaneously, the Discord bot facilitates interaction with Discord servers,
specifically managing messages related to pcap files.
It extracts, decrypts, and analyzes these files,
offering a streamlined workflow for cybersecurity enthusiasts.
The primary aim of this project is to simplify the process of capturing, uploading, and analyzing network traffic for educational and cybersecurity purposes. By automating these tasks, users can focus more on analysis rather than manual processing.
airmon-ng, tshark, editcap, pcapfix.AutoPCAP.py script in the /usr/local/share/pwngotchi/custom-plugins/ directory on your SD card./etc/pwngotchi/config.toml) to enable custom plugins by adding or updating the line:
main.custom_plugins = "/usr/local/share/pwngotchi/custom-plugins/"
Bot.py script in a suitable location on your computer/SD card.Create a config.json file in the plugin’s directory with the following structure:
{
"webhookUrl": "YOUR_DISCORD_WEBHOOK_URL_HERE"
}
Replace "YOUR_DISCORD_WEBHOOK_URL_HERE" with your actual Discord webhook URL.
Discord Bot Creation
intents section are enabled, these are found in the oauth2 section.Account Activation
Configuration
api.json file with your bot’s token, channel IDs, and other necessary configurations as per the instructions below.api.json file located in the project directory. Here’s what you need to know:
channel_id_(for_pcaps): The ID of the channel where pcap files should be sent.channel_id_(for_logs): The ID of the channel where logs should be sent.#0000 for webhook usernames.false.Running the Bot
requirements.txt file using pip.After installation and configuration,
the AutoPcap plugin will automatically capture .pcap files and upload them to Discord
upon detecting handshakes. The plugin logs all activities, aiding in tracking progress and troubleshooting.
The plugin is able to upload pcap files only if connected to the internet.
To do that follow this guide.
Ensure the bot is running in a Linux environment with sudo privileges. Users can interact with the bot by sending messages in the configured channels, triggering responses based on message content and settings.
The bot will generate many types of reactions to respond to various messages that include the pcaps uploaded. As part of its job, if an error occurs a reaction will be generated, and if a pcap has already been cracked, a different reaction will be generated. Here they are:-
The bot is not running in a linux environment.
The bot successfully cracked and uploaded the pcap file.
The bot failed to crack the pcap file.
An unknown return occurred in cracking process
An error with python occurred, cracking failed
An error occurred with discord, processing failed, usually relating to permissions, this is an exception for HTTP errors
An unknown exception was caught, an error that handles the discord bot, occurs if the error is not related to HTTP errors
The whole script failed without any handling, this is unexpected and shouldn’t happen
The bot is handling the pcap currently, will later give it a different reaction
If you encounter any issues, check the following:
config.json file is correctly formatted and contains a valid Discord webhook URL.If you encounter any issues, check the following:
api.json file is correctly formatted and contains valid channel IDs.Here are some common issues and solutions to help you get back on track:-
config.toml file has been correctly updated to include the path to custom plugins.config.json file is correct and active.max_size parameter or implementing a log rotation mechanism.config.json file is correctly formatted and contains a valid Discord webhook URL.AutoPcap.py script with the new version in the /usr/local/share/pwngotchi/custom-plugins/ directory. Restart Pwngotchi to apply changes..pcap files?on_handshake function to filter .pcap files based on criteria such as file size, SSID, or timestamp.Contributions are encouraged! Fork the repository, make changes, and submit pull requests. Contributions to improve functionality, security, and usability are welcomed.
We would appreciate any contributions to the crack function.
Join the Pwngotchi and Discord communities for support, discussions, and feature requests. Active forums and Discord channels offer assistance.
Consider contributing to the project, sharing experiences, or supporting the developers through donations.
This project is licensed under the MIT License. See the LICENSE file for details.
For inquiries, feedback, or contributions, please contact Shahm Najeeb using my email