{"id":13375176,"url":"https://github.com/spacehuhn/arduinopcap","last_synced_at":"2025-04-05T02:12:22.802Z","repository":{"id":49758849,"uuid":"94319124","full_name":"spacehuhn/ArduinoPcap","owner":"spacehuhn","description":"A library for creating and sending .pcap files for Wireshark and other programms.","archived":false,"fork":false,"pushed_at":"2024-03-03T15:26:50.000Z","size":71,"stargazers_count":437,"open_issues_count":15,"forks_count":93,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-29T01:14:45.468Z","etag":null,"topics":["adruino","esp32","esp8266","library","pcap","wireshark"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacehuhn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-14T10:29:34.000Z","updated_at":"2025-03-27T04:34:06.000Z","dependencies_parsed_at":"2024-01-05T20:59:15.803Z","dependency_job_id":"62992d51-ff32-4b8a-a3f2-b87dd98da223","html_url":"https://github.com/spacehuhn/ArduinoPcap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacehuhn%2FArduinoPcap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacehuhn%2FArduinoPcap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacehuhn%2FArduinoPcap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacehuhn%2FArduinoPcap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacehuhn","download_url":"https://codeload.github.com/spacehuhn/ArduinoPcap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"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":["adruino","esp32","esp8266","library","pcap","wireshark"],"created_at":"2024-07-30T05:01:31.819Z","updated_at":"2025-04-05T02:12:22.782Z","avatar_url":"https://github.com/spacehuhn.png","language":"C++","funding_links":[],"categories":["\u003ca id=\"f13469c9891173804423be4403b2c4ff\"\u003e\u003c/a\u003epcap"],"sub_categories":["\u003ca id=\"eb49514924c3f4bf2acf6f3a4436af13\"\u003e\u003c/a\u003e未分类"],"readme":"# ArduinoPcap\nCreate and send .pcap files using ESP8266/ESP32 and Arduino.\n\n[![Sniffing WiFi with ESP32 \u0026 ESP8266 in Wireshark](https://img.youtube.com/vi/3Ac6X6ZBQ0g/0.jpg)](https://www.youtube.com/watch?v=3Ac6X6ZBQ0g)  \n\n## Please Note\n\nThis is a proof of concept! The included examples are only for ESP8266 and ESP32, but the library can be used for other Arduinos as well. The packet output in the examples is unfiltered and maybe malformed, **errors can occur!**  \n\nAlso a big thanks to [xdavidhu](http://github.com/xdavidhu) for writing the python script to connect to Wireshark!  \n\n## Installation\n\nDownload this project and extract the .zip file to the Arduino `libraries` folder.  \nFor more information please read [Installing Additional Arduino Libraries](https://www.arduino.cc/en/Guide/Libraries).  \n\n### Dependencies\n\n**If you don't use an ESP32, you will need the [SdFat](https://github.com/greiman/SdFat) library.**\n\nFollowing Arduino libraries are required for the included examples:\n- [Arduino Time Library](https://github.com/PaulStoffregen/Time) (for all examples)  \n- [ESP8266](https://github.com/esp8266/Arduino) (for the `esp8266_*` examples)  \n- [ESP32](https://github.com/espressif/arduino-esp32) (for the `esp32_*` examples)  \n\nFor the Serialshark script (the script located in `extras`):\n  - [python3](https://www.python.org/downloads/)\n  - [pyserial](https://github.com/pyserial/pyserial)  \n  - [Wireshark](https://www.wireshark.org/#download)\n\n**Please be aware that the Serialshark script doesn't work on Windows!**\n\n## Usage\n\n### General\n\nTo open one of the examples open Arduino and go to `File`\u003e`Examples`\u003e`Arduino Pcap`.  \nYou might want to adjust the settings in the sketch (settings may be different depending on the example):  \n```\n//===== SETTINGS =====//\n#define CHANNEL 1\n#define FILENAME \"esp8266\"\n#define SAVE_INTERVAL 30 //save new file every 30s\n#define CHANNEL_HOPPING true //if true it will scan on all channels\n#define MAX_CHANNEL 11 //(only necessary if channelHopping is true)\n#define HOP_INTERVAL 214 //in ms (only necessary if channelHopping is true)\n```\n\nAlso note that when you use the ESP8266 most packets will be malformed or cut off at the end.  \nI don't know why the promiscuous mode returns this mostly false data, but it's still good enough to get some MAC addresses and SSIDs. I used it successfully in various projects to [detect deauthentication packets](https://github.com/spacehuhn/DeauthDetector), [scan for client devices](https://github.com/spacehuhn/esp8266_deauther) and build a low cost WiFi [packet monitor](https://github.com/spacehuhn/PacketMonitor).  \nBut if you want something more reliable then have a look at the ESP32, its promiscuous mode is working way better.  \n\n### Live capture using Wireshark\n\nYou also live capture the packets in Wireshark over the serial connection!  \nFor that be sure to have everything installed - see [Dependencies](#dependencies).  \n\nFlash your device and be sure it is connected.  \nThen start the `SerialShark.py` (it's in the `extras` folder) with `python3 SerialShark.py`.  \nIt will ask you about about the serial port (you have to find that out), the baud rate (be sure it's the same as in your sketch) and where to save the pcap file (wherever you want).  \n\nThe baudrate for the ESP32 example is `921600`. The baudrate for the ESP8266 example is `115200`.  \n\n### Saving onto a SD-Card\n\nFor that you will need a SD-Card (obviously). You can connect it directly to the ESP8266/ESP32, but I recommend buying a SD-Card module/shield. Wire up the SPI connection (MOSI,MISO,SCL,CS,GND,VCC) to your module and basically you are ready to go!  \n[If you don't know which pins to connect to which, just search for a pinout picture of your module]  \n\nThe included examples will save a new .pcap file every 30s. If you open the serial monitor in Arduino (baudrate is 115200), you will get some more information.  \n\n## License\n\nThis project is licensed under the MIT License - see the [license file](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacehuhn%2Farduinopcap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacehuhn%2Farduinopcap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacehuhn%2Farduinopcap/lists"}