Jump to content
dem2144

Connect Wifi Pineapple Nano to mysql

Recommended Posts

Good afternoon,

I am working on a project to see if it is possible to record the mac addresses that appear in the recon mode or devices that connect to the wifi pineapple network. Is this possible? if so please let me to the right direction to perform this solution. Thanks,

Share this post


Link to post
Share on other sites

I'm not sure what the title is referring to, but - you can read all the MAC addresses from your Recon results by browsing the sqlite3 database in /tmp/recon.db (or the path you specified via the Web UI).

 

 

Share this post


Link to post
Share on other sites

Thank you for responding. Well, basically I need to be able to export the data from the recon.db file and import it into my host MySQL database some way. I am also attempting to find a solution without having to do it manually. 

Here are the steps I am attempting to automate

1. Run a time interval recon scan report
2. Export the report (it could be in a recon.db file or direct connection to my host server)
3. Import the new data into my hosted MySQL database via insert query

If this is not possible
Then I would not mind being able to export the recon.db generated file to my local machine and then I can run a script to complete the solution.

Whatever recommendations you would be appreciated. Thank you for your help.

Share this post


Link to post
Share on other sites

You'll be able to run a recon scan for a specified amount of seconds with 'pineap /tmp/pineap.conf run_scan <seconds>  0'. If the PineAP Daemon is not running, start it with '/etc/init.d/pineap start'.

The WiFi landscape that Recon sees will get written to /tmp/recon.db. The SQLite has multiple tables for APs and Clients. You can see more in depth by just opening it with sqlite3 or similar tool to browse the DB. You will have to do the importing to MySQL on your own.

Use cron to automate the process every X hours, etc.

Share this post


Link to post
Share on other sites

Thank you, with your guidance, I was able to solve my problem. sqlite3, batch files, and task scheduler became my new friends during my research.

My final issue if you could help me, please. I would like to temporarily allow the user to connect to the network using EP so that I can run a query and then I want to close the connection and return them to the captive portal. I believe this line
"exec("iptables -t nat -I PREROUTING -s {$clientIP} -j ACCEPT");"
In the portal.php is the line that connects the user to the network. How can I drop the user from the network AFTER they connect and then redirect them to a "confirmation page" within EP? 

Share this post


Link to post
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...