I am using the below code to get tcpdump output of a URL in iOS, but it is printing in console, how can i get the response to NSString object?
system("tcpdump -i en1 -A -vvv host www.facebook.com");
I am using the below code to get tcpdump output of a URL in iOS, but it is printing in console, how can i get the response to NSString object?
system("tcpdump -i en1 -A -vvv host www.facebook.com");
I think tcpdump have output file param, or you can use output redirect, and then read all from saved file
tcpdump -l -i en0 -A -vvv host www.facebook.com > /tmp/facebook_packets.txt
tmp
path just for example, use any you like
and alternative way, redirect output to NSPipe
, see answer here How to get the log from system();?