Depends if you wait for the release of my "Internet Prober" program (I've got it finished, I'm just working on the documentation now, so it'll be out in the next few days).How would I find the correct settings if I wasn't connected to the network all ready from my mac?
For now though, here's what you do.
1) First of all, open up Wireshark and see what IP addresses there are on the network. If you see the likes of "192.168.1.7", then you can be pretty sure the network is "192.168.1.0/24".
2) Next do a netdiscover to get a list of all the hosts:
Code:netdiscover -i wlan0 -r 192.168.1.0/24"
3) Give yourself a unique IP address:
4) Try adding 192.168.1.1 as your gateway, or maybe 192.168.1.254 (The first and the last are the most commonly used IP's for gateways).Code:ifconfig wlan0 192.168.1.123 netmask 255.255.255.0
Hopefully it will be that easy. Sometimes though, it's more complicated, which lead me to actually write a program to do the work for me. My Internet Prober program works by doing the following:
1) Send ARP requests to the entire network to get a list of hosts (similar to netdiscover)
2) Next, send a public IP packet to the MAC address of every host, and hope that you get a reply from one of them. The one that replies will flash on screen as the default gateway.
And as for DNS server, well that's easy, use a public one: 126.96.36.199