astinomia Posted September 18, 2020 Share Posted September 18, 2020 Once I've installed the Evil Portal Module, I select the module and I am prompted to install missing dependencies but even though I am connected to a WiFi network, I get the following error message: "Could not connect to internet." Is anyone else getting this issue? Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Hey @astinomia this is probably happening because your pineapples clock hasnt been synced yet causing there to be certificate errors when trying to install dependencies. To check this, if you can open up the terminal and run `opkg update`. If that succeeds then you should be good to installing the dependencies. If it fails you can either wait for ntp to sync up your clock (should be every few minutes) or manually make it sync by running `/etc/init.d/ntpd stop && /etc/init.d/ntpd start` Let me know if this solves your problem 1 Quote Link to comment Share on other sites More sharing options...
astinomia Posted September 18, 2020 Author Share Posted September 18, 2020 The `opkg update` command seem to work fine. When I run `/etc/init.d/ntpd stop && /etc/init.d/ntpd start`, it says "bash: /etc/init.d/ntpd: No such file or directory". Sometimes before the Dependencies window has time to load I see this error: "dial unix /tmp/modules/evilportal.sock: connect: resource temporarily unavailable". I'm guessing that is because I'm missing the dependencies or because it hasn't fully loaded?. Also, its probably meaningless but I'm only seeing two rows instead of three of the "Could not connect to internet." error now. Restating doesn't seem to help. Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Do you mind posting the output from the opkg update? Quote Link to comment Share on other sites More sharing options...
astinomia Posted September 18, 2020 Author Share Posted September 18, 2020 15 minutes ago, newbi3 said: Do you mind posting the output from the opkg update? Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Can you post the output from the EvilPortal log? `cat /tmp/modules/evilportal.log` Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Looks like this might be a DNS issue. Are you able to `ping example.com` from your pineapple? Quote Link to comment Share on other sites More sharing options...
astinomia Posted September 18, 2020 Author Share Posted September 18, 2020 Works fine. root@mk7:/pineapple# ping google.com PING google.com (172.217.1.174): 56 data bytes 64 bytes from 172.217.1.174: seq=0 ttl=114 time=33.915 ms 64 bytes from 172.217.1.174: seq=1 ttl=114 time=41.330 ms 64 bytes from 172.217.1.174: seq=2 ttl=114 time=28.066 ms 64 bytes from 172.217.1.174: seq=3 ttl=114 time=29.491 ms 64 bytes from 172.217.1.174: seq=4 ttl=114 time=29.997 ms 64 bytes from 172.217.1.174: seq=5 ttl=114 time=27.758 ms 64 bytes from 172.217.1.174: seq=6 ttl=114 time=30.324 ms 64 bytes from 172.217.1.174: seq=7 ttl=114 time=28.259 ms 64 bytes from 172.217.1.174: seq=8 ttl=114 time=29.914 ms 64 bytes from 172.217.1.174: seq=9 ttl=114 time=28.570 ms ^C --- google.com ping statistics --- 10 packets transmitted, 10 packets received, 0% packet loss round-trip min/avg/max = 27.758/30.762/41.330 ms Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Can you hit example.com specifically? This is what the module is using to try to determine if there is an internet connection. If that does work then create a file on your pineapple called `internet_check.py` and paste this in it from pineapple.helpers import network_helpers print(network_helpers.check_for_internet()) save it then run `python3 ./internet_check.py` If its able to connect it should print True otherwise it will print False. If it does say false, edit the second line to look like this: print(network_helpers.check_for_internet(timout=5)) (Make sure you don't spell `timeout` correctly.. I just noticed a typo I made in the library lol) Run the script again: `python3 ./internet_check.py` If that still says False, then for some reason the pineapple is having an issue resolving example.com. Change the line to look like this and try again: print(network_helpers.check_for_internet(url='http://www.google.com', timout=5)) Quote Link to comment Share on other sites More sharing options...
astinomia Posted September 18, 2020 Author Share Posted September 18, 2020 root@mk7:/pineapple# ping example.com ping: bad address 'example.com' Running the first & second version : root@mk7:/pineapple# python3 ./internet_check.py False Running the third version (url='http://www.google.com', timout=5)): root@mk7:/pineapple# python3 ./internet_check.py True Weird... Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 20 minutes ago, astinomia said: root@mk7:/pineapple# ping example.com ping: bad address 'example.com' Running the first & second version : root@mk7:/pineapple# python3 ./internet_check.py False Running the third version (url='http://www.google.com', timout=5)): root@mk7:/pineapple# python3 ./internet_check.py True Weird... Seems like something might be going on with your internet connection then. Are you able to get to http://example.com in your web browser? A temporary fix for your issue - just to get you up and running - is to edit this file: `/usr/lib/pineapple/pineapple/helpers/network_helpers.py` Change `http://www.example.com` in the following line to `http://www.google.com` def check_for_internet(url: str = 'http://www.example.com', timout: int = 1, logger: Optional[Logger] = None) -> bool: 1 Quote Link to comment Share on other sites More sharing options...
astinomia Posted September 18, 2020 Author Share Posted September 18, 2020 1 minute ago, newbi3 said: Seems like something might be going on with your internet connection then. Are you able to get to http://example.com in your web browser? A temporary fix for your issue - just to get you up and running - is to edit this file: `/usr/lib/pineapple/pineapple/helpers/network_helpers.py` Change `http://www.example.com` in the following line to `http://www.google.com` def check_for_internet(url: str = 'http://www.example.com', timout: int = 1, logger: Optional[Logger] = None) -> bool: Yes, I can open http://example.com in my browser, it seems to not work only on the pineapple. I changed it in the helper method, and it worked! 1 Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 18, 2020 Share Posted September 18, 2020 Glad to hear! This isn't is a permit solution but will work fine for now. We might pull this url out into a text file or make editable through the web interface in a future version of the firmware. 1 Quote Link to comment Share on other sites More sharing options...
Br@d Posted September 24, 2020 Share Posted September 24, 2020 ha same thing here I can resolve anything but example.com 1 Quote Link to comment Share on other sites More sharing options...
knokturnal Posted September 25, 2020 Share Posted September 25, 2020 thanks newbie modifying /usr/lib/pineapple/pineapple/helpers/network_helpers.py fixed it for me too on FW version 1.0.1 Quote Link to comment Share on other sites More sharing options...
newbi3 Posted September 29, 2020 Share Posted September 29, 2020 This should now be fixed in firmware version 1.0.1 Beta 3 and newer. If anyone has issues going forward please report it. 1 Quote Link to comment Share on other sites More sharing options...
Melroy Posted September 30, 2020 Share Posted September 30, 2020 I had connection problems installing dependencies and with opkg but clients could access the internet normaly. After I disabled IPv6 advertisements on my firewall (so the pineapple only had IPv4). The problem was solved. Quote Link to comment Share on other sites More sharing options...
newbi3 Posted October 2, 2020 Share Posted October 2, 2020 On 9/30/2020 at 3:06 PM, Melroy said: I had connection problems installing dependencies and with opkg but clients could access the internet normaly. After I disabled IPv6 advertisements on my firewall (so the pineapple only had IPv4). The problem was solved. Was this happening on the 1.0.1 Beta 3 version of the firmware? Quote Link to comment Share on other sites More sharing options...
Void-Byte Posted October 2, 2020 Share Posted October 2, 2020 (edited) 3 hours ago, newbi3 said: Was this happening on the 1.0.1 Beta 3 version of the firmware? Hey @newbi3, I wasn't able to get EvilPortal running on 1.0.1 BETA (reverting back to 1.0.0 worked later). It would install, but would skip the "Install Dependencies" page, and hang (with constant loading circles). I tried to pull from the log you mentioned, but it didn't exist... I even ran a search (find) and manually went through all the directories. Ended up flashing the firmware back to 1.0.0 and it then worked again. I forgot to mention. I originally flashed the recovery firmware because after uninstalling and then reinstalling the module it caused the exact same issue that I originally wrote to you about. It also made it so the portals couldn't be activated, previewed, etc... along with hanging of the "Start web server". Wish I had logs to give to you. If I encounter these issues again I'll make sure to dump them for you. Thank you for your hard work! Edited October 2, 2020 by Void-Byte Quote Link to comment Share on other sites More sharing options...
Melroy Posted October 2, 2020 Share Posted October 2, 2020 5 hours ago, newbi3 said: Was this happening on the 1.0.1 Beta 3 version of the firmware? Tested with the 1.0 en 1.01 beta. I use SophosXG 18 as firewall. And i only use IPv6 internally. On WAN of the firewall i have IPv4 only. Quote Link to comment Share on other sites More sharing options...
Foxtrot Posted October 2, 2020 Share Posted October 2, 2020 9 hours ago, Void-Byte said: ... I wasn't able to get EvilPortal running on 1.0.1 BETA (reverting back to 1.0.0 worked later). It would install, but would skip the "Install Dependencies" page, and hang (with constant loading circles). I tried to pull from the log you mentioned, but it didn't exist... I even ran a search (find) and manually went through all the directories. Ended up flashing the firmware back to 1.0.0 and it then worked again. I forgot to mention. I originally flashed the recovery firmware because after uninstalling and then reinstalling the module it caused the exact same issue that I originally wrote to you about. It also made it so the portals couldn't be activated, previewed, etc... along with hanging of the "Start web server". ... Hi, This was caused by a missing SSL dependency required by a recent change to the Python module API/Framework. It's been fixed in 1.0.1 Beta 4. Thanks for reporting this! 2 Quote Link to comment Share on other sites More sharing options...
Voizdev Posted January 20, 2021 Share Posted January 20, 2021 Hi, So I recently got a Pineapple Mk VII and the setup went pretty smooth up until i tried to install some dependencies for the modules MDK4, Evil Portal, and NMap. So for some background I am running on Beta version 1.0.2 (beta.2020111816551). I have the same issues using the stable 1.0.1. I have the Pineapple setup in wireless client mode. I have an active internet connection from my home router over wifi using WPA2-PSK. I can ping "google.com" "example.com" and "downoads.hak5.org" with no issues from the console so im not sure its DNS related. I can get the news and download the modules fine but when the alert shows up telling me I need to install dependencies for Evil Portal and I click install I get an error message stating "Could not connect to internet.Could not connect to internet.Could not connect to internet.Could not connect to internet.Could not connect to internet.Could not connect to internet." This is the same with MDK4 and NMap with the error message "Could not connect to internet." I also keep getting a time misconfiguration warning in the top right. I'm also getting notifications saying "could not connect to internet" from MDK4 and NMAP. I'm assuming this is my issue. I read thru the other suggested fixes and I ran the command "opkg update" with no errors. But I cannot seem to find the ntp daemon to restart it. It is not listed under /etc/init.d/ like the suggestion says. I have tried clicking the sync browser time button and I get the green check mark next to "User Management & Time" but the install still fails. Here is the Evil Portal log. https://pastebin.com/hZa7msCD . At this point I cannot find any more documentation on my issue and everything links me back to this thread. So I am going to post it here and hopefully someone has some advice. I see others had very similar issues using older versions of the firmware, and they seemed to somehow resolve them but none of the suggestions work for me or I'm not doing something right. Quote Link to comment Share on other sites More sharing options...
ColossalFossil Posted January 20, 2021 Share Posted January 20, 2021 I was having the exact same problem as Voizdev the last two days. The fix I'm using right now is to perform the fix where you change "https://example.com" in /usr/lib/pineapple/pineapple/helpers/network_helpers.py to "https://google.com." Then run "opkg update" from the shell, then reboot from the dot menu in pineAP. Once I reconnect, my modules seem to download just fine. I'm not sure exactly what I'm doing, or why this works, but it did. Quote Link to comment Share on other sites More sharing options...
ColossalFossil Posted January 20, 2021 Share Posted January 20, 2021 Note: it dosn't work permanently, after a second reboot I'll still have sync issues with the clock, but if you follow those steps it worked for a session, long enough to download. Quote Link to comment Share on other sites More sharing options...
Voizdev Posted January 21, 2021 Share Posted January 21, 2021 7 hours ago, ColossalFossil said: I was having the exact same problem as Voizdev the last two days. The fix I'm using right now is to perform the fix where you change "https://example.com" in /usr/lib/pineapple/pineapple/helpers/network_helpers.py to "https://google.com." Then run "opkg update" from the shell, then reboot from the dot menu in pineAP. Once I reconnect, my modules seem to download just fine. I'm not sure exactly what I'm doing, or why this works, but it did. So for me when I went to change the url in the network_helpers.py file and found the url was not what was listed above as "example.com". I found it pointing to "https://downloads.hak5.org/internet". I changed that line to "https://www.google.com" and this did not fix the issue for me. I then decided to try it without ssl and changed the url to "http://www.google.com" and still it did not work. I noticed in the network_helpers.py script there was a test for if the url had https in it so i figured maybe ssl was the issue. But after that i found a fix that worked to let me install all the dependencies. I went into each modules folder from the console and manually ran each module.py script for each module i was currently installing the dependencies for. This allowed the install them and I could watch it all print to the console. After this I would have to restart the pineapple for all the sockets to be open again and then everything worked fine. I did continue to see the time misconfiguration errors. But now a day later that error seems to not be happening anymore as I have not seen that message in the top right once after hours of messing with it. 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.