Jump to content

Netcat Redirect Output To Php Page


Recommended Posts

Hi, I am working on a really cool and useful module but i can't seem to forward the netcat output to a php page. I tried

echo exec("netcat code here...")

and all sorts of variations of the above command but it doesnt seem to want to cooperate. Any ideas ?

Link to comment
Share on other sites

I'm a bit of a PHP newb myself, but when experimenting with executing something like this I got it to work like by assigning the exec command to a variable and then echoing that variable. Should be the same thing I guess, but for one reason or another this worked at the time.

Something like:

$netcatdump = exec ("netcat blah");
echo ($netcatdump);

Link to comment
Share on other sites

if you exec the process like you're doing now in php the page won't load becuase php is waiting for nc to finish. If you take a look at the starturlsnarf.php or startdnsspoof.php pages you'll see how we're handling that -- with a call to at which forks the process. From there it's just a matter of redirecting the output of the program to a log and cat'ing that from php.

Link to comment
Share on other sites

The assigning to variable thing didn't work. I had already tried that.

Darren, thanks for the reply but I can't have the output in a file because the script is supposed to be executed a few times at the same time, which will completely mess up the output file. Thanks for the reply anyway. I think that I found a way to use wget instead of netcat. I'm testing the new method right now.

Link to comment
Share on other sites

Quick question: does sslstrip only remove the 's' from https?

So if there were no http version of the website, would sslstrip still work? If yes, then how can I use sslstrip on myself?

(Sorry fo asking so many question, but this toolkit I'm making is very complex )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...