Jump to content

Protocol Analyzing using PHP


inversesoft123

Recommended Posts

Hello PHP freaks.. Can anybody tell me how to terminate shell script after specific interval time while calling it from php using exec() ?

 

In other words suppose i wanna run

$ ngrep -lqi -p -W none ^get\|^post tcp dst port 80

as

<?php

$records = exec("ngrep -lqi -p -W none ^get\|^post tcp dst port 80");

?>

How can I set timer to expire this code after 4-5 seconds ?

 

;) I might be thinking or going to wrong way,, But I am planning to create online protocol analyzer / url sniffer.

 

This code monitors incoming and outgoing GET or POST requests.. I am creating code to sniff video URL from video link. any Idea "?

 

Thanks in Advance..

Link to comment
https://forums.phpfreaks.com/topic/240861-protocol-analyzing-using-php/
Share on other sites

Thanks xyph,

 

      Let me know if killing of process with SGKILL or core dump used in that code is safe for server environment.?. Is there any alternative to do this with any other way rather than PHP or this is hypothetical concept ?

 

Thanks again

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.