Skip to content

Commit

Permalink
Really limit packet count and data in linux sniffer
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 57795ff9c33a53167fca85845b96b82b5c92315f
Author: James Lee <egypt@metasploit.com>
Date:   Wed Aug 1 14:13:20 2012 -0600

    Add recompiled sniffer bin for linux

commit 0e11fdb06fcb9771a11eb631e6f10ec7a2d315f3
Author: m m <gaspmat@gmail.com>
Date:   Thu Jul 12 15:08:10 2012 +0200

    really limit packet count and data in linux sniffer

[Closes rapid7#605]
  • Loading branch information
mephos authored and egypt committed Aug 1, 2012
1 parent f6a2ba0 commit 5531fd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file modified data/meterpreter/ext_server_sniffer.lso
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,11 @@ void packet_handler(u_char *user, const struct pcap_pkthdr *h, const u_char *byt

if(j->idx_pkts >= j->max_pkts) j->idx_pkts = 0;

if(j->pkts[j->idx_pkts]) free((void*)(j->pkts[j->idx_pkts]));

if(j->pkts[j->idx_pkts]) {
j->cur_pkts--;
j->cur_bytes -= ((PeterPacket *)(j->pkts[j->idx_pkts]))->h.caplen;
free((void*)(j->pkts[j->idx_pkts]));
}
j->pkts[j->idx_pkts++] = pkt;

lock_release(snifferm);
Expand Down

0 comments on commit 5531fd1

Please sign in to comment.