Whistle Master Posted April 19, 2012 Share Posted April 19, 2012 (edited) Hi ! For those who are interested, I made some small improvements to the actual Module Systems: Features - Modules size on the MK4, - Modules size to download, - Modules updates verifications Install Download scp modules_advanced.php root@172.16.42.1:/www/pineapple/ Usage http://172.16.42.1/pineapple/modules_advanced.php Edited May 6, 2012 by Whistle Master Quote Link to comment Share on other sites More sharing options...
PineDominator Posted April 19, 2012 Share Posted April 19, 2012 (edited) Hi ! For those who are interested, I made some small improvements to the actual Module Systems: Features - Modules size on the MK4, - Modules size to download, - Modules updates verifications Install Download scp modules_advanced.php root@172.16.42.1:/www/pineapple/ Usage http://172.16.42.1/pineapple/modules_advanced.php This is great WM:-D I was hoping something like this was going to be included but didn't expect someone like you too. EDIT: If there is a new version does it give an option to upgrade? uninstall then install Edited April 19, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted April 19, 2012 Author Share Posted April 19, 2012 This is great WM:-D I was hoping something like this was going to be included but didn't expect someone like you too. EDIT: If there is a new version does it give an option to upgrade? uninstall then install Yes It does :) But we don't see it on the screenshot, I agree. I made a new one which show the option: Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted April 19, 2012 Share Posted April 19, 2012 Something similar to this will be in a firmware release. Best, Sebkinne Quote Link to comment Share on other sites More sharing options...
thestudent Posted April 19, 2012 Share Posted April 19, 2012 Yes It does :) But we don't see it on the screenshot, I agree. I made a new one which show the option: You're crazy Whistle Master! Next, could you make a module that makes modules? :) Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 6, 2012 Share Posted May 6, 2012 Something similar to this will be in a firmware release. Best, Sebkinne The 2.0.0 version doesn't reflect the advanced_modules.php capabilities. WM's version is way better IMO i don't mean any disrespect though :) Quote Link to comment Share on other sites More sharing options...
Technoprenerd Posted May 6, 2012 Share Posted May 6, 2012 Thanks WM! Though I get this error: Warning: file_get_contents() [function.file-get-contents]: HTTP request failed! HTTP/1.1 404 NOT FOUND in /www/pineapple/modules_advanced.php on line 120 Warning: file_get_contents(http://wifipineapple.com/downloads.php?moduleList) [function.file-get-contents]: failed to open stream: Address family not supported by protocol in /www/pineapple/modules_advanced.php on line 120 Think the download link is down/wrong>? Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted May 6, 2012 Share Posted May 6, 2012 The 2.0.0 version doesn't reflect the advanced_modules.php capabilities. WM's version is way better IMO i don't mean any disrespect though :) We didn't implement the new module system on the pineapple yet. That will come relatively soon though. I simply am too busy at the moment and focused on a more stable backend. Best, Sebkinne Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted May 6, 2012 Author Share Posted May 6, 2012 Thanks WM! Though I get this error: Think the download link is down/wrong>? I did not update the advance module manager to reflect the changes brought by the firmware v2.0. I will release an update version later :) Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted May 6, 2012 Author Share Posted May 6, 2012 I update it to reflect changes from the new v2.0 firmware. Download link is in the first post (and also here) Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 6, 2012 Share Posted May 6, 2012 I simply am too busy at the moment and focused on a more stable backend. I understand and stability is more important. I will wait with great patience :) Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 7, 2012 Share Posted May 7, 2012 Or just backup the original modules.php and copy and rename modules_advanced.php to modules.php ;) Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 14, 2012 Share Posted May 14, 2012 (edited) Removed just follow this one and now my index.php is redirecting me to an mediafire not found page :) how can i solve this? Thank you! EDIT: That`s really strange..i cannot reach any of the normal html site..i though i just repeat the firmaware update and solve the problem there but nothin :( I know nothing lol i have the PA since 2 days..und only managed the upodate to 2.0 but i am slowly evolving ^^ Edited May 20, 2012 by Sebkinne Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 16, 2012 Share Posted May 16, 2012 I wasn`t able to solve the problem until now..can anybody please help me? I just can`t get back to the web interface..it asks my login normaly and then redirects me to the mediafire not found page within the pineapple.. Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 16, 2012 Share Posted May 16, 2012 (edited) I wasn`t able to solve the problem until now..can anybody please help me? I just can`t get back to the web interface..it asks my login normaly and then redirects me to the mediafire not found page within the pineapple.. Easiest way is to scp upgrade.bin (2.0.0) to /tmp/ folder SSH into pineapple and run sysupgrade -n -v /tmp/upgrade.bin it will re-flash your firmware so you have a default pineapple again. Then scp modules_advanced.php to /www/pineapple/ Backup original modules.php like this: mv modules.php modules.php.backup Rename modules_advanced.php to modules.php like this: mv modules_advanced.php modules.php This way you don't have to fiddle with navbar.php, because you will simple replace the default modules.php with the advanced one ;) Here's the code of the original /www/pineapple/index.php, maybe you messed something up in there: <html> <head> <title>Pineapple Control Center</title> <!--<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">--> <script type="text/javascript" src="includes/ajax.js"> </script> <script type="text/javascript" src="logtail/logtail.js"> </script> </head> <body bgcolor="black" text="white" alink="green" vlink="green" link="green" onload="getLog('start');"> <?php require('includes/navbar.php'); ?> <pre> <table border="0" width="100%"><tr><td valign="top" align="left" width="350"> <b>Services</b><br /> <?php $iswlanup = exec("ifconfig wlan0 | grep UP | awk '{print $1}'"); if ($iswlanup == "UP") { echo " Wireless <font color=\"lime\"><b>enabled</b></font> | <a href=\"wlan.php?stop\"><b>Stop</b></a><br />"; } else { echo " Wireless <font color=\"red\"><b>disabled</b></font> | <a href=\"wlan.php?start\"><b>Start</b></a><br />"; } if ( exec("hostapd_cli -p /var/run/hostapd-phy0 karma_get_state | tail -1") == "ENABLED" ){ $iskarmaup = true; } if ($iskarmaup != "") { echo "MK4 Karma <font color=\"lime\"><b>enabled</b></font>. | <a href=\"karma/stopkarma.php\"><b>Stop</b></a><br />"; } else { echo "MK4 Karma <font color=\"red\"><b>disabled</b></font>. | <a href=\"karma/startkarma.php\"><b>Start</b></a> <br />"; } $autoKarma = ( exec("if grep -q 'hostapd_cli -p /var/run/hostapd-phy0 karma_enable' /etc/rc.local; then echo 'true'; fi") ); if ($autoKarma != ""){ echo "Autostart <font color=\"lime\"><b>enabled</b></font>. | <a href=\"karma/autoKarmaStop.php\"><b>Stop</b></a><br />"; } else { echo "Autostart <font color=\"red\"><b>disabled</b></font>. | <a href=\"karma/autoKarmaStart.php\"><b>Start</b></a><br />"; } $cronjobs = ( exec("ps -all | grep [c]ron")); if ($cronjobs != ""){ echo "Cron Jobs <font color=\"lime\"><b>enabled</b></font>. | <a href=\"jobs.php?stop&goback\"><b>Stop</b></a><br />"; } else { echo "Cron Jobs <font color=\"red\"><b>disabled</b></font>. | <a href=\"jobs.php?start&goback\"><b>Start</b></a> | <a href=\"jobs.php\"><b>Edit</b></a><br />"; } $isurlsnarfup = exec("ps auxww | grep urlsnarf.sh | grep -v -e grep"); if ($isurlsnarfup != "") { echo "URL Snarf <font color=\"lime\"><b>enabled</b></font>. | <a href=\"urlsnarf/stopurlsnarf.php\"><b>Stop</b></a><br />"; } else { echo "URL Snarf <font color=\"red\"><b>disabled</b></font>. | <a href=\"urlsnarf/starturlsnarf.php\"><b>Start</b></a><br />"; } $isdnsspoofup = exec("ps auxww | grep dnsspoof.sh | grep -v -e grep"); if ($isdnsspoofup != "") { echo "DNS Spoof <font color=\"lime\"><b>enabled</b></font>. | <a href=\"dnsspoof/stopdnsspoof.php\"><b>Stop</b></a><br />"; } else { echo "DNS Spoof <font color=\"red\"><b>disabled</b></font>. | <a href=\"dnsspoof/startdnsspoof.php\"><b>Start</b></a> | <a href=\"config.php#spoofhost\"><b>Edit</b></a><br/>"; } /*$isngrepup = exec("ps auxww | grep ngrep | grep -v -e \"grep ngrep\" | awk '{print $1}'"); if ($isngrepup != "") { echo "    ngrep <font color=\"lime\"><b>enabled</b></font>. | <a href=\"ngrep/stopngrep.php\"><b>Stop</b></a>"; } else { echo "    ngrep <font color=\"red\"><b>disabled</b></font>. | <a href=\"ngrep/startngrep.php\"><b>Start</b></a> | <a href=\"config.php#ngrep\"><b>Edit</b></a><br/>"; } */ if (exec("grep 3g.sh /etc/rc.local") != ""){ echo "3G bootup <font color=\"lime\"><b>enabled</b></font>. | <a href=\"3g.php?disable&disablekeepalive&goback\"><b>Disable</b></a><br />"; } else { echo "3G bootup <font color=\"red\"><b>disabled</b></font>. | <a href=\"3g.php?enable&goback\"><b>Enable</b></a><br />"; } if (exec("grep 3g-keepalive.sh /etc/crontabs/root") == "") { echo "3G redial <font color='red'><b>disabled</b></font>. | <a href='3g.php?enablekeepalive&enable&goback'><b>Enable</b></a><br />"; } else { echo "3G redial <font color='lime'><b>enabled</b></font>. | <a href='3g.php?disablekeepalive&goback'><b>Disable</b></a><br />"; } if (exec("ps aux | grep [s]sh | grep -v -e ssh.php | grep -v grep") == "") { echo "   SSH <font color=\"red\"><b>offline</b></font>.  | <a href=\"ssh.php?connect\"><b>Connect</b></a><br /><br />"; } else { echo "   SSH <font color=\"lime\"><b>online</b></font>.  | <a href=\"ssh.php?disconnect\"><b>Disconnect</b></a><br /><br />"; } echo "<br/><b>Interfaces</b><br />"; echo " PoE / LAN Port: " . exec("ifconfig br-lan | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'") . "<br />"; echo "  USB 3G Modem: " . exec("ifconfig 3g-wan2 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'") . "<br />"; echo " WAN / LAN Port: " . exec("ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'") . "<br />"; echo "Public Internet: "; if (isset($_GET[revealpublic])) { echo exec("wget -qO- http://cloud.wifipineapple.com/ip.php") . "<br />"; } else { echo "<a href=\"index.php?revealpublic\">reveal public ip</a><br />"; } ?> </td><td valign="top" align="left" width="*"> <pre> <a href="#" onclick="getLog('start');return false"><b>Resume Log</b></a> | <a href="#" onclick="stopTail();return false"><b>Pause Log</b></a> | <?php if (isset($_GET[report])) { echo "<a href='index.php'><b>Dismiss Detailed Report</b></a>"; } else { echo "<a href='index.php?report'><b>Generate Detailed Report</b></a>"; } ?><br /> <?php if (isset($_GET[report])) { echo "<br /><b>Detailed Report</b>   <small><font color='gray'>CPU Intensive. Do not re-run reports in rapid succession</font></small><br /><br />"; $cmd="/www/pineapple/karma/karmaclients.sh"; exec("$cmd 2>&1", $output); foreach($output as $outputline) { echo ("$outputline\n"); } } else { echo "<div id='log'>Karma Log:</div>"; } ?> </pre> </td></tr></table> </pre><!-- http://www.youtube.com/watch?v=KqL_nsSl_Fs //easter egg --> </body> </html> Edited May 16, 2012 by WatskeBart Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 18, 2012 Share Posted May 18, 2012 @ watskebart thank you very much sir. Worked like a charm.. but advanced_modules.php ist still a mediafire page..can it be that the file is somehow corrupt? can somebody please post the code of the original advanced_module.php file? Thank you very much ! Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted May 18, 2012 Author Share Posted May 18, 2012 I verified and the mediafire download is working fine. You have to download and copy the file to your pineapple to make it work. Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 18, 2012 Share Posted May 18, 2012 I verified and the mediafire download is working fine. You have to download and copy the file to your pineapple to make it work. Sorry for the false alarm ! I wget the modules_advanced.php from my web server and somehow it got corrupted in transit.. I added a .bin and then it transfered without problem.. I wanted to use winSCP but it tells me there is no sftpserver running..where can I enable it to make sure this error doesnt occur a second time. Anyway thanks for helping the noob :) Quote Link to comment Share on other sites More sharing options...
Cubert Posted May 18, 2012 Share Posted May 18, 2012 Guys, I am getting an error with the get_file_content function in PHP. In both Modules.php and in this new advanced_module.php. ERROR= Warning: file_get_contents(modules/moduleList) [function.file-get-contents]: failed to open stream: No such file or directory in /www/pineapple/modules_advanced.php on line 96 I am getting failed to open stream. If I do a wget to same url from the PA I have no problem pulling down the text file. Does anyone know why get_file_contents would have an issue with this or is there another possible reason this may fail? Thanks all for any insight. CubeDweller Quote Link to comment Share on other sites More sharing options...
WatskeBart Posted May 18, 2012 Share Posted May 18, 2012 I wanted to use winSCP but it tells me there is no sftpserver running..where can I enable it to make sure this error doesnt occur a second time. Setup WinSCP to use SCP protocol instead of SFTP ;) Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 18, 2012 Share Posted May 18, 2012 (edited) Setup WinSCP to use SCP protocol instead of SFTP ;) I owe u a drink ! @ cubert.. i cannot see that this is related..as i am a linux dumbfuck but swore I am gonna learn it and the pineapple seems like a good motivator..i like hard puzzles ^^ Everything worked fine but now i cannot check for updates or get the modules list..and as i can ssh see the web and routing tables are correct..I assume pretty much your error IS related and the modules/pineapple repos are down? yeah the OPKG Manager also works smooth.. Edited May 18, 2012 by Yamada Taro Quote Link to comment Share on other sites More sharing options...
Yamada Taro Posted May 18, 2012 Share Posted May 18, 2012 @ cubert ..now it works again..do you still have the same problem? Quote Link to comment Share on other sites More sharing options...
Cubert Posted May 19, 2012 Share Posted May 19, 2012 (edited) With me I can wget the mod list. The php function get_file_contents is failing. The error is base on the stream it received or did not receive. I am going to copy off the modules_advance.php to my web server and see if I can recreate the same issue on my lamp in efforts to debug my error. Cubert Edited May 19, 2012 by Cubert Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted May 19, 2012 Share Posted May 19, 2012 Just dropping in to remind you guys that there is hope on the horizon: V2 of the module system is going to be released soon. Best, Sebkinne Quote Link to comment Share on other sites More sharing options...
RebelCork Posted May 20, 2012 Share Posted May 20, 2012 (edited) Removed Files are duds, they overwrite the navbar.php file with a link to mediafire and some redirect code. Funny little script kiddie we have. First post is to give shortcuts for other users. Not good at all. Only trust tips on downloading modules to the author themselves, such as WM and BrianZimm. Somebody please delete this twats links above before he does moe damage Edited May 20, 2012 by Sebkinne 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.