M@T Posted March 13, 2010 Posted March 13, 2010 It works fine under Windows, there's just the blue screen and the "Communication error" message with Platinum, but the Pokémon is retrived from GTS and placed in Box 1, so it's OK. Very good job LordLandon ! :biggrin:
LordLandon Posted March 13, 2010 Posted March 13, 2010 If it tells you 0.0.0.0 or 127.0.0.1, sorry, but you're going to have to find the IP address of the computer yourself - you can look in your network properties (i think it's under some detailed tab). In the meantime, I'll see if there's a more reliable way of getting that IP.
derrick Posted March 13, 2010 Posted March 13, 2010 so would i have to be on the same net work as my computer for this to work?
M@T Posted March 13, 2010 Posted March 13, 2010 (edited) Yes, your DS must be able to connect to your computer whitch acts as a DNS server, so it has to be in the same network because the IP address given is the local one. I was wondering, if you forward your port 53 so that it is reachable from the Internet, can you set your computer's public IP as the DS's primary DNS server ? If so, it might be possible to make an unofficial GTS server, right ? EDIT : I managed to connect to a friend's computer on whitch the sendpkm.py script was launched and I recieved the .pkm he chose, so I think it could be possible to make an unofficial GTS server. Edited March 15, 2010 by M@T
Tsuji Posted March 16, 2010 Posted March 16, 2010 I'm trying to run this script on a Mac running OS X 10.4.11 with Python 2.6.4 and I get a syntax error on line 35. computer:~ user$ sudo /Users/user/Desktop/sendpkm/sendpkm.py Password: File "/Users/user/Desktop/sendpkm/sendpkm.py", line 35 end+="\x03" if ord(pkm[64])&4 else chr((ord(pkm[64])&2)+1) #gender ^ SyntaxError: invalid syntax Can anyone advise?
derrick Posted March 16, 2010 Posted March 16, 2010 so does that mean its possable from another network? and if so how?
M@T Posted March 16, 2010 Posted March 16, 2010 so does that mean its possable from another network?and if so how? Yes, it's possible. I had to write a small DNS server in Python whitch redirected to my friend's IP address if the DS asked for gamestats2.gs.nintendowifi.net, 209.67.106.140 if it asked for conntest.nintendowifi.net, and 209.67.106.141 for nas.nintendowifi.net. It worked fine. I am now writing this program in VB.NET, because it's easier for me, as I don't know Python very much.
codemonkey85 Posted March 16, 2010 Posted March 16, 2010 Hey M@T, great idea! I'll be interested to see where that goes.
arthurneo Posted March 16, 2010 Posted March 16, 2010 I'm trying to run this script on a Mac running OS X 10.4.11 with Python 2.6.4 and I get a syntax error on line 35. computer:~ user$ sudo /Users/user/Desktop/sendpkm/sendpkm.py Password: File "/Users/user/Desktop/sendpkm/sendpkm.py", line 35 end+="\x03" if ord(pkm[64])&4 else chr((ord(pkm[64])&2)+1) #gender ^ SyntaxError: invalid syntax Can anyone advise? =============== i saw landon post in another page, i tried with mac and it worked go to terminal. write sudo python (path to sendpkm.zip) (path to pokemon) You can drag the files to terminal, and you it will automatically write the paths.
M@T Posted March 17, 2010 Posted March 17, 2010 Hey M@T, great idea! I'll be interested to see where that goes. Here is what I've done so far : http://www.mediafire.com/file/20jjz2mjynl/DNS Server.zip I took the DNS server part of the sendpkm.py script as a base for my program, but I made all the rest from scratch. The source can look dirty, that's because it's still under development. :tongue: As I can't test it with my DS for now, I tested it as primary DNS server on my computer and it works without problem. :smile: Now, how it works : For every DNS request it recieves, the program forwards the request to a real DNS server and gets the answer. If the client wanted to resolve gamestats2.gs.nintendowifi.net, then the program replaces the real IP address by a custom one (the address of the fake GTS server for example). Otherwise, it simply forwards the answer. PS : before that, I didn't know anything about the structure of DNS requests & replies, so there may have some things that can be improved. :biggrin:
derrick Posted March 17, 2010 Posted March 17, 2010 can you tell me how to use that dns server download?
M@T Posted March 17, 2010 Posted March 17, 2010 I included the source, the .exe can be found in bin\release\. Using it is very easy : launch the binary, enter the server's IP address (it must have opened its port 80 and lauched the sendpkm.py script with a 236 Bytes .pkm) and set the DS's primary DNS server as your computer's IP address. Then go to the GTS center and connect to the Nintendo WFC, the Pokémon should come into your game. As it is still a test version, it may not work properly. I posted it mainly for codemonkey85, who seems to be interested in it. :wink:
shino Posted March 18, 2010 Posted March 18, 2010 From what I've been able to glean from the source code (didn't learn python here either, chose ruby instead, whoops), there's actually nothing stopping the script from working fully on a public IP. If you know your public IP and have ports tcp80 and udp53 forwarded, you should be able to run this and have anyone setting their dns server to the spoof connect fully. That is, in theory -- in practice, I've been completely unable to have people connect to it running on different boxes on different networks, leading me to believe I'm just missing something in the code. M@T, is there a specific reason why you had to write a separate DNS server? Why were you unable to just connect to your friend running his spoofed dns server, with ports 53 and 80 forwarded?
deezenuts Posted March 18, 2010 Posted March 18, 2010 I have ports 53 and 80 forwarded on my router & static IP but it still says they are closed when I go to port checker. *(Port 80 is apparently open now) M@T's program actually gets me in the GTS but a few seconds later I get the message of "An error occurred while attempting to communicate (00000) Please turn off the power, restart this DS system, and try again. If this message keeps appearing, please contact Nintendo Consumer Service."
M@T Posted March 18, 2010 Posted March 18, 2010 M@T, is there a specific reason why you had to write a separate DNS server? Why were you unable to just connect to your friend running his spoofed dns server, with ports 53 and 80 forwarded? I was unable to connect to his DNS server ; even if his port UDP 53 was forwarded, it was not reachable, I don't know why. But anyway, even if you manage to connect to it through the Internet, the DNS part of the Python script indicates the local IP to the DS, e.g. 192.168.1.2, whitch is not the public IP, so it won't work. I have ports 53 and 80 forwarded on my router & static IP but it still says they are closed when I go to port checker.*(Port 80 is apparently open now)" That was exactly my problem. M@T's program actually gets me in the GTS but a few seconds later I get the message of "An error occurred while attempting to communicate (00000) Please turn off the power, restart this DS system, and try again. If this message keeps appearing, please contact Nintendo Consumer Service." I think you tried with a 136 bytes .pkm file, you must use a 236B .pkm (extracted from your team, not from a box). I used to have the same problem, until I noticed that the size wasn't correct. :biggrin:
イーブ&# Posted March 18, 2010 Posted March 18, 2010 Whoa, I guess I'm late to this party. I grabbed a packet dump of a wifi trade just this past weekend, intending to reverse engineer a fake client for third-party GTS/self-trading/storage/other shenanigans. Never thought to try reversing the GTS instead. If nobody else has attempted it yet, I'd certainly be interested in hacking together a more permanent fake trading server.
M@T Posted March 18, 2010 Posted March 18, 2010 I don't know, since I am unable to test my program with a DS for now ; but as I already said, it is just a test version for codemonkey85 who wanted to see it. :smile:
deezenuts Posted March 18, 2010 Posted March 18, 2010 (edited) SUCESS! Here's what I did Added Static IP to PC/Router Used DMZ option on router to open all ports forward ports 80 and 53 on router (to make sure these fucking ports get it IN) A pokemon with 236 Bytes AND THAT CAN BE OPENED IN A PARTY SLOT IN POKESAV (This is where i fucked up, it must be able to open in a party slot in pokesav) Turn off Windows Firewall (It blocks ports even though you opened them) and voila! Even though port 53 said wasn't opened it still worked with the above. Only Port 80 showed that it was open. Apparently it only shows that it's open if you are using the port I used M@T's DNS Server and Professor Landon's sendpkm.py script. Edited March 19, 2010 by deezenuts
M@T Posted March 18, 2010 Posted March 18, 2010 Just one question : did you start my DNS server in the same network as the DS, or was it in a remote network ?
deezenuts Posted March 18, 2010 Posted March 18, 2010 Same network, unfortunatly I cannot test this as of right now
M@T Posted March 18, 2010 Posted March 18, 2010 OK, that's was I thought. So the problem was only because of the .pkm file ? Anyway, thanks for the feedback. :wink:
shino Posted March 19, 2010 Posted March 19, 2010 I (think) I rewrote the original pokehaxlib.py to enable public access (with a manually supplied public IP) but even with 53 and 80 definitely forwarded and accessible I'm having no luck. Guess I'll either try from the bottom and write a completely new script or figure out an alternative. Just to be sure though, LordLandon - if under your dnsspoof function I return a public IP, the DS should attempt to connect to it, correct? I basically just replaced me="".join(chr(int(x)) for x in s.getsockname()[0].split(".")) with me="ip.ip.ip.ip".
LordLandon Posted March 19, 2010 Posted March 19, 2010 If you want dnsspoof to do your public IP, replace s=socket.socket(); s.connect(("bash.org",80)); me="".join(chr(int(x)) for x in s.getsockname()[0].split(".")) print "Please set your DS's DNS server to",s.getsockname()[0] with import urllib2 ip=urllib2.urlopen("http://whatismyip.everdot.org/ip").read() me="".join(chr(int(x)) for x in ip.split(".")) print "Please set your DS's DNS server to",ip Easy!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now