{"id":13826559,"url":"https://github.com/kala13x/scap","last_synced_at":"2026-01-30T17:36:49.023Z","repository":{"id":31765507,"uuid":"35331750","full_name":"kala13x/scap","owner":"kala13x","description":"Network Sniffer (Scan and Capture Incoming Packets)","archived":false,"fork":false,"pushed_at":"2021-02-13T21:04:57.000Z","size":74,"stargazers_count":89,"open_issues_count":0,"forks_count":20,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-05T09:15:28.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://off-sec.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kala13x.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}},"created_at":"2015-05-09T14:34:12.000Z","updated_at":"2024-03-08T08:25:13.000Z","dependencies_parsed_at":"2022-08-24T14:11:00.933Z","dependency_job_id":null,"html_url":"https://github.com/kala13x/scap","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/kala13x%2Fscap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kala13x%2Fscap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kala13x%2Fscap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kala13x%2Fscap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kala13x","download_url":"https://codeload.github.com/kala13x/scap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"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-08-04T09:01:40.257Z","updated_at":"2026-01-30T17:36:49.002Z","avatar_url":"https://github.com/kala13x.png","language":"C","funding_links":[],"categories":["\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具","C","C (286)"],"sub_categories":["\u003ca id=\"32739127f0c38d61b14448c66a797098\"\u003e\u003c/a\u003e嗅探\u0026\u0026Sniff"],"readme":"sCap - Version: 1.0 build 31\n----\n\nsCap is open source commandline application project which uses system raw sockets and makes you able to scan, capture and hexdump incoming tcp/udp/icmp traffic without libcap. Software is written for educational purposes and is distributed in the hope that it will be useful for anyone interested in this field.\n\n### Usage\n```\nscap [-i] [-d] [-h]\noptions are:\n -i         # dump header info in file\n -d         # dump data in file\n -h         # print help and usage\n -o filename # export output to PCAP file\n -s ip_src   # filter packets by IP source\n -t ip_dst   # filter packets by IP destination\n -p port_src # filter packets by source port\n               will filter TCP and UDP only\n -q port_src # filter packets by destination port\n               will filter TCP and UDP only\n -l ttl_min  # filter packets by minimun TTL\n -m ttl_max  # filter packets by maximum TTL\n -f frag_min # filter packets by minimum fragment number\n -g frag_max # filter packets by maximun fragment number\n```\n\nWith option -i, you can capture incoming traffic and log ip/udp/tcp/icmp headers in file. If you add option -d, sCap will capture headers and also it will hexdump incoming traffic data in log file. Without those arguments, sCap only counts numbers of incoming packets.\n\n### Installation\nCompilation of this project is possible with Makefile and build script.\n```\ngit clone https://github.com/kala13x/scap.git\ncd scap\nchmod +x build.sh\n./build.sh\n```\nScript will build whole project and move binary file into bin directory of scap project.\n\n### How to use\nsCap requires root access because of binding raw socket. When you launch sCap it only counts numbers of packets, but at the some time you can tail log file to see dumped data. \n\n### Example of log file output\n```\n2015.05.09-20:30:38 - [LIVE] Captured IP Header\n2015.05.09-20:30:38 - [IP] Version : 4\n2015.05.09-20:30:38 - [IP] Header Length : 5 DWORDS or 20 Bytes\n2015.05.09-20:30:38 - [IP] Type Of Service : 40\n2015.05.09-20:30:38 - [IP] Total Length : 83 Bytes(Size of Packet)\n2015.05.09-20:30:38 - [IP] Identification : 4923\n2015.05.09-20:30:38 - [IP] TTL : 53\n2015.05.09-20:30:38 - [IP] Protocol : 6\n2015.05.09-20:30:38 - [IP] Checksum : 46234\n2015.05.09-20:30:38 - [IP] Source IP : 192.30.252.87\n2015.05.09-20:30:38 - [IP] Destination IP : 192.168.0.137\n\n2015.05.09-20:30:38 - [LIVE] Captured TCP Packet\n2015.05.09-20:30:38 - [TCP] Source Port : 443\n2015.05.09-20:30:38 - [TCP] Destination Port : 41324\n2015.05.09-20:30:38 - [TCP] Sequence Number : 472573572\n2015.05.09-20:30:38 - [TCP] Acknowledge Number : 2250858137\n2015.05.09-20:30:38 - [TCP] Header Length : 8 DWORDS or 32 BYTES\n2015.05.09-20:30:38 - [TCP] Urgent Flag : 0\n2015.05.09-20:30:38 - [TCP] Acknowledgement Flag : 1\n2015.05.09-20:30:38 - [TCP] Push Flag : 1\n2015.05.09-20:30:38 - [TCP] Reset Flag : 0\n2015.05.09-20:30:38 - [TCP] Synchronise Flag : 0\n2015.05.09-20:30:38 - [TCP] Finish Flag : 0\n2015.05.09-20:30:38 - [TCP] Window : 31\n2015.05.09-20:30:38 - [TCP] Checksum : 12061\n2015.05.09-20:30:38 - [TCP] Urgent Pointer : 0\n\n2015.05.09-20:30:38 - [IP] Header\n    45 28 00 53 13 3B 40 00 35 06 B4 9A C0 1E FC 57 E     (.S.;@.5......W\n    C0 A8 00 89                                           ....\n    \n2015.05.09-20:30:38 - [TCP] Header\n    01 BB A1 6C 1C 2A E6 84 86 29 5E 99 80 18 00 1F       ...l.*...)^.�...\n    2F 1D 00 00 01 01 08 0A 40 9D 7A BE 01 4C CD 9C       /.......@.z..L..\n\n2015.05.09-20:30:38 - [DATA] Payload\n    16 03 03 00 5A 02 00 00 56 03 03 55 4F 66 FC DC       ....Z...V..UOf..\n    CC 35 04 28 FC C8 1A 72 1E 72 F6 99 5D B1 ED 6E       .5.(...r.r..]..n\n    88 60 FD B7 D6 AF 00 9E 42 68 96 20 50 32 17 BA       .`......Bh. P2..\n    D9 65 D5 14 53 A7 00 99 42 72 00 A8 E4 16 C3 34       .e..S...Br.....4\n    01 D6 D5 24 1A 6C 50 6F D4 EE A3 65 C0 2F 00 00       ...$.lPo...e./..\n    0E FF 01 00 01 00 00 10 00 05 00 03 02 68 32 14       .............h2.\n    03 03 00 01 01 16 03 03 00 28 00 00 00 00 00 00       .........(......\n    00 00 1B F6 B0 46 AD 42 77 BC C7 7D B0 6F 2A DB       .....F.Bw..}.o*.\n    2C 8F 94 58 C7 F4 04 6C 37 66 94 0E 0F BC 0D 44       ,..X...l7f.....D\n    5B A2                                                 [.\n```\n\n### Feel free to fork\nYou can fork, modify and change the code unther the GNU GPL 3 license. The project contains LICENSE file to see full license description.\n\n### Get more info from blog\n- Offencive-Security Georgia [http://off-sec.com/](http://off-sec.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkala13x%2Fscap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkala13x%2Fscap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkala13x%2Fscap/lists"}