Jump to content

Recommended Posts

Posted

I started the urlsnarf on the pineapple IV but where do I see all the traffic urls at????

Thanks,

Tyler

Posted

I started the urlsnarf on the pineapple IV but where do I see all the traffic urls at????

Thanks,

Tyler

by default if you have not moved them.. /www/pineapple/logs/urlsnarf.log

NTF

Posted

by default if you have not moved them.. /www/pineapple/logs/urlsnarf.log

NTF

Thank you so much. :)

Posted

Someone made a viewer for these as well, although I've yet to try it.

Not yet - not really.

It will be in the next major release though.

Best,

Sebkinne

  • 4 weeks later...
Posted

This works well. You'll have to double-check the paths, but otherwise it's pretty much copy and paste.

I just tried that out but couldn't get it to add a menu to the webui. My navbar.php was empty so I assume I just created a new one. Where should it be located?

Posted

I just tried that out but couldn't get it to add a menu to the webui. My navbar.php was empty so I assume I just created a new one. Where should it be located?

I think it's in the "includes" directory.

Posted (edited)

I think it's in the "includes" directory.

Alright, I found it. Thanks!

Edited by tylerscoldrevenge
Posted

I can't seem to get this to work quite right. I can confirm that urlsnarf is working because I can go into the log file and see URL's. However, when I click on the new urlsnarflogs menu button, Firefox just constantly refreshes and doesn't do anything else. I'm pretty sure I followed the tutorial correctly and updated all the paths but I'm not sure what's going on here.

Posted

It seems like the curly quotes in that blog don't paste quite right. Check all of the ' and " marks in your files and see if that helps?

#!/bin/sh
tail /www/pineapple/urlsnarf.log | awk {‘print $1 $8′} | sed ‘s,http://, http://,’

versus

#!/bin/sh
tail /www/pineapple/urlsnarf.log | awk {'print $1 $8'} | sed 's,http://, http://,'

Posted (edited)

It seems like the curly quotes in that blog don't paste quite right. Check all of the ' and " marks in your files and see if that helps?

#!/bin/sh
tail /www/pineapple/urlsnarf.log | awk {'print $1 $8′} | sed 's,http://, http://,'

versus

#!/bin/sh
tail /www/pineapple/urlsnarf.log | awk {'print $1 $8'} | sed 's,http://, http://,'

Hmm, I checked that and it looks fine.

Maybe I messed something up somewhere else. Since the navbar.php is in /www/pineapple/includes, should the other stuff (geturlsnarf.sh and displaysnarflogs.php) be in there as well or should I leave them in /www/pineapple like the tutorial says?

Edit: I moved geturlsnarf.sh and displaysnarflogs.php over to /www/pineapple and that didn't fix the problem. I guess there's something wrong with one of them so I'll recreate them and see if that fixes the problem.

Edited by tylerscoldrevenge
Posted

I remade the files but it's still not working so I'll copy over what I've got: (All of this is in /www/pineapple/includes. The only things I've changed is the path to urlsnarf.log in geturlsnarf.sh and also every path that was to /www/pineapple to /www/pineapple/includes.)

This is geturlsnarf.sh:

#!/bin/sh
tail /www/pineapple/logs/urlsnarf.log | awk {'print $1 $8'} | sed 's,http://, http://,'

This is displaysnarflogs.php:

<html>
<head>
<title>snarf logs</title>
<META HTTP-EQUIV="REFRESH" CONTENT="30">
</head>
<body bgcolor="black" text="white" alink="green" vlink="green link="green">
<?php require('navbar.php'); ?>
<br>
<br>
<?php

$cmd = "/www/pineapple/includes/geturlsnarf.sh";
exec("$cmd 2>&1", $output);
foreach($output as $outputline) {
    	echo ("$outputline\n");
    	echo ("<br><br>");
    	}
?>
</body>
</html>

And here is navbar.php:

<table border="0" width="100%" bgcolor="green"><tr width="100%">
<td>
<pre><a href="/pineapple/index.php"><font color="black"><b>Status</b></a> | <a href="/pineapple/config.php"><font color="black"><b>Configuration</b></a> | <a href="/pineapple/advanced.php"><font color="black"><b>Advanced</b></a> | <a href="/pineapple/usb.php"><font color="black"><b>USB</b></a> | <a href="/pineapple/jobs.php"><font color="black"><b>Jobs</b></a> | <a href="/pineapple/3g.php"><font color="black"><b>3G</b></a> | <a href="/pineapple/ssh.php"><font color="black"><b>SSH</b></a> | <a href="/pineapple/scripts.php"><font color="black"><b>Scripts</b></font></a> | <a href="/pineapple/logs.php"><font color="black"><b>Logs</b></a> | <a href="/pineapple/upgrade.php"><font color="black"><b>Upgrade</b></a> | <a href="/pineapple/resources.php"><font color="black"><b>Resources</b></a> | <a href="/pineapple/modules.php"><font color="black"><b>Modules</b></a> | <a href="/pineapple/about.php"><font color="black"><b>About</b></a> | <a href="displaysnarflogs.php"><font color="black"><b>Urlsnarflogs</b></a> |
</pre></td></tr></table>

Posted

And here is navbar.php:

<table border="0" width="100%" bgcolor="green"><tr width="100%">
<td>
<pre><a href="/pineapple/index.php"><font color="black"><b>Status</b></a> | <a href="/pineapple/config.php"><font color="black"><b>Configuration</b></a> | <a href="/pineapple/advanced.php"><font color="black"><b>Advanced</b></a> | <a href="/pineapple/usb.php"><font color="black"><b>USB</b></a> | <a href="/pineapple/jobs.php"><font color="black"><b>Jobs</b></a> | <a href="/pineapple/3g.php"><font color="black"><b>3G</b></a> | <a href="/pineapple/ssh.php"><font color="black"><b>SSH</b></a> | <a href="/pineapple/scripts.php"><font color="black"><b>Scripts</b></font></a> | <a href="/pineapple/logs.php"><font color="black"><b>Logs</b></a> | <a href="/pineapple/upgrade.php"><font color="black"><b>Upgrade</b></a> | <a href="/pineapple/resources.php"><font color="black"><b>Resources</b></a> | <a href="/pineapple/modules.php"><font color="black"><b>Modules</b></a> | <a href="/pineapple/about.php"><font color="black"><b>About</b></a> | <a href="displaysnarflogs.php"><font color="black"><b>Urlsnarflogs</b></a> |
</pre></td></tr></table>

Did you try this for the link in navbar.php?

<a href="/pineapple/displaysnarflogs.php"><font color="black"><b>Urlsnarflogs</b></a> |

Posted (edited)

Did you try this for the link in navbar.php?

<a href="/pineapple/displaysnarflogs.php"><font color="black"><b>Urlsnarflogs</b></a> |

Okay, great! That fixed it! But I put it as

/pineapple/includes/displaysnarflogs.php

since it's in includes not pineapple.

I still have another problem though. It's not displaying the logs correctly. I have URLs in the urlsnarf.log file but it's being displayed like this:

172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"

Edited by tylerscoldrevenge
Posted

Okay, great! That fixed it! But I put it as

/pineapple/includes/displaysnarflogs.php

since it's in includes not pineapple.

I still have another problem though. It's not displaying the logs correctly. I have URLs in the urlsnarf.log file but it's being displayed like this:

172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"
172.16.42.242HTTP/1.1"

Did you get it working again yet? If not, try replacing $8 in 'geturlsnarf.sh' with $0 to see if you like that better?

Posted

Let's break it down:

tail /www/pineapple/logs/urlsnarf.log | awk {'print $1 $8'} | sed 's,http://, http://,'

The first part just keeps an eye on the urlsnarf.log file, and its output is piped to awk, which is instructed to only list out of that the first and eighth fields (space is the default delimiter), then finally that pipes to sed which looks like it's adding a space before http://,'>http://, for whatever reason I cannot remember.

If you issue cat /www/pineapple/logs/urlsnarf.log you'll see the whole shebang and from that you should be able to figure out which fields you need (replacing $1 and $8). I'm thinking the | sed 's,http://,'>http://, http://,'>http://,' part may not be necessary.

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...