Jump to content

Mk-iv Idiots Guide


anode
 Share

Recommended Posts

I'm a linux re-rookie and have some understanding of networking.

Granted I jumped into the deep ed of the pool with cement knickers on :)

(one intention of this thread is as a pre-wiki thread)

I've got wired tethering working. (though being thru my Mac, I need to stop/restart it randomly)

USB drive working

SSh working

DNSSpoofing working (default)

But now my Qs: (buckle up and keep hands inside the ride at all times)

Where are the config files for various packages?

1 - What I'd like to do is, if available, log to a USB drive for big log/capture files, or the default settings if no usb drive. (I'm hoping its just bash scripts tweaks)

2 - I'm having trouble with the dns spoofing. The default works, kinda. It does its time out but then offers a url of www.twitter.com/twitter.com (for a twitter.com attempt)

the redirect.php kind eludes to this, but generates an odd url in the url bar, or on an android(browser) a file not found message.

What I'd like is to direct to a webpage on the usb drive.

(preferably different, depending upon the chosen url)

Link to comment
Share on other sites

Anode,

Specifically what configs are you looking for?

About DNS spoof, it works like this:

Let us say you add this entry: 172.16.42.1 *

That means that all domains are resolved as 172.16.42.1 ie the pineapple.

This in turn means that if you go to http://google.com/pineapple it will be the same as going to http://172.16.42.1/pineapple

The redirect.php is called upon by the index.html(or php, can't remember right now). What it does is it finds whatever the domain is (ie twitter, google, facebook, hak5, whatever) and redirects you to <nameOfDomain>.html

The reason why you get a 404 is simple - you haven't created any pages such as twitter.html I guess?

Best Regards,

Sebkinne

Link to comment
Share on other sites

With the DNS spoofing, you should be able to set up a handler for 404 errors to redirect (again) to something else (like the redirect.php, effectively stripping anything after .com). I can't write the steps as it's been years since I've worked on a webserver, but it should be possible... I may test it sometime later.

EDIT: .htaccess is what I was thinking about... but that doesn't work, tried a few different things with no luck.

Edited by Valsacar
Link to comment
Share on other sites

1 - What I'd like to do is, if available, log to a USB drive for big log/capture files, or the default settings if no usb drive. (I'm hoping its just bash scripts tweaks)

2 - I'm having trouble with the dns spoofing. The default works, kinda. It does its time out but then offers a url of www.twitter.com/twitter.com (for a twitter.com attempt)

the redirect.php kind eludes to this, but generates an odd url in the url bar, or on an android(browser) a file not found message.

What I'd like is to direct to a webpage on the usb drive.

(preferably different, depending upon the chosen url)

Check out this short guide on getting tcpdump on the usb drive http://www.wifipineapple.com/doku.php?id=tcpdump

The dns spoofing url is to be expected. A better way would be to use dnsmasq - something I'm considering adding in a future version. We used this method to do redirects on the MK2 with the rickroll, but IIRC isn't doesn't work domain by domain. You're welcome to try it -- just be forewarned that messing with the /etc/config/* files isn't recommended if you're not equipped to deal with a network unreachable situation. Sounds like you should be fine.

Link to comment
Share on other sites

The file you want is the uhttpd config file.

You will want something like this.

Regards,

Sebkinne

Thanks, that works perfectly.

Just added option error_page /index.html

save/close

uci commit uhttpd

/etc/init.d/uhttpd restart

Now the rick roll works on any url!

As Darren said, if you're not ready to troubleshoot a completely broken system... playing with config files isn't a good idea.

P.S. if you edit /etc/config/wireless you can change the essid of your pineapple to anything, and have it change over boot. Mine is now Public Wifi.

Link to comment
Share on other sites

Thanks, that works perfectly.

Just added option error_page /index.html

save/close

uci commit uhttpd

/etc/init.d/uhttpd restart

Now the rick roll works on any url!

As Darren said, if you're not ready to troubleshoot a completely broken system... playing with config files isn't a good idea.

P.S. if you edit /etc/config/wireless you can change the essid of your pineapple to anything, and have it change over boot. Mine is now Public Wifi.

Valsacar It works mahahaha lol

here is what I did

nano /etc/config/uhttpd

option error_page /index.php

uci commit uhttpd
/etc/init.d/uhttpd restart

EDIT: Code has been changed to /index.php I had a brain fart and didn't thing to link back to the landing page.

In case you use multiple folders for your index.html files make sure to place a / in the landing page or you will get an infinite loop:-(

IE /htmlfiles/nyan/index.html and not htmlfiles/nyan/index.html

now as far as i can tell all web browsers get redirected regardless if there are folders inside there links

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