Questions tagged [ngrep]

ngrep is a grep variant for parsing text from network protocol data.

20 questions
0
votes
2 answers

Monitor socket with ngrep or perl for activity, then issue command

I'd like to use ngrep and/or perl to monitor the incoming data stream on a socket, then, when the appropriate characters arrive, like in this case, the string "192.168.1.101:8080", input to the data stream a redirect to another ipaddress, such as…
Lester Kahn
  • 31
  • 1
  • 1
  • 4
0
votes
0 answers

Passing regex file to Ngrep to check pcap

I have a pcap file and a file of regular expressions. The regular expressions file consists of more than 20 regular expressions like this: [Pp][Oo][Ss][Tt] .*fpleq.*po put{0,1} . . . Now, I know how to give a single regular expression to check in a…
Xara
  • 8,748
  • 16
  • 52
  • 82
0
votes
3 answers

Python and NGREP

I want to be able to start and stop an NGREP process from inside my python code. I really dont have experience with python on a system level. Normally I run NGREP from the command line, but I would like to be able to run it from a script every hour…
Dave
  • 133
  • 1
  • 2
  • 9
0
votes
2 answers

"error: 'struct udphdr' has no member named 'source'" ... huh?

I'm trying to compile a program called ngrep, and when I ran configure, things seemed to go well, but when I run make, I get: ngrep.c: In function ‘process’: ngrep.c:544: error: ‘struct udphdr’ has no member named ‘source’ ngrep.c:545: error:…
raldi
  • 21,344
  • 33
  • 76
  • 86
0
votes
1 answer

creating 2 variables from a multiple pattern grep

I am attempting to create a proof of concept bash script to scan the network using ngrep, find appropriate cookies and then place them into a variable. cook=`ngrep -s 1000 -l -q -d eth1 "Cookie:" tcp and port 80 | grep -m 1 -Po '(?<=user=)[^;]+'`…
1
2