Jump to content

[Support] Portal Auth


sud0nick
 Share

Recommended Posts

should i try re-flash the pineapple and reinstall?

Please don't reflash the Pineapple. It is almost never necessary to reflash for simple issues.

also when running on kali/iceweasel i get that install new dependencies popup you created for portal auth poping up at the bottom of the screen, its like always there, despite everything being installed properly (atleast it all seems to have installed properly).

hmm...I've used it on Iceweasel in Kali and didn't have that problem. I'll look into it and see if I can replicate the issue.

As for the payload, how did you make it and how big is it? Does an error log appear in the Error Logs tab?

Link to comment
Share on other sites

  • Replies 262
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

yea i get these two errors

install_depends_error_11_41_37.txt

mkdir: can't create directory '/sd/tmp/portalauth': File exists md5sum: can't open 'beautifulsoup4-4.4.0.tar.gz': No such file or directory sh: 63d1f33e6524f408cb6efbc5da1ae8a5: unknown operand MD5 of BS4 does not match

and

payload_upload_error_13_51_12.txt

The following directory does not exist and could not be created /www/download/windows/

concerning compiling the file its (netcli.exe) 4.7mb and i did that in a windows 7 vm... i ran the ./setup_win.py (without the word python in front in cmd i think) I think i installed pytoexe properly and python2.7 latest version)

P.s. today i upgraded from version 2.7 to 2.8 portal auth via the pineapple bar install upgrade thing you setup

cheers

Edited by onion2346
Link to comment
Share on other sites

SSH into your Pineapple and create the download directory in /www

mkdir /www/download/

Then try uploading again. I'll have to check if the script ensures the /www/download directory exists before trying to create the windows directory.

While you are SSH'd in go ahead and remove the tmp/portalauth directory. It looks like it didn't get cleaned up after a failed install.

rm -rf /sd/tmp/portalauth

Let me know how this works out.

Edit: I have confirmed there is an issue with the importPayload function not creating directories recursively. If you create the /www/download/ directory then all other necessary directories will be created when you upload OS specific payloads. I've already implemented a fix for this problem that will be in the next release.

As for the issue with installing depends, I still believe the issue is with the old tmp data remaining in /sd/tmp/portalauth. I just uninstalled my depends and reinstalled them from within IceWeasel on Kali 2 with no problem. I've also added a command to delete the portalauth temp data in the install_depends script before it attempts to recreate the directory and download the depends.

Finally, I could not recreate the issue with the dependency popup that you mentioned. Here are screenshots from my Kali instance in IceWeasel both during and after installation of depends.

mZ0xUmN.png

egip3IW.png

Edited by sud0nick
Link to comment
Share on other sites

Hi Sudonik,

Yea that popup was still there, so i decided to re-flash the firmware and the format the sd.

I reinstalled the portal auth app and now when i click on install dependencies button, nothing happens at all, and no errors logged/displayed. tried this in chrome on mac and in kali vm? :(

not sure what happened now. so i just removed portal auth for now via the pineapple bar.

will wait till you update the next one or on your advice will try again to install...

looking forward to getting it up and working as I like this program!

cheers mate!

onion

Link to comment
Share on other sites

So it appears the depends installed properly but told you they did not. After installing them manually did you check the ./check_depends.sh script again or try from the web GUI? What browser are you using and did a progress bar come up when you clicked Install Depends or did an error come up?

Hi sud0nick,

Here are the steps in order and what the results were:

1) Factory Pineapple (I do this to test any infusion, gives me a baseline)

2) Connect to my local wifi via client mode through the web interface

3) Open Pineapple bar and install portalauth to the sd card

4) Open a ssh terminal session and run top (to watch the processes)

5) Refresh the browser and click on "Install Dependencies"

6) Wait - 5min (no change to the link, no mention that anything is being installed, top command in the terminal shows no new processes loading)

Tried this with both Firefox and Safari.

7) execute /sd/infusions/portalauth/includes/scripts/check_depends.sh

Not Installed

8) execute /sd/infusions/portalauth/includes/scripts/install_depends.sh

Looks like it starts to install (takes a bit of time, but I think that is normal)

Then I get the following output:

