{"id":18718791,"url":"https://github.com/denis-source/sniffer_eng","last_synced_at":"2025-11-10T16:30:20.683Z","repository":{"id":136600756,"uuid":"322086142","full_name":"Denis-Source/sniffer_eng","owner":"Denis-Source","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-29T11:47:44.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T11:12:09.911Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Denis-Source.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-16T19:49:15.000Z","updated_at":"2022-05-17T10:51:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fa5d922-1172-45b5-b828-ff53c3fc438c","html_url":"https://github.com/Denis-Source/sniffer_eng","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/Denis-Source%2Fsniffer_eng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denis-Source%2Fsniffer_eng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denis-Source%2Fsniffer_eng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denis-Source%2Fsniffer_eng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Denis-Source","download_url":"https://codeload.github.com/Denis-Source/sniffer_eng/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581759,"owners_count":19662960,"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-07T13:23:01.852Z","updated_at":"2025-11-10T16:30:20.644Z","avatar_url":"https://github.com/Denis-Source.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sniffer_eng\nCaptures IPv4 packets, displays its contents and information\n\n## Installation\n\nClone repository:\n```shell\ngit clone https://github.com/Denis-Source/sniffer_eng\ncd sniffer_eng\n```\nThe application does not use any of the 3rd party modules and relies entirely on builtins libraries:\n- socket (http\\s interfaces);\n- struct: (byte packet decoding);\n- time.\n\nTo start the application, simply run `main.py` file:\n```shell\npython main.py\n```\n\u003e **IT IS IMPORTANT** to run the application with administrative privileges!\n\n## Showcase\nWhen run in the default configuration, the application has the following output:\n```shell\nSniffing DESKTOP-123ABCDE at 192.168.1.99:\n\nEthernet Packet: #1\nTime: Tue May 17 14:39:44 2020\nTTL: 128 Protocol: TCP\nSource: 192.168.1.99:12345, Destination: 8.8.8.8:53\nFlags: urg: 1, ack: 0, fsh: 1, rst 0, syn: 0, fin: 0\nData: \n97 2F 00 56 7C BF 24 9E 3D 19 C1 46 15 95 93 16 B7 16 E4 15 D0 F0 7E E4 1B E0 86 06 C8 53 AC 2D 5C 14 FF 0A 8E C2 A0 87 \n39 F4 10 A8 59 AC 30 7A FF 4A 42 09 DF 59 EA AD 20 EB 9C 18 35 67 66 D4 0C 32 85 29 C0 87 F9 EC 24 1F F7 4E 42 A0 FA F7 \n2B AF 1E 27 10 C1 33 CD F1 9D 1D F8 68 66 24 A8 41 5E 33 14 06 3C F5 B4 3F A8 06 26 2C D8 B4 8F 52 FA 09 CA 1C ED 20 E0 \n7D F4 89 FE C6 18 DE 09 D1 \n```\n\nThe output has the following information:\n- Packet serial number: `Ethernet Packet: #1`;\n- [ASCII time format](https://docs.python.org/3/library/time.html#time.asctime): `Time: Tue May 17 14:39:44 2020`;\n- Time to live and protocol name: `TTL: 128 Protocol: TCP`;\n- Flag information: `Flags: urg: 1, ack: 0, fsh: 1, rst 0, syn: 0, fin: 0`.\n\nFor an example, there are the following flags:\n- The urgent flag (sets the priority of the packet);\n- The acknowledgment flag is used to acknowledge the successful receipt of a packet;\n- The push flag is somewhat similar to the URG flag and tells the receiver to process these packets as they are received instead of buffering them;\n- The reset flag gets sent from the receiver to the sender when a packet is sent to a particular host that was not expecting it;\n- The synchronisation flag is used to initiate a connection between two hosts. It should be set only in the first packet of both the initiator and the receiver;\n- The finished flag means there is no more data from the sender. Therefore, it is used in the last packet sent from the sender.\n\nData is displayed in hexadecimal format:\n```\n97 2F 00 56 7C BF 24 9E 3D 19 C1 46 1...\n```\n\n## Class methods\n\nThe main class, `Sniffer` has the following listening methods:\nReturns the first captured packet:\n```python\nsniff_once()\n```\n`to_print` flag to display captured packet in the console.\n\nCaptures wether the specified amount of packets or indefenetly:\n```python\nsniff()\n```\n`num_of_packets` desired number of captured packets;\n\n`to_print` flag to display the captured packet on the console;\n\n`is_inf` flag to capture packets indefinitely.\n\nSaves packets in the specified file:\n```python\nsave_packets()\n```\n\n`file_name` name of the file to store the captured packets;\n\n`num_of_packets` desired number of captured packets;\n\n`to_print` flag to display the captured packet on the console;\n\n`is_inf` flag to capture packets indefinitely.\n\nDisplays visited urls:\n```python\nseek_domains()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenis-source%2Fsniffer_eng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenis-source%2Fsniffer_eng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenis-source%2Fsniffer_eng/lists"}