Tru-Tek Posted April 8, 2012 Share Posted April 8, 2012 This is a work in progress. Seems to work very well. Trying to figure out how to make the url's in the display a link. This adds another menu item in the navigation and it refreshes every 30 seconds. The link below will tell you how to get yours set up. http://blog.tru-tek.com/index.php/2012/04/08/urlsnarf-logging-viewer-pineapple-mark-iv/ Quote Link to comment Share on other sites More sharing options...
telot Posted April 8, 2012 Share Posted April 8, 2012 Looks great TruTek! You're really fulfilling a need here Thanks for contributing! telot Quote Link to comment Share on other sites More sharing options...
shadowmmm Posted April 8, 2012 Share Posted April 8, 2012 thank you tru-tek Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted April 8, 2012 Share Posted April 8, 2012 While this looks good, in the upcoming update there will be a proper interface to view and manage the logs. Best, Sebkinne Quote Link to comment Share on other sites More sharing options...
JimJensen Posted April 8, 2012 Share Posted April 8, 2012 Thanks for this information. I thought I would try it just to see if I could get it to work, which I did. There are two typos in in your instructions. <?php require(‘navbar.php’); ?> should be <?php require(‘includes/navbar.php’); ?> tail /www/pineapple/urlsnarf.log should be tail /www/pineapple/logs/urlsnarf.log It took me a while to figure out so I thought I would post it to help the noobs like myself. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted April 8, 2012 Share Posted April 8, 2012 Thanks for this information. I thought I would try it just to see if I could get it to work, which I did. There are two typos in in your instructions. <?php require(‘navbar.php’); ?> should be <?php require(‘includes/navbar.php’); ?> tail /www/pineapple/urlsnarf.log should be tail /www/pineapple/logs/urlsnarf.log It took me a while to figure out so I thought I would post it to help the noobs like myself. I assume that the OP is on an older FW version. I advise anyone to upgrade ;) Best, Sebkinne Quote Link to comment Share on other sites More sharing options...
legion Posted April 11, 2012 Share Posted April 11, 2012 While this looks good, in the upcoming update there will be a proper interface to view and manage the logs. Best, Sebkinne Would be nice to be able to do this with etterlog also! Quote Link to comment Share on other sites More sharing options...
thestudent Posted April 18, 2012 Share Posted April 18, 2012 This is a work in progress. Seems to work very well. Trying to figure out how to make the url's in the display a link. This adds another menu item in the navigation and it refreshes every 30 seconds. The link below will tell you how to get yours set up. http://blog.tru-tek.com/index.php/2012/04/08/urlsnarf-logging-viewer-pineapple-mark-iv/ You can just change the code in the "displaysnarflogs.php" file to this to hyperlink the urls..it's pretty convenient. foreach($output as $outputline) { $snarfed = explode(" ", $outputline); echo ("$snarfed[0]"); echo ("<a href=\"$snarfed[1]\"> $snarfed[1]</a>"); echo ("<br><br>"); } I know it's a small thing but it's the first thing I have been able to contribute so I'm glad I have been able to do something. Hak5 is great! Quote Link to comment Share on other sites More sharing options...
thestudent Posted April 18, 2012 Share Posted April 18, 2012 You can just change the code in the "displaysnarflogs.php" file to this to hyperlink the urls..it's pretty convenient. foreach($output as $outputline) { $snarfed = explode(" ", $outputline); echo ("$snarfed[0]"); echo ("<a href=\"$snarfed[1]\"> $snarfed[1]</a>"); echo ("<br><br>"); } I know it's a small thing but it's the first thing I have been able to contribute so I'm glad I have been able to do something. Hak5 is great! tru-tek, is there any good way to reduce the amount of clutter? (Ads and that sort of thing) This is cool though, I noticed if someone is on facebook and is viewing pictures...you can see them with out side-jacking or anything. Kinda creeperish huh? Quote Link to comment Share on other sites More sharing options...
thestudent Posted April 18, 2012 Share Posted April 18, 2012 · Hidden by thestudent, April 18, 2012 - Duplicate Hidden by thestudent, April 18, 2012 - Duplicate You can just change the code in the "displaysnarflogs.php" file to this to hyperlink the urls..it's pretty convenient. foreach($output as $outputline) { $snarfed = explode(" ", $outputline); echo ("$snarfed[0]"); echo ("<a href=\"$snarfed[1]\"> $snarfed[1]</a>"); echo ("<br><br>"); } I know it's a small thing but it's the first thing I have been able to contribute so I'm glad I have been able to do something. Hak5 is great! tru-tek, is there any good way to reduce the amount of clutter? (Ads and that sort of thing) This is cool though, I noticed if someone is on facebook and is viewing pictures...you can see them with out side-jacking or anything. Kinda creeperish huh? Link to comment
genghis_tron Posted April 19, 2012 Share Posted April 19, 2012 anyone know why I'm getting unexpected T variable error on line 15? <html> <head> <title>snarf logs</title> <META HTTP-EQUIV="REFRESH" CONTENT="30> </head> <body bgcolor="black" text="white" alink="green" vlink="green" link=" <?php require('includes/navbar.php'); ?> <br> <br> <?php $cmd = "/pineapple/geturlsnarf.sh"; exec("$cmd 2>&1', $output); foreach($output as $outputline) { echo ("$outputline\n"); echo ("<br><br>"); } ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
PineDominator Posted April 19, 2012 Share Posted April 19, 2012 anyone know why I'm getting unexpected T variable error on line 15? <html> <head> <title>snarf logs</title> <META HTTP-EQUIV="REFRESH" CONTENT="30> </head> <body bgcolor="black" text="white" alink="green" vlink="green" link=" <?php require('includes/navbar.php'); ?> <br> <br> <?php $cmd = "/pineapple/geturlsnarf.sh"; exec("$cmd 2>&1', $output); foreach($output as $outputline) { echo ("$outputline\n"); echo ("<br><br>"); } ?> </body> </html> maybe move the \n to the next echo? Quote Link to comment Share on other sites More sharing options...
TomCat Posted April 19, 2012 Share Posted April 19, 2012 maybe move the \n to the next echo? If this is web output, I'd remove the "\n" and not even worry about it... the next echo has 2 html line breaks. The "\n" adds a new line for the shell... Quote Link to comment Share on other sites More sharing options...
genghis_tron Posted April 19, 2012 Share Posted April 19, 2012 (edited) Thanks I will give that a shot today. Sad pandas, still no go. Parse error: syntax error, unexpected T_VARIABLE in /www/pineapple/displaysnarflogs.php on line 15 Thanks for the suggestions so far, I'm a PHP n00b so I appreciate the help. Edited April 19, 2012 by genghis_tron Quote Link to comment Share on other sites More sharing options...
thestudent Posted April 21, 2012 Share Posted April 21, 2012 Thanks I will give that a shot today. Sad pandas, still no go. Parse error: syntax error, unexpected T_VARIABLE in /www/pineapple/displaysnarflogs.php on line 15 Thanks for the suggestions so far, I'm a PHP n00b so I appreciate the help. shouldn't that path be "/www/pineapple/urlsnarf.log" ? Anyhow is there a way to append the displayed list as opposed to over-writing it? Quote Link to comment Share on other sites More sharing options...
abxy007 Posted May 10, 2012 Share Posted May 10, 2012 what is the "vi" in 1. SSH into your pineapple and do the following cd /www/pineapple vi displaysnarflogs.php Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 10, 2012 Share Posted May 10, 2012 vi is a text editor for linux. You could use nano as well ;) Quote Link to comment Share on other sites More sharing options...
abxy007 Posted May 10, 2012 Share Posted May 10, 2012 vi is a text editor for linux. You could use nano as well ;) thanks got it now Quote Link to comment Share on other sites More sharing options...
abxy007 Posted May 12, 2012 Share Posted May 12, 2012 Got the displaylogs thing in the menu - check url snarfing does work - check when i click the link in the pineapples ui, firefox goes to a page and just remains blank- Why? my code is listed below both files are in /www/pineapple/includes dir displaysnarflogs <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(‘includes/navbar.php’); ?> <br> <br> <?php $cmd = “/www/pineapple/includes/geturlsnarf.sh”; exec(“$cmd 2>&1?, $output); foreach($output as $outputline) { $snarfed = explode(" ", $outputline); echo ("$snarfed[0]"); echo ("<a href=\"$snarfed[1]\"> $snarfed[1]</a>"); echo ("<br><br>"); ?> </body> </html> geturlsnarf.sh #!/bin/sh tail /www/pineapple/logs/urlsnarf.log | awk {‘print $1 $0?} | sed ‘s,http://, http://,’ thanks again guys Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted May 12, 2012 Share Posted May 12, 2012 If you are interested, I developed a module for urlsnarf :) Quote Link to comment Share on other sites More sharing options...
abxy007 Posted May 12, 2012 Share Posted May 12, 2012 If you are interested, I developed a module for urlsnarf :) nice I Love people who are determined to make Life simple!!! GOOD LOOKING OUT!! Quote Link to comment Share on other sites More sharing options...
spants Posted May 24, 2012 Share Posted May 24, 2012 Thanks to trutek for this and the thestudent who added the hyperlinks. Here are my versions to copy - had lots of probs with copying from the web page. Also added hyperlinks and opening new tab on links.... much more convenient! Have fun Spants getsnarflogs.php <html> <head> <title>snarf logs</title> <META HTTP-EQUIV="REFRESH" CONTENT="10"> </head> <body bgcolor="black" text="white" alink="green" vlink="green" link="green"> <?php require('includes/navbar.php'); ?> <br> <br> <?php $cmd = "/www/pineapple/geturlsnarf.sh"; exec("$cmd 2>&1",$output); foreach($output as $outputline) { $snarfed = explode(" ", $outputline); echo ("$snarfed[0]"); echo ("<a href=\"$snarfed[1]\" target=\"_blank\"> $snarfed[1]</a>"); echo ("<br>"); } ?> </body> </html> geturlsnarf.sh #!/bin/sh tail /www/pineapple/logs/urlsnarf.log | awk {'print $1 $7'} | sed 's,http://, http://,' 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="displaysnarflogs.php"><font color="black"><b>URLSnarf Logs</b></a> | <a href="/pineapple/about.php"><font color="black"><b>About</b></a> </pre></td></tr></table> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.