Skip to content

Commit

Permalink
15 pings sent
Browse files Browse the repository at this point in the history
  • Loading branch information
Subangkar committed Sep 8, 2019
1 parent 592ff23 commit 3b8e754
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 69 deletions.
12 changes: 8 additions & 4 deletions icmp_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ int main(int argc, char const *argv[]) {

const char* payload = (argc<=3 ? "ping spoofing test" : argv[3]);

struct iphdr *ip = create_ping_ip_packet(argv[1], argv[2], payload);

printf("Sending... \n%-15s: <%s>\n%-15s: <%s>\n%-15s: ", "Source", argv[1], "Destination", argv[2], "Payload");
puts(payload);

send_raw_ip_packet(ip);
for (int i = 0; i < 15; i++)
{
printf("Sent %d packets\n",i+1);
struct iphdr *ip = create_ping_ip_packet(argv[1], argv[2], payload);

send_raw_ip_packet(ip);
}

return 0;
}

Expand Down
65 changes: 0 additions & 65 deletions sniff-raw.c

This file was deleted.

Empty file modified sniff.sh
100755 → 100644
Empty file.
Empty file modified spoof.sh
100755 → 100644
Empty file.

0 comments on commit 3b8e754

Please sign in to comment.