zip_safe flag not set; analyzing archive contents...
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
no previously-included directories found matching 'docs/_build'
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
no previously-included directories found matching 'docs/_build'
zip_safe flag not set; analyzing archive contents...
tinycss.tests.speed: module references __file__
Complete

9) execute /sd/infusions/portalauth/includes/scripts/check_depends.sh

Installed

10) refresh the web browser and see that the small tile no longer says "Install dependancies" but is now blank.

11) click to open the large tile and get the following error in large Red text:

Test server must be configured!

No other options are available on the large tile.

Small tile shows no information.

Thanks for looking into this for me.

PT

Edited by phibertap
Link to comment
Share on other sites

I'll continue to look into this. When you click "Install Dependencies" you should see an overlay appear on the page where you click another button which actually executes the install_depends.sh script. I'll perform some tests later and take screenshots of what I find.

Link to comment
Share on other sites

Hi Sudonik,

Yea that popup was still there, so i decided to re-flash the firmware and the format the sd.

I reinstalled the portal auth app and now when i click on install dependencies button, nothing happens at all, and no errors logged/displayed. tried this in chrome on mac and in kali vm? :(

not sure what happened now. so i just removed portal auth for now via the pineapple bar.

will wait till you update the next one or on your advice will try again to install...

looking forward to getting it up and working as I like this program!

cheers mate!

onion

Have you tried clearing your cache in the browser? Throughout testing I had to clear the cache whenever I used a new version of my CSS code. I think you have a cached version of the CSS code from previous versions in your browser.

Link to comment
Share on other sites

I flashed my Pineapple and have been able to reproduce the dependency issues. I'm working on them now.

Edit:

The issues have been fixed, v2.9 has been submitted to the Pineapple bar, and I updated my GitHub page with the current version. If you want to download from GitHub just make sure you change the permissions on the infusion after uploading to the Pineapple. It seems to lock it down to root simply because that is who uploads it.

cd /sd/infusions/
chmod -R 755 portalauth/*

Thanks phibertap and onion2346 for bringing these issues to my attention.

Edited by sud0nick
Link to comment
Share on other sites

Hi Sudonik,

just updated to 2.9!

however, when uploading windows payload, now get this error

payload_upload_error_06_42_04.txt

The destination directory exists but for an unknown reason the file failed to upload. This is most likely because you are still using the default upload limit in nginx.conf and php.ini. Go to the Payload tab -> NetClient tab and click on the link 'Configure Upload Limit'.

p.s. i clicked that "configure upload button" and it said it was successful? also tried rebooting the pineapple...

Cheers,

onion

Edited by onion2346
Link to comment
Share on other sites

You really shouldn't be running into this issue. Let's go over the code and you might be able to find where it's failing along the way.

    function importPayload($file, $dir) {

        // Check if the directory exists, if not then create it
	if (!file_exists($dir)) {

                // If creation fails, log the error and stop execution
		if (!mkdir($dir, 0755, true)) {
			logError("payload_upload_error", "The following directory does not exist and could not be created\n" . $dir);
			return false;
		}
	}

        // Strip out some unwanted chars from the file name
	$file['name'] = str_replace(array( '(', ')' ), '', $file['name']);

        // Combine the file name with the destination directory
	$uploadfile = $dir . basename($file['name']);

        // Move the uploaded file to its new destination and stop execution if successful
	if (move_uploaded_file($file['tmp_name'], $uploadfile)) {
		return true;
	}

        // Log an error if it fails
	logError("payload_upload_error", "The destination directory exists but for an unknown reason the file failed to upload.  This is most likely because you are still using the default upload limit in nginx.conf and php.ini.  Go to the Payload tab -> NetClient tab and click on the link 'Configure Upload Limit'.");
	return false;
    }

The function above is what imports the payload. It takes two arguments, the uploaded file and a destination directory. It first checks if the directory exists, and if not it attempts to create it. If the creation of the directory fails the error is logged (like you saw before yesterday's update) and execution stops. Next, it strips out some unwanted characters from the file name, creates the path to the destination, and attempts to move the uploaded file to its destination. At this point, if it fails it is difficult to determine the reason. The move_uploaded_file function returns either true or false and not a reason why the upload fails. The only reason I can think of is that the upload limit was not configured properly meaning you can't upload files larger than 2MB.

If you click the help icon next to the Configure Upload Limit link on the NetClient section of the Payload tab you should see the files, and configurations, that get configured. Look in those files for those configurations and make sure they've actually been changed.

If you are still having problems then try to make a video, or take multiple screenshots, of the steps you're taking from compiling the payload to uploading. It really should be working.

Edited by sud0nick
Link to comment
Share on other sites

just tried to install portal auth again (100th time) and surprise surprise ! dependancies fail to install

i really like the big annoying pop up that wont go away afterwards until uninstalled.

good luck with your infusion hope you actually get it to work on other peoples pineapples .

Link to comment
Share on other sites

@hairbag:

Errors are bound to arise at times in a program that is continuously improving. If it took you one hundred attempts to realize my infusion was your problem, without gathering any actual evidence to submit a professional request for help in this thread, then you obviously can't be helped. If you want to take the time to figure out the problem with me (by providing videos, screenshots, additional information about your environment, etc.) I will be glad to help you but just bashing my infusion and blaming it on what are most likely your own mistakes will not get you anywhere. If you don't want to use my infusion then please don't. I promise you that I, and many others who can solve trivial issues, will continue to make good use of it.

Edited by sud0nick
Link to comment
Share on other sites

release after release your infusion simply doesnt work, its broken , buggy, doesnt install properly and doenst work if it actually does install. works great for you though hey? you are right its my fault for clicking on install infusion and then trying to get your broken code to work after it has failed time after time after time.

the long line of others having the same issues should be a clue to you but its only me bashing you!!!!

its a poor poor developer who blames his broken code on the people trying to use it!!!

Link to comment
Share on other sites

release after release your infusion simply doesnt work, its broken , buggy, doesnt install properly and doenst work if it actually does install.

According to you who can't even get his Pineapple to work in general. I've seen your posts in other threads about how v2.4 of the firmware is "buggy" and PineAP, Evil Portal, and Portal Auth are terrible infusions even though they are some of the most popular.

you are right its my fault for clicking on install infusion and then trying to get your broken code to work after it has failed time after time after time.

It is obvious there are other underlying problems with your Pineapple from things you've probably screwed with. I've offered to help you and you don't accept it although it appears you desperately need it.

the long line of others having the same issues should be a clue to you but its only me bashing you!!!!

There is only one other person who has commented about the "popup" issue which you still haven't described to me. If you have read the other posts you should know that I more than willing to help solve this problem but it is obviously not a widespread issue as others (such as onion2346) have been able to install dependencies just fine.

Again, I am willing to help if you're willing to work with me on it. Keep in mind that I couldn't care less if you use the infusion or not. I don't get paid to keep this infusion updated nor to provide support. When I offer my free time to fix issues just remember that's when I get home from my day job. So, either accept my help, learn how troubleshoot, or go be a keyboard commando somewhere else.

Link to comment
Share on other sites

Trust sud0nick and his help offered, and just... relax. he's a good guy. Your frustration is understandable, but instead of bashing his great work he's done on this, work with him to get some problems you are having, solved.

I for one am currently enjoying the recent builds of portal auth. Thanks sud0nick for the continued development, and amazing support and implementation of such tools :-)

Link to comment
Share on other sites

after installing from pineapple bar and repeatedly failing to install dependencies through web interface i tried running

/sd/infusions/portalauth/includes/scripts/check_depends.sh

not installed

and

/sd/infusions/portalauth/includes/scripts/install_depends.sh

check_depends.sh again and now says installed

tile shows no captive portals detected and no messages about dependencies. ( just the giant annoying pop up that wont go away until you uninstall the infusion completely)

error message which is completely wrong...the sd/tmp directory is empty and clean no portal auth folder in there or anything else.

rm: can't remove '/sd/tmp/portalauth/setuptools-18.2/build/lib/setuptools': Directory not empty rm: can't remove '/sd/tmp/portalauth/setuptools-18.2/build/lib': Directory not empty rm: can't remove '/sd/tmp/portalauth/setuptools-18.2/build': Directory not empty rm: can't remove '/sd/tmp/portalauth/setuptools-18.2': Directory not empty rm: can't remove '/sd/tmp/portalauth': Directory not empty mkdir: can't create directory '/sd/tmp/portalauth': File exists md5sum: can't open 'beautifulsoup4-4.4.0.tar.gz': No such file or directory sh: 63d1f33e6524f408cb6efbc5da1ae8a5: unknown operand MD5 of BS4 does not match

for some reason iceweasel cant get the full screen shot of what the actual pop up annoyance is doing but is awesome! had to take a photo of it with my phone, if i click on the install button on the pop up and it goes away. if i refresh the page or browse into a tile and back out the whole scuffufle start over with the broken depends in the portal auth tile and the annoying pop up. reboot come back same thing. check_depends.sh not installed, run install_depends says installed back out to web interface for it all to start over.

please feel free to explain how any of that SHIT is in anyway my fault!!!!

post-49736-0-27599500-1443918457_thumb.j

Edited by hairbag
Link to comment
Share on other sites

Maybe the color on the picture is off but it looks like you've modified your web interface. Did you happen to change any class names or id tags? I'm thinking this isn't the problem because you've stated that you have re-flashed your Pineapple but it would be good to check it out anyway.

That error log is probably from a previous failed install attempt. Just to be sure your dependencies are installed correctly and there isn't extra junk, check out your /sd/depends and /usr/lib/python2.7/site-packages directories. The latter is where python packages are normally installed but since the packages for Portal Auth are too large for the internal storage of the Pineapple the whole directory gets moved to /sd/depends and symlinked. Make sure the symlink exists and everything exists.

Since you have stated that you have had trouble installing Portal Auth in the past from the Pineapple Bar try downloading it from my server if you want to try a clean install. If downloading from the Pineapple Bar causes issues then there are problems with your Pineapple unrelated to Portal Auth. The infusion is simply a .tar.gz that get's downloaded and extracted to your infusions directory. Run the following commands from an SSH console to download and install Portal Auth v2.9 from my server.

wget http://www.puffycode.com/download/PortalAuth/portalauth_latest.tar.gz
tar -xzf portalauth_latest.tar.gz -C /sd/infusions
rm -rf portalauth_latest.tar.gz

If the overlay still appears then try checking the browser console (normally F12 will open it) to see if any errors are logged there. If the dependencies are installed properly but that overlay is still there please don't click Install again. Although it should just remove the depends and reinstall them without error you shouldn't waste your time with that and if an install operation was already running in the background it could cause them to clash and give you more headaches.

I hope this helps and if not just keep coming back with more information and we'll get it fixed.

Edit:

If you happened to change your web interface post your style code here and I'll put it in my Pineapple to see if I can duplicate the issue.

Edited by sud0nick
Link to comment
Share on other sites

i may have figured out the problem

first of all.....all of the problems i have had with my pineapples started back a few months ago when i tried to update the portal auth (1.5 i think it was) infusion through the pineapple bar. during the update both pineapples got bricked and were nearly unrecoverable even with the factory reset and unbricking proceedures. since then neither would install or run evil portal , portal auth and a few other infusions without the pineapples going into retard mode . both have had strange pwned like beahviours ever since like an open tcp port on 7777(which i have never used in my life) responding to nmap scans and returning data after numerous factory resets . hmmmmmmm!!!???????

the problem is in the main tmp folder. manually deleting all files in there and rebooting the pineapple fixed the recurring notifications,the popup and the flip flopping dependencies. for some reason the files in there were/are not getting erased or deleted when resetting or reflashing the pineapple.

how to fix

wiped browser cache and pop up still there

uninstalled all infusions from pineapple bar

formated sd card and verified it was wiped (pop up now gone but returns if portal auth is installed, format again)

***** manually deleted all files from the main tmp folder and rebooted (pop up and notification error now gone)

bypassed annoying dip switch process

factory reset and reflashed

installed evil portal and deps and rebooted

installed captive portal and deps and rebooted

and amazingly for the first time in nearly a year that i have been fighting with this i actually managed to clone a portal and activate it!!!

Edited by hairbag
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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...