View Full Version : GTS: website research
Vlad
Apr 20th, 2009, 05:31 AM
Post additions (pinned replies):
[Apr 24th, 2009] AngelSl (http://projectpokemon.org/forums/member.php?138-AngelSl) (pcap log of GTS communication): post#12 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=9932&viewfull=1#post9932)
[Mar 1st, 2010] LordLandon (http://projectpokemon.org/forums/member.php?15155-LordLandon) (logged GTS communication in more close details): post#39 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=66694&viewfull=1#post66694)
[Mar 2st, 2010] LordLandon (http://projectpokemon.org/forums/member.php?15155-LordLandon) (information on actually trading with a fake GTS server): post#41 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=66809&viewfull=1#post66809)
[Mar 2st, 2010] LordLandon (http://projectpokemon.org/forums/member.php?15155-LordLandon) (python script to act as GTS server): post#43 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=67086&viewfull=1#post67086)
[Mar 22nd, 2010] LordLandon (http://projectpokemon.org/forums/member.php?15155-LordLandon) (python script, IP fix): post#100 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=68886&viewfull=1#post68886)
[Mar 23rd, 2010] magical (http://projectpokemon.org/forums/member.php?15780-magical) (clarification how data prefix is encoded on website): post#104 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=69263&viewfull=1#post69263)
[Mar 23rd, 2010] イーブイ (http://projectpokemon.org/forums/member.php?15680-%E3%82%A4%E3%83%BC%E3%83%96%E3%82%A4) (started Wiki article, check next page after clicking this link for more test results): post#105 (http://projectpokemon.org/forums/showthread.php?780-GTC-website-research&p=69347&viewfull=1#post69347)
[Apr 8th, 2010] AngelSl (http://projectpokemon.org/forums/member.php?138-AngelSl) (dnsserver.py modification hint -to support CNAMEs and not only IPs): post#193 (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=73271&viewfull=1#post73271)
[Apr 10th, 2010] Vlad (http://projectpokemon.org/forums/member.php?232-Vlad) (port check tool in AutoIT3): post#224 (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=73718&viewfull=1#post73718)
[Apr 11th, 2010] Vlad (http://projectpokemon.org/forums/member.php?232-Vlad) (dns and http server package): post#129 (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=72238&viewfull=1#post72238)
Note about LordLandon's Python application:
You get "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." when the .pkm file is a storage file. It must be a party file in order to work properly (issue is that storage files are 136bytes while party once are 236bytes).
Original post text:
Odd that no one is curious, but I am so here I go!
Basically the game talks to Nintendo and the global trade center, but I wonder if we can get some of that data from external tools. I am pretty sure the official GTC flash site also reads from here, anyway I found out the URL addresses by hex searching in the rom file (platinum), here are the results:
http://gamestats2.gs.nintendowifi.net/pokemondpds/common/setProfile.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/post.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/post_finish.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/get.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/result.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/delete.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/return.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/search.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/exchange.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/exchange_finish.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/worldexchange/info.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/battletower/roomnum.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/battletower/download.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/battletower/upload.asp
http://gamestats2.gs.nintendowifi.net/pokemondpds/battletower/info.aspObviously one is the battletower and other is the trade. Now it seems to operate on GET and POST, since I found a lot of HTTP headers. They also set a User-Agent that I think is called "GameSpyHTTP" (but might be a variable name or refrence, as I also saw "User-Agent: HTTP_X_GAMECD" a line or two above.
Anyway it is possible to get information of trades and pokemons available using external tools, thus you may create a "alert me when X is available" tool if you like, or filter out those "I want a Mew for a Mew" people that are just annoying.
Any thoughts or information you have learned?
Sabresite
Apr 20th, 2009, 05:34 AM
Yeah you are correct on your information. We have done research into this already and currently are figuring out the encryption. However it seems very difficult without the ability to debug the game as it is running.
Good luck on your research though :)
On and regarding making an external tool. If you use that website too much from a specific IP, especially a static one associated with a website server, I would take the assumption that they may figure it out ;)
Vlad
Apr 20th, 2009, 08:33 AM
I just share what I come across as I see almost none other results on Google of what others have concluded -I just try to contribute. ;)
Another thing is that it seems that it operates on arrays, at least the game. That might mean it might send or receive a array with data at some point.
Another thing is that you can (on each URL) access by sending a GET "pid" with a value of maximum 2147483647 (decimal, maximum 32-bit integer value). It returns a random string that looks like a session id as it changes each time you request the page. It is always 32 chars and contains letters and characters.
Additionally you have a GET "hash" that can be a random string containing numbers and letters. It's lenght is not specified as you may go up and up as much as you like, only you will get "error: token expired" all the time. To call "hash" you need to specify a "pid", and since pid alone returns a random string that looks like a hash.
If you do a GET pid with a random decimal (let's say "1"), you get a session key (let's call it that). Now if you add the GET hash and add the key you got from the earlier call, you get "error: incorrect hash". Now if you do a new request but only change the GET pid value (keeping GET hash the same) you get "error: token expired" so that must mean it expects a valid reply based on the session key you got.
I assume the next step would be allowing you to enter if you "enter the right password" based on the key you get, this is something the game does and this way they keep "us" out from their servers.
Also having user-agent set to "GameSpyHTTP" does not seem to do anything, the results remain the same.
I guess the game generates a pid based on time, perhaps ds id but I would think that the pid would be something it gets by requesting the server too, otherwise you would have to blindly try random numbers between 1-2147483647 until the DS gets a key that is not in use, I mean I guess the most logical way the game communicates with the server is like this:
1. Request a PID from the server, get a PID or a "maxusers" error
2. Use PID to request a session key
3. Use PID and send in decoded session key
At this point, the PID is flagged valid and you are allowed to browse and request more data, so the PID will be registered as "in use" and no one else can use it as it will not be send out by the server to new connecting clients. When there is a timeout, the session data is cleared and the PID is now publicly available for new connecting clients.
If this is how it really works, this means there is a maximum connection of 2 147 483 647 (2 billion 147 million 483 thousand 647 users) witch is plenty imo... :P Anyway, I assume you are also stuck on this part, or there is something I have missed.
I have also tried to use a network sniffer tool to monitor the connection between me using the flash based GTC by forcing it to only show HTTP based requests and connections, but I didn't really find much of useful info, didn't find the right data at all.
I will attempt by looking for connections done to the domains holding the urls posted above and see if there is any results when I access the flash site.
*Edit*
Alternatively, you may harvest GTC data from a mirror, thus utilizing the Pokémon GTS website. It is flash based but accesses data from the server, and it is conveniently in plain text format, hehe.
Example, http://www.pokemon-gts.net/data/pokemon/1.txt would bring up information on Bulbasaur. I have not decoded what is what, but there are 2 lines on top that are headers most likely, and the rest of the data is just information of what is happening.
Headers consist of 10 columns, each value is separated by comma (,).
The body is made of 14 columns but no comma separations this time.
The site also uses
http://www.pokemon-gts.net/data/entrusted.txt - available for trade (trading away)
http://www.pokemon-gts.net/data/requested.txt - requested by others (offers)
http://www.pokemon-gts.net/data/exchanged.txt - exchanged, more like a "log" file but I can't make out if it just yet, perhaps it counts how many that have been traded over I guess
I am looking into the flash files of the site, since the main flash loads sub-flashes it would be possible to get more information where to find trainer information, level, e.g. by disassembling the files.
*Edit*
Trying that, the sub flash files returns only images and sounds. The core files might contain scripts, but they all seem encrypted so that's lame. ;P Anyway I'll see what I figure out by looking on the text files, hopefully something useful.
AngelSL
Apr 20th, 2009, 10:10 AM
Hi. I have access to a softAP which my DS uses to connect to Nintendo Wifi (see my other thread in the same section). Nintendo Wifi club uses SSL (the one on the PC bottom floor), so I would'nt be surprised if this uses SSL too (I saw SSL handshakes when I was logging GTS, btw)
If you happen to need my help, just throw me a PM.
Vlad
Apr 21st, 2009, 07:00 AM
Thanks AngelSl, it's nice of you.
Right now I just made a small GTS site (http://vlacula.no-ip.com/pokemon/pokedex/?gts), nothing special (works fine in Firefox but not IE6) that let's you basically access the pokemon data on the gts site without having to load all the flash and all, and shows who is trading X for X (same pokemon) and who wants a pokemon that is banned from GTS (mew, celebi, darkraid, e.g.) so it is easier to see the valid results.
Only issue is that the moves they know are ID numbers apparently but the values do not correspond to my database, like 33 for me is tackle while on the file it can be 210 or what ever. Also locations where the pokemon come from seem to get the values from a table of some sort, takes ages to figure out all the valid ids from 1-250 to get the location names lol.
Kaarosu
Apr 21st, 2009, 09:19 AM
Pretty cool stuff going on here keep up the good work.
By the way.
http://www.pokemon-gts.net/data/exchanged.txt - exchanged, more like a "log" file but I can't make out if it just yet, perhaps it counts how many that have been traded over I guess
That seems to be a list of actual pokemon traded by their National Dex #
Vlad
Apr 21st, 2009, 10:50 AM
I noticed that the data on the site is basically logs 1 day behind, thus what is available right now does not seem to be there. For that I think I really need to use the other domain address, think it's time to contact AngelSl and see what he got to say on the matter.
Anyway the exchanged.txt is a log of the most traded pokemon. Left side is the national id and the right side is the "rank". requested.txt and entrusted.txt work the same way, only it shows the top wanted and deposited.
The /pokemon/#.txt files contain 2 header lines and 100 entries showing what were traded for what, level, move abilities, e.g. but it is all a log from yesterday.
AngelSL
Apr 22nd, 2009, 07:21 AM
I haven't had time to log GTS yet (the last time I didn't save the pcap file), but I'll do it today after my homework's done.
Vlad
Apr 22nd, 2009, 08:29 AM
I don't think pokemon-gts.net contains up-to-date data. gamestats2.gs.nintendowifi.net on the other hand does. Checked data on the gts site, was 1 day old. :(
Btw, while checking my router for connection info when I connected to Nintendo with my NDS, I got a interesting IP that leads me to a router login (haha): 92.21.129.247 (http://92.21.129.247) - not so secure is it? Having it exposed like that.
bear831
Apr 22nd, 2009, 04:47 PM
The information is always a few hours off and I am not so sure how they cycle through there updates like what times.
damio
Apr 23rd, 2009, 03:25 AM
Right now I just made a small GTS site (http://vlacula.no-ip.com/pokemon/pokedex/?gts), nothing special (works fine in Firefox but not IE6) that let's you basically access the pokemon data on the gts site without having to load all the flash and all, and shows who is trading X for X (same pokemon) and who wants a pokemon that is banned from GTS (mew, celebi, darkraid, e.g.) so it is easier to see the valid results.
It works with Opera too (10.0 alpha)
I think this would've helped with the Daisuke pokemon, now all we need is a Time Machine, and we are good to go.
AngelSL
Apr 24th, 2009, 04:00 AM
I've attached a pcap file of my packet logging.
Here's what I did:
> Login
> Search for a Bulbasaur: Either gender, Any level
> Search for a Darkrai: Either gender, Any level
> Logout
And I incorrectly said it was SSL. Sorry.
Vlad
Apr 24th, 2009, 08:32 AM
Thanks AngelSl! I'll take a look into the file and see what I can do.
*Edit*
It looks like it communicates using SSLv3, at least requests a certificate each time you get on the GTS (the certificate has an expiration date in 2015) that the NDS reads and gets it's public key, then using that to establish a connection with the server.
I am trying to make my PHP work with OpenSSL but something bugs -argh. If someone that develop would like to take a peak in the certificate and attempt to open a connection would the GTS -it would be lovely.
The extracted certificate from the logged packet:
Sabresite
Apr 24th, 2009, 12:57 PM
Certificates and crytography is not my strong suite :\
Vlad
Apr 24th, 2009, 03:59 PM
SSL (inc. certificates) is not my strong side either. Need time to learn about how SSL operates and if I can use PHP to fetch data. Never looked into it before now so I am kinda blank on experience too.
Anyway it's nice that we do have some progress at least. I'll drop off messages as I make new discoveries on this matter in case someone is interested.
codemonkey85
Apr 27th, 2009, 11:27 PM
Only issue is that the moves they know are ID numbers apparently but the values do not correspond to my database, like 33 for me is tackle while on the file it can be 210 or what ever. Also locations where the pokemon come from seem to get the values from a table of some sort, takes ages to figure out all the valid ids from 1-250 to get the location names lol.
I'm rather curious about this. Are you saying that sometimes the number for Tackle is 210, and other times it is other numbers? Perhaps there is an encryption going on here. But why encrypt move and location numbers and not Pokédex numbers?
In any case, excellent job! This is cooler than I ever expected. If it weren't for the possibility of Nintendo eventually blocking people out, there could be a lot of uses for this in hunting events (as previously mentioned), or even just casual trades.
Vlad
Apr 28th, 2009, 05:24 AM
Just to make it clear so there is no confusion, pokemon-gts is a log that display trades 1 day ago. The "live" data is yet to be extracted as there is some SSL going on, it's not the easiest thing to do. ;)
Anyway about the moves, it's basically that the custom database index (id) of moves is not matching the official. Simply because our databases are made by us so it's all custom. Or because the website just have another index order, who knows.
It does not seem encrypted, as Tackle is #91. On my database it's #33. That means I need to like log the new ID that correspond to the right abilities but that's a lot of work. :<
derrick
Apr 28th, 2009, 09:07 PM
so some one can use this to see what pokemon are on the gts on there computer aand its up to date?
Vlad
Apr 29th, 2009, 10:25 AM
That's the plan, derrick. To simulate being the NDS and login from the computer then check what you want to check. Thus not having to depend on logging on the GTS with the NDS all the time...
Especially if you plan to mass-check many at once and it's much easier to be able to filter out results like people that trade X away for X (same pokemon) or trading away for legendaries (very few want to give away legendaries for normal pokemon). BUT first, someone must manage to login properly. I myself have read some and played with some Java code but yet to succeed in authenticating properly.
codemonkey85
Apr 29th, 2009, 11:10 AM
Some questions / ideas:
If you figure out how to mimic the DS as far as logging on to the GTS is concerned, I wonder how much access you could have to the GTS database? In other words, maybe it is possible to access the Pokémon data itself, instead of the data tables the site uses? Assuming there's a way to avoid alerting Nintendo, it would be pretty neat if you could import / export .PKM files to and from the GTS using a PC. Maybe the GTS could even be used as a medium between your DS game and a PC?
What kind of doors could mimicking the DS and logging into Nintendo's servers open? Could we then access trade and battle records? Battles stored on the Global Terminal using the Battle Recorder? PC box images that were saved on the GT? The Wi-Fi Square?
Also, how about combining knowledge of how to mimic the DS and knowledge of the DS Wi-Fi protocol (http://projectpokemon.org/forums/showthread.php?t=119)? Connect your DS to your PC by the PC mimicking another DS or a Wii, and use your PC application to monitor / control communication between the DS and Nintendo's servers?
This is pretty exciting stuff, I think.
derrick
Apr 29th, 2009, 09:26 PM
but what about nintendo i mean wouldent some lawsuit be filed or some thing? if they found out? also if yall need some one to test this i could possabley help in some way
Vlad
Apr 30th, 2009, 06:37 AM
If you figure out how to mimic the DS as far as logging on to the GTS is concerned, I wonder how much access you could have to the GTS database? In other words, maybe it is possible to access the Pokémon data itself, instead of the data tables the site uses? Assuming there's a way to avoid alerting Nintendo, it would be pretty neat if you could import / export .PKM files to and from the GTS using a PC. Maybe the GTS could even be used as a medium between your DS game and a PC?
I assume the access is limited to what you can do with the NDS. Except on the NDS you for example are limited to maximum 8 trainers at once when you search while tapping in would let us read all of the available. Exporting or importing, well you would indeed be able to upload pokemon data but I am not sure if they use the same structure as pkm files, I assume they hold a little more info so the server knows who to tell when the one that uploaded the pokemon logs in on GTS. If you notice its then you see that it has been traded and get the other pokemon.
What kind of doors could mimicking the DS and logging into Nintendo's servers open? Could we then access trade and battle records? Battles stored on the Global Terminal using the Battle Recorder? PC box images that were saved on the GT? The Wi-Fi Square?
You can access the data you can access on the NDS, since the server handles request trough the ASP scripts -thus they are pre-programed what kind of data they will return us.
Also, how about combining knowledge of how to mimic the DS and knowledge of the DS Wi-Fi protocol (http://projectpokemon.org/forums/showthread.php?t=119)? Connect your DS to your PC by the PC mimicking another DS or a Wii, and use your PC application to monitor / control communication between the DS and Nintendo's servers?
I read the packet and I see that the server gives the NDS a certificate and based on that the client authenticates with the server. Now I've been trying to make a Java program (simple) connect and do just this but I have yet to succeed.
If we get this to work then it will also work with any other NDS game that has a Wifi mode with some internet activity going on. They are all based on the same principle. Now I am no pro at this, I just play with code I find trough documentation and google and see if I can make something work.
derrick
Jul 15th, 2009, 08:27 PM
this would be so awsome!!!
i hope it works i tryed the link to your interntet site and it just said gateway time out
coolness
Aug 17th, 2009, 06:50 AM
is this all not illegal?
my laptop is telling that
i can install that certificate
what will happen if i do that?
Pingouin7
Nov 21st, 2009, 08:39 PM
Man, this is so interesting!
If we manage to import the Pokémon's file, and create a converter to convert it into a .pkm file, we could basically take any Pokémon from the GTS for free.
But about lawsuits...
Wichu
Nov 30th, 2009, 01:12 PM
That's basically hacking the Pokémon; you might as well just sav the Pokémon in the first place.
YuzuruHitokiri
Nov 30th, 2009, 04:02 PM
That's basically hacking the Pokémon; you might as well just sav the Pokémon in the first place.
Not really... The pokemon on the GTS are usually legit and so you don't have to worry as much about the legality when compared to SAVing onefrom scratch.
Also, this could be a good resource for those with no AR or flash cart to be able to get what they want w/out having to either sift through the ripoffs(lvl 1 for lv 100 Legendary) and the teases(shiny ... for lvl 9 or lower legendary; impossible to get legitly).
Also, the communication research isn't specifically limited to just the GTS either, look around this subforum a bit more and you'll see what I'm talking about...
Pingouin7
Dec 3rd, 2009, 08:42 PM
Like, that guy has his shiny Ho-oh up on the GTS, and then some time later you show him his Ho-oh in your game, while it is still on the GTS.
codemonkey85
Dec 4th, 2009, 11:08 AM
A more valid use, to me, would be the ability to easily search and sift out viable trades which you could then perform on your DS, possibly with the aide of software on your PC.
YuzuruHitokiri
Dec 4th, 2009, 04:20 PM
A more valid use, to me, would be the ability to easily search and sift out viable trades which you could then perform on your DS, possibly with the aide of software on your PC.
If I might add to that, instead of alerting you, you could flag the pokemon as traded to your cartridge so that you could simply logon to the GTS and receive your pokemon. Since this program would probably be spoofing the site into thinking it's a DS, would a PokeSav/PokeMod(if it is released before this comes to life) plugin of sorts from which you could create the trader's desired pokemon from be out of the question?... Wouldn't that be a more logical route? I constantly find that after I went and either leveled or caught the pokemon that was desired to trade for my desired trade that it had been snatched away in the short time that I had been gone. If we built the program this way, you wouldn't have to worry about someone else snatching the one you want because you could almost "reserve" it instantaneously via either of the suggested plugins above... Or you could just copy the data and tell the server to send you a copy of the data when you logon with your DS...
Another feature that might be nice is to be able to search through the trades that occurred in recent history and be able to take a copy of any nice pokemon from there since they've already been traded...
Further still, instead of the usual display that is included in the DS, you could include more information like moves, IV's, EV's, ribbons, etc?... Maybe Sabresite could even make legal part of it to check the pokemon to see if it was hacked?...(Can you, Sabresite?...)
codemonkey85
Dec 15th, 2009, 08:50 AM
Well, to me, legit and legal uses of the research we do are the most useful, since they're probably not traceable and don't rip anyone off.
I was just thinking about how neat it would be to have a push notification app on the iPhone that informs you of a trade going through, or an offer being made that you were tracking for. The former would be especially valuable to those outside of Japan, since we don't get to have GTS E-Mail notifications (only Wii messages >_>).
YuzuruHitokiri
Dec 16th, 2009, 06:53 AM
Yeah, but if anything, the flag idea should be implemented because even if you have an alert system, you're racing an entire world... Having to boot your DS(i), then log onto the GTS, THEN search out the pokemon leaves the window open for some other person to snatch it away...
LordLandon
Feb 22nd, 2010, 12:00 AM
Okay, so I changed my router's DNS server to resolve gamestats2.gs.nintendowifi.net to point to one of my computers. Had my DS happily connect to it, where a happy python script was waiting to intercept GTS traffic and redirect it to the REAL gamestats2. What I've found is that there are no ssl connections happening and I have niceish (nicer than a pcap, at any rate) dialogs between the DS and gamestats2. The pid seems to be a cart-specific number, probably one you get the first time you connect to wifi, it stays the same every time you reconnect. When doing searches, another GET param comes up, data which seems to be an unencrypted 'action' i.e. same searches produce the same data regardless of connection. What we'd need to figure out to have automated scripts, is how that hash is generated, so that the server takes us for it's own. I'll mess with this more another day, as it is late now so take this post as more of a poke, rather than an informative one, to see if you guys are still here to try and mess with this.
Other potential areas of explorations would be to hex-edit the rom and change gamestats2.gs.nintendowifi to point to your own server for easier debugging, and perhaps, create our own private GTS's that don't do hash checking, or always present the client with the same sekrit string (;
Oh, and I don't have high hopes for how well this could do for sifting through *all* of GTS's pokeymans as the data I saw from the server seems to be just enough for the three odd results the game gives us.
codemonkey85
Feb 22nd, 2010, 10:19 AM
Whoa. That's awesome! Great to see progress being made on this.
Regarding our own private GTS servers, I think that would be awesome for ROM hackers trying to create their own Pokémon "economy".
OmegaDonut
Feb 23rd, 2010, 01:09 PM
You wouldn't need to hack the ROM, though, right? Could it be possible to have a program that resolves gamestats2.gs.nintendowifi.net to one of our own, and use a stock cartridge? This might be more effective with people who still use the Nintendo WiFi connector.
I'd like to see a private GTS server that people can arrange private trades on. With the hash-checking, you could arrange for a specific person to pick it up, and you wouldn't need to both be online at the same time. And you could make requests on the server's website like "Timid Kyogres only" and then the search results on the DS would only return Pokemon that matched.
More sophisticated hack-checking, like a built-in legit.exe could also be added to the server.
Poryhack
Feb 23rd, 2010, 01:22 PM
I don't think you would; however that has been done already. At one point about a year ago I was helping Jason (he hung out on IRC back then, don't think he's ever joined the forums) by doing some searches with an edited ROM that he had pointed to his own server. He had a PHP script to capture and redirect traffic but nothing was ever really accomplished with the capture information.
I'm no expert but I'm wondering if it's really even possible/feasible to code your own server from just watching what the transactions with the real server look like...
codemonkey85
Feb 24th, 2010, 09:59 AM
Why not Poryhack? Isn't that what hackers do? :p
Slightly off-topic:
I'd like to see a private GTS server that people can arrange private trades on. With the hash-checking, you could arrange for a specific person to pick it up, and you wouldn't need to both be online at the same time. And you could make requests on the server's website like "Timid Kyogres only" and then the search results on the DS would only return Pokemon that matched.
More sophisticated hack-checking, like a built-in legit.exe could also be added to the server.
I think that's a fantastic idea. I also think it would be neat to design a more robust notification system, so people can be notified that their trades went through via not just Wii messages or E-Mail, but also SMS, iPhone push notifications, RSS (?), whatever.
Back on topic:
I looked at some of the log files that LordLandon generated by redirecting the NDS / Nintendo WFC connection through his computer, and saw that the search results for a query yield full Pokémon data, stored, encrypted, and shuffled in exactly the same way as they are in the NDS. There's other data in there too; connection logs and all that jazz.
Also, each Pokémon result is actually 292 bytes in length (according to Landon), so there's some extra data there beyond the actual Pokémon data; probably to account for information about the trainer and cart that uploaded the Pokémon in the first place, as well as what they are looking for in return.
OmegaDonut
Feb 24th, 2010, 04:14 PM
I looked at some of the log files that LordLandon generated by redirecting the NDS / Nintendo WFC connection through his computer, and saw that the search results for a query yield full Pokémon data, stored, encrypted, and shuffled in exactly the same way as they are in the NDS. There's other data in there too; connection logs and all that jazz.
Nice! That means we can already do a legit.exe check on a GTS Pokemon before trading, as well as view their moves\IVs\EVs. At least as long as you can reroute the traffic. We just need a program that can access the GTS directly without the need for a DS.
Possibly more complicated: finding AR codes that can do the same, at least for IVs\moves.
LordLandon
Feb 25th, 2010, 02:19 AM
So here's what I have as of now:
because http is used for the communication, every time the DS wants to make a request from the server, (after the initial connect) the exchange is as follows:
DS gets whateverpage.asp?pid=[pid], and the server returns a 32-byte string
the DS then gets whateverpage.asp?pid=[pid]&hash=[40 byte hash of 32-byte string]&data=[encoded request]
the pid is *not* wifiid dependent since it remained after i connected to wifi with a different DS. either way, it's gotta be in the save file somewhere.
the hash is a hash of *only* the secret string the server sends as a challenge - i've tried different combinations of ds/game/pid while keeping the same challenge string, and the hash came out the same each time
the search results include the full 236 bytes of pokemon! (this makes more sense due to the total length per search result is 292 bytes, and because there are 236 bytes reserved for "pokemon in gts" at the end of the save file)
this leaves 56 extra bytes to contain the requested stuff 0x04-0x05 is the national dex # of the requested poke, 0x6 i *think* is the requested gender. 0x7 is the min level, 0x8 is the max level.
we'll post more as we learn more.
attached is a zip of a bunch of the conversations that went on between DS and server, the \ndone---done\n being a separator between each response/request (made it easier for me to parse, not part of the exchange). of small note is that platinum sets some profile thing as part of authenticating to the gts
codemonkey85
Feb 25th, 2010, 10:40 AM
the search results include the full 236 bytes of pokemon! (this makes more sense due to the total length per search result is 292 bytes, and because there are 236 bytes reserved for "pokemon in gts" at the end of the save file)
Ah, that does make a lot of sense.
this leaves 56 extra bytes to contain the requested stuff 0x04-0x05 is the national dex # of the requested poke, 0x6 i *think* is the requested gender. 0x7 is the min level, 0x8 is the max level.
Awesome! I'm really excited about the progress being made on this!
Maybe I'll get time sometime this weekend to delve back into those logs and pick apart those 56 bytes. Incidentally, did you take notes on what kind of requests you were making on the DS concurrent to these new logs? That would help a ton.
LordLandon
Feb 27th, 2010, 02:41 AM
Attached is a script that will allow you to send a .pkm to your game cart without any special hardware, through the GTS. In order to run, you need to have python installed on your machine which is freely available at python.org and should run on any OS. On linux, and osx the script needs superuser privileges because it needs to bind to two ports bellow 1024. I'm not sure, but on vista+ it might need to be run as admin.
EDIT: It's been pointed out to me that it doesn't seem to work on windows after all |= I'll figure it out once I get access to a windows xp machine, but for now - sorry )=
How it works, is you unzip sendpkm.zip, put your .pkm in the same folder as the .py files you get, run sendpkm.py, and enter the full filename of your .pkm when it asks you for it. After that, it'll tell you to set your DS's DNS server to something, you can do that from the title screen of the pokemon games, in WFC settings.
http://www.nintendo.co.uk/NOE/images/service/manualSettings.jpg
Tap "no" for auto-obtain DNS, and enter the IP the script gives you for the primary DNS server.
After that, you just head into the GTS, and your .pkm should come flying!
There's some communication error occurring on platinum after you get it, that I've yet to figure out - but regardless, the poke is still there after you restart your DS.
Don't forget to set your WFC settings back when you wanna play with the real server!
Also attached are 56.txt, which is an explanation of all but the last four of the mysterious 56 bytes we were getting appended to the search results, and depundep.txt for anyone who wants to take a shot at the deposit pokemon encoding.
ENJOY YOUR POKEYMANS!
Things left to do (in order of usefulness/importance):
a pokemon info displayer thing to provide detailed info on search results
figure out depositing encoding
figure out hashing algorithm
codemonkey85
Mar 1st, 2010, 12:45 PM
Y'know, if it's only the last four bytes of that 56 byte structure that are unknown, there's a fair chance that it's a checksum. If that's the case, good luck figuring out that hash check....
Also, great job! Too bad I have Windows. :(
EDIT:
a pokemon info displayer thing to provide detailed info on search results
I think this goes without saying, but feel free to use any part of my PKMDS library or programs to make this. One thing my programs specialized in was the slick and user-friendly display of Pokémon information, so it seems like it might help.
LordLandon
Mar 2nd, 2010, 03:06 AM
Great. Windows issues fixed - unzip the archive, and drag a .pkm or a .zip to sendpkm.py. I seem to have fixed platinum's communication error by making the script wait for the animation to finish before closing, as it seems the game still wants the socket open after that. I now also have sendpkm put together the 56 byte ending, or at least some of it. This fixes some nasty problems, especially in platinum which seem to be anti-cheating measures of some sorts.
Nonetheless, it's still not perfect, and I would advise having a full party when you go to do this, because otherwise you'll end up with the sent over pokemon having a capsule attached, with no easy way to detach it (save sending it to real gts, and picking it back up, or trading to another game). So have a full party, and look in the first box of your PC afterwards and it should be fine.
For those more interested in the details, the second time stamp I found in the 56 bytes seems to be the traded-away time. I still have no clue what the last four bytes are. And I'm starting to think the server-bound encoding involves the PID somehow.
That is all for now.
EDIT: BUT WAIT! THERE'S MORE! Now it seems to work exactly right, no more stupid capsule problems, use with confidence (= (I've updated the attachment.)
Poryhack
Mar 2nd, 2010, 11:53 AM
You might want to add that it's Python 2.6; I had 3.1 installed previously and it took me a while to figure out what was up.
I was gonna try this but sadly Nintendo's WiFi USB Connector doesn't allow one to tweak DNS settings and stuff. Oh well I have a flashcard. =)
Pingouin7
Mar 2nd, 2010, 01:01 PM
Man, that program...
It rocks. Seriously.
We can now get Pokésav'd Pokémon on our game without even having any way of extracting our retail cart save file.
Major congrats here.
We even get the Pokémon's dex entry registered.
codemonkey85
Mar 2nd, 2010, 01:11 PM
Hah, yeah, the 'Dex entry. I forgot about that!
This is seriously the most awesome thing ever. Can't wait to try out the Windows-working script tonight.
LordLandon
Mar 2nd, 2010, 02:27 PM
Poryhack: Yes, thanks for the tip about 2.6 (= also, you can be my tester for using the wifi adapter: since it doesn't let you change the dns settings in your ds, it must be using the same settings that your computer uses - try changing the DNS server in your regular network settings.
Pingouin7: I'm glad you're enjoying it! Be sure to post anything that causes it to break, so that it could be fixed.
Poryhack
Mar 2nd, 2010, 03:21 PM
Thanks for the pointer; it worked great. Maybe you could incorporate something into your script that will change the DNS settings on the computer and change them back after the transfer is done.
Pingouin7
Mar 2nd, 2010, 09:14 PM
Poryhack: Yes, thanks for the tip about 2.6 (= also, you can be my tester for using the wifi adapter: since it doesn't let you change the dns settings in your ds, it must be using the same settings that your computer uses - try changing the DNS server in your regular network settings.
Pingouin7: I'm glad you're enjoying it! Be sure to post anything that causes it to break, so that it could be fixed.
I can't even use it.
LordLandon
Mar 3rd, 2010, 12:10 AM
Could you be more specific?
OmegaDonut
Mar 3rd, 2010, 02:43 AM
I think I found a limitation\bug to the program: it doesn't handle Pokemon containing Japanese\special characters in OT. It says it decodes correctly, but when sending it to the DS communication fails (blue screen, and the screen blinks rapidly for a while). It works just fine with Pokemon not containing them.
Attached is an Ageto Celebi Pal Parked to HG. This and a Manaphy with an OT containing the O with a dot in the center fail to transfer.
LordLandon
Mar 3rd, 2010, 10:28 AM
Well, you found a limitation, but a different one - that .pkm is from a box, and consists of 136 bytes. Atm, the script only works with "party" pkm which consist of 236 bytes. I will fix this soon - sorry!
Pingouin7
Mar 3rd, 2010, 09:33 PM
Could you be more specific?
It's not related to the program itself.
OmegaDonut
Mar 4th, 2010, 01:59 AM
It's not related to the program itself.
Could you be specific enough? :P
Ringo
Mar 7th, 2010, 08:54 PM
I think it is amazing that you studied all this.
I seem to need help running this though, and if you mind advising [I hope it's a simple error on my part]. I am on a PPC Mac running OSX 10.4.
I tried running the script from the terminal with the "sudo" command. Here is the message I recieved:
Encoding!
Traceback (most recent call last):
File "/Users/Ringo/Desktop/sendpkm/sendpkm.py", line 46, in <module>
initServ()
File "/Users/ringo/Desktop/sendpkm/pokehaxlib.py", line 92, in initServ
serv.bind(("0.0.0.0",80))
File "<string>", line 1, in bind
socket.error: [Errno 48] Address already in use
***************
If it's not too much trouble please advise what I can do. Thanks in advance.
--Ringo
Pingouin7
Mar 7th, 2010, 09:55 PM
Could you be specific enough? :P
Probably related to the fact I cannot access Wi-Fi without the USB connector.
OmegaDonut
Mar 7th, 2010, 10:48 PM
Probably related to the fact I cannot access Wi-Fi without the USB connector.
It's still just as easy, maybe easier. Just change the DNS server settings for the network connection (probably "Local Area Connection") that's connected to the internet. Run the script first, then change the DNS server settings to whatever it tells you to.
Under XP (which is the only thing that has drivers for the USB connector, IIRC), go to Control Panel -> Network Connections -> right-click the connection -> Properties -> select Internet Protocol (TCP\IP), then Properties -> Use the following DNS addresses -> type in the server under Preferred DNS server
Poryhack
Mar 7th, 2010, 11:47 PM
Actually there's drivers for Vista too. As you can see by my last post (scroll up) I was able to get this whole thing working with my Nintendo Wi-Fi USB Connector.
LordLandon
Mar 8th, 2010, 03:20 AM
I don't have a mac, but that error is due to something already listening on port 80. See what you see if you go to http://localhost in your browser.
OmegaDonut
Mar 8th, 2010, 10:42 AM
Actually there's drivers for Vista too. As you can see by my last post (scroll up) I was able to get this whole thing working with my Nintendo Wi-Fi USB Connector.
Okay, make that Windows 7, then. I've had to use the built-in XP virtual machine to use the USB connector. LordLandon's script still works there.
Arty2
Mar 8th, 2010, 12:56 PM
It was bound to happen some day... kudos to LordLandon for the achievement though
The bad part is that people are going to abuse it; hard. Now everyone is going to cheat and remain completely undetectable.
I also doubt that they can patch this server side. I'm not sure whether releasing this in the wild was a good idea or not, time shall tell and it will depend on Nintendo's stance on the matter.
The bright side is that now they will eventually be aware of the vulnerability, and fix their system on the next Generation. Nobody would blame them if there's no compatibility with the older generations either.
Poryhack
Mar 8th, 2010, 04:51 PM
I honestly think that most people who wanted to cheat have went out and bought an Action Replay and/or flashcard already. It's a moot point really.
Vlad
Mar 8th, 2010, 06:13 PM
Kudos to LordLandon, I wish I had the ability to reroute the NDS traffic and intercept it with packet loggers too! By the way what kind of router you use? May consider it when mine breaks down -tihi! ;)
It's very nice to see progress, I'll myself look a bit into this by trying to change the server NDS looks up by also changing its WIFI settings to obtain IP form my PC, if not I'll edit the ROM itself to connect to my PC then I start to packet log and build some sort of a server, prolly going to use Java to try beat this challenge. It's kind of fun to mess around and emulate a real server -already did that with Heroes of Newerth so I got some practice by now, hehe. ;)
Btw doubt this will become a popular way to add Pokémon to your game, but kind of fun that you could actually transfer a Pokémon to a legit game by changing NDS networking, making it connect to your PC and having the server handle the rest. Had to say something because LordLandon send me a PM. :3
rct3addict
Mar 8th, 2010, 06:31 PM
This is crazy stuff. I understand that you guys are rerouting network traffic to your DS via your router in order to trick the game into thinking that your computer is a GTS server. Is it possible to connect to other people's GTS servers, ones that are not in your network? It would be very useful for non-real time trading.
OmegaDonut
Mar 8th, 2010, 07:03 PM
On that note, wouldn't it be possible to set up a public DNS, one that just reroutes traffic for the GTS server and points all other urls to another public DNS? Then any DS could access the private GTS server just by changing its DNS settings. Not everyone can or is willing to change their router DNS, and this would be a universal solution.
Poryhack
Mar 8th, 2010, 07:31 PM
This is crazy stuff. I understand that you guys are rerouting network traffic to your DS via your router in order to trick the game into thinking that your computer is a GTS server. Is it possible to connect to other people's GTS servers, ones that are not in your network? It would be very useful for non-real time trading.
I think so, said person would have to be running a webserver though.
On that note, wouldn't it be possible to set up a public DNS, one that just reroutes traffic for the GTS server and points all other urls to another public DNS? Then any DS could access the private GTS server just by changing its DNS settings. Not everyone can or is willing to change their router DNS, and this would be a universal solution.
Nobody has to mess with their router with LordLandon's current method though... Unless you mean WifFi Connector users like myself...
Eon-Rider
Mar 9th, 2010, 01:39 AM
I appreciate your work LordLandon but I can't seem to get it to work. I do everything as instructed and enter GTS. Upon arrival and checking, the screen starts flashing non-stop for about twenty seconds then complete stopping with "A communication error has occured."
I'm running on Windows XP and using Python 2.6.4 and it occurs on both my genuine Pokemon Diamond and Pokemon Platinum.
OmegaDonut
Mar 9th, 2010, 05:15 AM
I appreciate your work LordLandon but I can't seem to get it to work. I do everything as instructed and enter GTS. Upon arrival and checking, the screen starts flashing non-stop for about twenty seconds then complete stopping with "A communication error has occured."
I'm running on Windows XP and using Python 2.6.4 and it occurs on both my genuine Pokemon Diamond and Pokemon Platinum.
Try using a party PKM file instead of a storage PKM file.
Eon-Rider
Mar 9th, 2010, 06:22 AM
Try using a party PKM file instead of a storage PKM file.
Thanks for that. I suspected that was the problem when it failed to work but I was too lazy to bother converting it. >.>;
KazoWAR
Mar 10th, 2010, 12:41 AM
Interesting program, very nice, but one thing. Could it be possible to add a feature to allow sending PKM to your PC to use it to clone and archive legitimately bred and captured Pokemon?
OmegaDonut
Mar 10th, 2010, 01:59 AM
Interesting program, very nice, but one thing. Could it be possible to add a feature to allow sending PKM to your PC to use it to clone and archive legitimately bred and captured Pokemon?
Yeah, as soon as he figure out the encryption on depositing Pokemon.
KazoWAR
Mar 10th, 2010, 02:59 PM
Yeah, as soon as he figure out the encryption on depositing Pokemon.
Awesome, can't wait.
Lyndare
Mar 13th, 2010, 04:08 AM
can you give some tutorial in youtube so when know how to set it up...
Lyndare
Mar 13th, 2010, 04:55 AM
i have a problem look
how to set the DNS Server
http://i40.tinypic.com/e5ljcz.jpg
Dance Soldier
Mar 13th, 2010, 05:17 AM
Hey Guys is there a running version for Windows yet? (I'm talking .exe ) :P
Cause somehow I don't know how to make that with the python program.
Would e awesome if you could post it here :) thx a lot from ahead.
M@T
Mar 13th, 2010, 10:35 AM
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
Mar 13th, 2010, 01:42 PM
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
Mar 13th, 2010, 02:03 PM
so would i have to be on the same net work as my computer for this to work?
M@T
Mar 13th, 2010, 04:10 PM
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. :D
Tsuji
Mar 15th, 2010, 08:58 PM
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
Mar 15th, 2010, 09:40 PM
so does that mean its possable from another network?
and if so how?
M@T
Mar 15th, 2010, 10:44 PM
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. :D
codemonkey85
Mar 16th, 2010, 11:57 AM
Hey M@T, great idea! I'll be interested to see where that goes.
arthurneo
Mar 16th, 2010, 05:34 PM
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.
derrick
Mar 16th, 2010, 08:10 PM
could you explain how i could do this
M@T
Mar 16th, 2010, 10:01 PM
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
Mar 17th, 2010, 03:53 PM
can you tell me how to use that dns server download?
M@T
Mar 17th, 2010, 05:43 PM
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
Mar 18th, 2010, 08:08 AM
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
Mar 18th, 2010, 09:56 AM
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
Mar 18th, 2010, 10:47 AM
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:
イーブイ
Mar 18th, 2010, 11:06 AM
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.
deezenuts
Mar 18th, 2010, 12:16 PM
READ BELOW
M@T
Mar 18th, 2010, 12:27 PM
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
Mar 18th, 2010, 12:41 PM
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.
M@T
Mar 18th, 2010, 12:57 PM
Just one question : did you start my DNS server in the same network as the DS, or was it in a remote network ?
deezenuts
Mar 18th, 2010, 01:09 PM
Same network, unfortunatly I cannot test this as of right now :|
M@T
Mar 18th, 2010, 01:16 PM
OK, that's was I thought.
So the problem was only because of the .pkm file ?
Anyway, thanks for the feedback. :wink:
shino
Mar 18th, 2010, 08:15 PM
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
Mar 18th, 2010, 08:15 PM
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!
shino
Mar 18th, 2010, 08:29 PM
Thanks for the quick reply! Code works fine (and obviously works better) but still can't connect, even though ports are open. Beginning to wonder about latency, etc. Will probably just start grabbing packets and troubleshooting myself, I wonder if my computer is having trouble responding to the dns request or the actual http gts transfer.
bmtdan
Mar 20th, 2010, 11:12 AM
if i was to "deposit" a pokemon would i be able to edit the pokemon on my computer and the send it back?
イーブイ
Mar 20th, 2010, 04:36 PM
No, the script only allows sending a single Pokémon to your game; then it shuts down.
It's being looked into.
magical
Mar 20th, 2010, 06:21 PM
Wow. Great stuff here, LordLandon, Vlad.
Poking around in the ROM, i figured out how the hash is generated.
hash = sha1("sAdeqWo3voLeC5r16DYv" + token)
Breaking the encryption is going to be harder. Some random observations:
The data= parameter is base64-encoded
The base64-encoded data always begins with "Sj". Does anyone else find that odd? Waitit's even better than that: the base64-decoded data always begins with "J;". Not sure what that means, though. Perhaps it indicates how the data is encrypted.
The data sent to post.asp is 300 bytes long. 8 bytes longer than the Pokémon data.
The data sent to exchange.asp is 304 bytes long. 12 bytes longer than the Pokémon data.
The data sent to post_finish.asp is 16 bytes long.
The data sent to info.asp, result.asp and get.asp is 8 bytes long and, for a given pid, is the same for every request. But it is different for different pids. This means that a change in the pid must correlate with a change in either the encryption OR the data. Personally, i'm betting on the data. It also means that the hash does not factor into the encryption.
If you post the same Pokémon twice, the data is completely different each time.
The API is not very RESTful.
イーブイ
Mar 20th, 2010, 09:36 PM
I've started making an attempt at documenting this: http://projectpokemon.org/wiki/GTS_protocol
イーブイ
Mar 20th, 2010, 10:05 PM
Okay, attempting to think through this out loud, and IRC doesn't really cut the size of this stuff.
I'm basing the following on LordLandon's depundep.txt.
The Pokémon he sent out (based on the response from get.asp) was this:
0000000: ae38 6151 0000 0701 bb92 b2de e153 5dba .8aQ.........S].
0000010: d0af 248a 8d23 cbf4 ed52 a78d 4550 5c77 ..$..#...R..EP\w
0000020: ec29 6f56 892a 40dc 28a9 df4c e1fa ae9b .)oV.*@.(..L....
0000030: ef0c 99eb 4518 0da1 0da3 9d23 5440 ba9b ....E......#T@..
0000040: bc5d c9cc b251 8019 21f3 9604 2e7f 977a .]...Q..!......z
0000050: b80a ab11 ac82 b276 f4c8 5d94 8a00 be44 .......v..]....D
0000060: 99be ae22 f2d2 d402 dadc ebe0 f931 5d93 ...".........1].
0000070: 6cb7 b37d 73d7 a3ed 8ddd 6b86 9246 4657 l..}s.....k..FFW
0000080: 84c5 3346 0a5a f0f4 3e4a 9380 c5ee 5bec ..3F.Z..>J....[.
0000090: c7a9 2134 14e2 fc35 645c 0ad4 053e acd3 ..!4...5d\...>..
00000a0: 428d 103b 24be 09eb 13cd 1aea 5f9b bcea B..;$......._...
00000b0: 71ec deb5 3edb 19ca 48fb 64c6 21c3 5d34 q...>...H.d.!.]4
00000c0: afeb 9d2b 1cae e261 3307 9784 a691 bfb9 ...+...a3.......
00000d0: 62d1 9ab2 f9de e3ea e978 4116 8244 6784 b........xA..Dg.
00000e0: 7db9 9624 cbee a0d2 0154 db5d 8901 0101 }..$.....T.]....
00000f0: cc01 0300 0000 0000 da07 021b 0e38 0700 .............8..
0000100: 0000 0000 0000 0000 5bb9 fa06 3601 4501 ........[...6.E.
0000110: 5201 4801 5301 5201 ffff 0000 0e5f 0000 R.H.S.R......_..
0000120: 3200 0a02 2..
That Pokémon, decoded:
0000000: ae38 6151 0000 0701 0100 3900 7f00 0000 .8aQ......9.....
0000010: 230f 0f00 0000 0000 f534 f518 0000 0000 #........4......
0000020: 0000 0000 d007 1800 3a01 3301 3a01 3601 ........:.3.:.6.
0000030: 3f01 3a01 ffff 19c0 18b3 0c02 3037 000c ?.:.........07..
0000040: 0000 0000 0000 0000 3301 3d01 2b01 2b01 ........3.=.+.+.
0000050: 2d01 ffff 0000 0000 0a02 050a 0205 d007 -...............
0000060: 1800 0004 0000 0000 8901 0000 255f a912 ............%_..
0000070: 0000 0000 4643 0002 0000 0000 0000 0000 ....FC..........
0000080: 0000 0000 0000 0000 0000 0000 0100 0c00 ................
0000090: 0c00 0600 0600 0500 0500 0600 0000 0000 ................
00000a0: 0002 0aff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff 2602 ffff 0000 ..........&.....
00000c0: ffff ffff ffff 3a01 ffff ffff ffff 4301 ......:.......C.
00000d0: ffff ffff 0000 0000 0000 0000 0000 0000 ................
00000e0: 0000 0000 0000 0000 0000 0003 8901 0101 ................
00000f0: cc01 0300 0000 0000 da07 021b 0e38 0700 .............8..
0000100: 0000 0000 0000 0000 5bb9 fa06 3601 4501 ........[...6.E.
0000110: 5201 4801 5301 5201 ffff 0000 0e5f 0000 R.H.S.R......_..
0000120: 3200 0a02 2..
The data he actually sent:
pid: 117094747
challenge token: TQzGoOU4R5M3CzCkomJqXFcrupqnKquF
response hash: 328c76b3e37832732566c14ae596b7856956c48d
data, as decoded by Python's urlsafe_b64decode:
0000000: 4a3b aea9 fcae abec e42b 58c8 5907 e38e J;.......+X.Y...
0000010: 0cca 7fa7 44dc f343 9ebc 0183 1c00 6e64 ....D..C......nd
0000020: e24a 07c9 338a afb6 e188 fbb1 08c5 38a6 .J..3.........8.
0000030: d862 17b9 d5ba eb2b 9c1a 60d8 a0c8 2d7b .b.....+..`...-{
0000040: e844 ca88 6806 bfee 165a c1e7 053c 2199 .D..h....Z...<!.
0000050: 9bd0 34c1 09ca 407a a646 185f 9e2d 8f0a ..4...@z.F._.-..
0000060: 8cbf 6775 5b92 233b e342 837e 2069 a319 ..gu[.#;.B.~ i..
0000070: b1c5 1f3f ac17 26f1 c4d9 592f 222f b100 ...?..&...Y/"/..
0000080: 925c 8a58 9cb1 920f 50fc ae37 a055 e136 .\.X....P..7.U.6
0000090: 602f c5bd 5223 10a3 af9d 190c 0d06 4492 `/..R#........D.
00000a0: 56e0 ee4f cf93 6ea5 52fb fe5f 3c1f 8006 V..O..n.R.._<...
00000b0: fb73 453c 9b44 e1d4 c6ba ed43 5c70 5feb .sE<.D.....C\p_.
00000c0: 421a bfc8 ff28 2267 2881 2707 ef04 1772 B....("g(.'....r
00000d0: 50da 3e26 1206 751f 895b ee37 fc5a 3539 P.>&..u..[.7.Z59
00000e0: 17d0 1c26 a3ae 45e2 f277 01e5 d88c ce7c ...&..E..w.....|
00000f0: 272d 11c4 b62a ab00 928a 90de d9a8 7e35 '-...*........~5
0000100: 67c8 03fa 6be1 c527 8359 1e1b 5100 0b35 g...k..'.Y..Q..5
0000110: 8a4b 5bb2 08d2 50c7 3a0e 60f6 e54e 0abe .K[...P.:.`..N..
0000120: 6405 6562 9a56 7e0d 8ac4 ec30 d.eb.V~....0
This is 300 bytes -- eight bytes longer than the size of a Pokémon save struct with the extra 56 GTS bytes.
The post_finish was:
token: RopF90e9azV0W2mqhIWuLIbn5qSqqrDT
hash: 97f3488b0caa742140e4bdc2a118c091b66d0355
data:
0000000: 4a3b 2f96 23e0 d995 b2a9 455b f955 fbba J;/.#.....E[.U..
As magical said, posting the same Pokémon twice results in entirely different data. It then seems likely that the token or hash is used as a key... but requests to info.asp et al send the same eight bytes. And what is being sent to post_finish that it has another eight bytes?
4a3b aea9 fcae abec -- first eight bytes to post.asp
4a3b 2f96 23e0 d995 -- first eight bytes to post_finish.asp
Looking at some of magical's experiments, I've noticed the following.
These are data sent to info.asp, from three different pids (two magical, the third depundep):
0000000: 4a3b 2d75 3f14 cc1d J;-u?...
0000000: 4a3b 2de5 07b1 0239 J;-....9
0000000: 4a3b 2e09 3fa6 8a60 J;..?..`
And these are data sent to post_finish.asp, from the same two different pids:
0000000: 4a3b 2f33 51ef f2e5 a09e d65f 3ca0 3bf3 J;/3Q......_<.;.
0000000: 4a3b 2fe9 1af2 0cc6 887a c2f3 24ad dc68 J;/......z..$..h
0000000: 4a3b 2f96 23e0 d995 b2a9 455b f955 fbba J;/.#.....E[.U..
pids are:
98193975 (0x05da5237)
255512799 (0x0f3ad0df)
117094747 (0x06fab95b)
So the third byte seems to stay the same across requests to the same page. Except for depundep's info.asp, which is off by 1..?
The info.asp data might be a null payload. So what are the other five bytes? Hash of the pid?
イーブイ
Mar 21st, 2010, 07:38 PM
magical has performed a fascinating experiment.
He posted this Pokémon:
0000000: 0bbe 49d0 0000 cb1e 3764 78b1 74f3 97b2 ..I.....7dx.t...
0000010: b24c fab5 37fd f13c 40f5 bfdd 7355 0281 .L..7..<@...sU..
0000020: c754 1f06 9538 4e24 6b56 7231 d74a d352 .T...8N$kVr1.J.R
0000030: 2c5d 334f 3f5e b54b 45cb 861b f78e f4fa ,]3O?^.KE.......
0000040: f41d b4e5 7195 1be1 8769 abb8 2fe2 7360 ....q....i../.s`
0000050: 4419 a39d df5f 46f5 e959 a6c4 8748 f86a D...._F..Y...H.j
0000060: a8a3 894c 4057 54ee 991d 32eb 59cf a276 ...L@WT...2.Y..v
0000070: 8ed7 a70e 60d8 3268 c9d7 87f5 cec5 6c7f ....`.2h......l.
0000080: be37 c58a e9ff 2659 cfee 064d 8f09 3f4a .7....&Y...M..?J
0000090: 128b 9dec 0aab 7472 dc1d 8f88 a6c8 b6f0 ......tr........
00000a0: 40e7 6bcc c1e2 22ad 5cae 5d39 b797 7dac @.k...".\.]9..}.
00000b0: 48d6 7d21 e5fb 140a e703 41c9 1cbd 1d8b H.}!......A.....
00000c0: 3f9f cb50 344a 1ff5 3131 45c6 a63d f7b4 ?..P4J..11E..=..
00000d0: 77f5 9147 152a f1b0 a36f 5c6d 6e68 8a95 w..G.*...o\mnh..
00000e0: c19b 5b61 dd0a 0c61 3a3d 8226 9f01 020c ..[a...a:=.&....
00000f0: 3f00 0264 6400 0000 da07 0315 1025 0200 ?..dd........%..
0000100: 0000 0000 0000 0000 3752 da05 2b01 5201 ........7R..+.R.
0000110: 4801 5601 4901 5b01 ffff 0000 47bc 0000 H.V.I.[.....G...
0000120: 3300 0a02 3...
which resulted in this data:
0000000: 4a3b 52db b7c2 32b5 afda bd0d 913e 2c78 J;R...2......>,x
0000010: a9fb 8b27 ecda 9953 0173 fa95 9a1c 5f33 ...'...S.s...._3
0000020: 0532 18d7 aee9 ef84 ab6b 19cc 3d6e 0a5c .2.......k..=n.\
0000030: 1ae5 2008 5541 d316 78ee 625c 6c23 71ac .. .UA..x.b\l#q.
0000040: 0018 6661 0f9c f7fe d937 d997 b3e1 9303 ..fa.....7......
0000050: a3bc d0dc daf0 838d be6a 8001 97c3 6bc7 .........j....k.
0000060: 59f0 2909 eec1 fb8c 563e 09c7 38c5 d833 Y.).....V>..8..3
0000070: 5460 f525 d3f9 1463 3320 6a7d 45ee f343 T`.%...c3 j}E..C
0000080: 5716 8a49 06dc a89d 4626 5247 8b58 01f8 W..I....F&RG.X..
0000090: 49cd 8b62 5766 17b9 a633 35a3 88ef 2d75 I..bWf...35...-u
00000a0: fb8e 3d76 0b71 a8c0 731b 613d d949 13c8 ..=v.q..s.a=.I..
00000b0: 3991 7b79 ce21 5d6c b1fa 77c8 1247 d80b 9.{y.!]l..w..G..
00000c0: 8594 9585 b3de f481 f848 f9ff 06dc 9c97 .........H......
00000d0: b378 ad7f a53c 8200 d538 dcbf 09bd 03ff .x...<...8......
00000e0: cb2a 9133 0666 7433 0d80 3ddf 9a6a f8ae .*.3.ft3..=..j..
00000f0: cd87 af77 904b 020a f611 cb51 ecce a329 ...w.K.....Q...)
0000100: 5116 f4eb 6eb2 353c 593f ffd6 f101 5ce5 Q...n.5<Y?....\.
0000110: db08 4dc1 1e86 c5ee cb73 8259 9d59 e3c8 ..M......s.Y.Y..
0000120: ca7f a2ab 1dfb 6405 bbba 5eb3 ......d...^.
To which he applied:
if req.action == 'post' and 'data' in req.qvars:
data = b64decode(req.qvars['data'][0].encode('ascii'))
data = bytearray(data)
data[-56 + 0x04] ^= 1 # requested pokemon
data[-56 + 0x12] ^= 1 # second dep'd
data = bytes(data)
req.qvars['data'][0] = b64encode(data).decode('ascii')
Which resulted in:
0000000: 4a3b 52db b7c2 32b5 afda bd0d 913e 2c78 J;R...2......>,x
0000010: a9fb 8b27 ecda 9953 0173 fa95 9a1c 5f33 ...'...S.s...._3
0000020: 0532 18d7 aee9 ef84 ab6b 19cc 3d6e 0a5c .2.......k..=n.\
0000030: 1ae5 2008 5541 d316 78ee 625c 6c23 71ac .. .UA..x.b\l#q.
0000040: 0018 6661 0f9c f7fe d937 d997 b3e1 9303 ..fa.....7......
0000050: a3bc d0dc daf0 838d be6a 8001 97c3 6bc7 .........j....k.
0000060: 59f0 2909 eec1 fb8c 563e 09c7 38c5 d833 Y.).....V>..8..3
0000070: 5460 f525 d3f9 1463 3320 6a7d 45ee f343 T`.%...c3 j}E..C
0000080: 5716 8a49 06dc a89d 4626 5247 8b58 01f8 W..I....F&RG.X..
0000090: 49cd 8b62 5766 17b9 a633 35a3 88ef 2d75 I..bWf...35...-u
00000a0: fb8e 3d76 0b71 a8c0 731b 613d d949 13c8 ..=v.q..s.a=.I..
00000b0: 3991 7b79 ce21 5d6c b1fa 77c8 1247 d80b 9.{y.!]l..w..G..
00000c0: 8594 9585 b3de f481 f848 f9ff 06dc 9c97 .........H......
00000d0: b378 ad7f a53c 8200 d538 dcbf 09bd 03ff .x...<...8......
00000e0: cb2a 9133 0666 7433 0d80 3ddf 9a6a f8ae .*.3.ft3..=..j..
00000f0: cd87 af77 904b 020a f711 cb51 ecce a329 ...w.K.....Q...)
0000100: 5116 f4eb 6eb2 343c 593f ffd6 f101 5ce5 Q...n.4<Y?....\.
0000110: db08 4dc1 1e86 c5ee cb73 8259 9d59 e3c8 ..M......s.Y.Y..
0000120: ca7f a2ab 1dfb 6405 bbba 5eb3 ......d...^.
Flipped bits are in 0xf8 and 0x106.
Which was accepted by the server and resulted in this Pokémon coming back:
0000000: 0bbe 49d0 0000 cb1e 3764 78b1 74f3 97b2 ..I.....7dx.t...
0000010: b24c fab5 37fd f13c 40f5 bfdd 7355 0281 .L..7..<@...sU..
0000020: c754 1f06 9538 4e24 6b56 7231 d74a d352 .T...8N$kVr1.J.R
0000030: 2c5d 334f 3f5e b54b 45cb 861b f78e f4fa ,]3O?^.KE.......
0000040: f41d b4e5 7195 1be1 8769 abb8 2fe2 7360 ....q....i../.s`
0000050: 4419 a39d df5f 46f5 e959 a6c4 8748 f86a D...._F..Y...H.j
0000060: a8a3 894c 4057 54ee 991d 32eb 59cf a276 ...L@WT...2.Y..v
0000070: 8ed7 a70e 60d8 3268 c9d7 87f5 cec5 6c7f ....`.2h......l.
0000080: be37 c58a e9ff 2659 cfee 064d 8f09 3f4a .7....&Y...M..?J
0000090: 128b 9dec 0aab 7472 dc1d 8f88 a6c8 b6f0 ......tr........
00000a0: 40e7 6bcc c1e2 22ad 5cae 5d39 b797 7dac @.k...".\.]9..}.
00000b0: 48d6 7d21 e5fb 140a e703 41c9 1cbd 1d8b H.}!......A.....
00000c0: 3f9f cb50 344a 1ff5 3131 45c6 a63d f7b4 ?..P4J..11E..=..
00000d0: 77f5 9147 152a f1b0 a36f 5c6d 6e68 8a95 w..G.*...o\mnh..
00000e0: c19b 5b61 dd0a 0c61 3a3d 8226 9f01 020c ..[a...a:=.&....
00000f0: 3e00 0264 6400 0000 da07 0315 1036 3a00 >..dd........6:.
0000100: 0000 0000 0000 0000 3752 da05 2b01 5201 ........7R..+.R.
0000110: 4801 5601 4901 5b01 ffff 0000 47bc 0000 H.V.I.[.....G...
0000120: 3300 0a02 3...
The only differences are in 0xf0 and 0xfd.
His pid is 98193975 (0x05da5237).
The snapshots may have a different timestamp.
Before, the requested Pokémon was an Abra; after, it was set to Poliwrath.
Decoded (probably):
Before:
0000000: 0bbe 49d0 0000 cb1e 4601 ffff 3701 2c01 ..I.....F...7.,.
0000010: 2f01 2f01 ffff 0000 0000 0000 0000 000a /./.............
0000020: 0000 0000 0000 0000 9f01 5e00 47bc 11ea ..........^.G...
0000030: cd03 0000 4676 0002 0000 0000 0000 0000 ....Fv..........
0000040: 0000 0000 0000 0000 2b01 5201 4801 5601 ........+.R.H.V.
0000050: 4901 5b01 ffff 0000 0000 000a 0204 0000 I.[.............
0000060: 1600 0004 0c00 0000 e600 1000 0000 0000 ................
0000070: 1423 0000 0000 0000 ff0c 719f 0000 0000 .#........q.....
0000080: 0200 0000 0000 0000 0000 0000 0c00 2000 .............. .
0000090: 2000 0d00 1000 1300 0e00 1000 0000 0000 ...............
00000a0: 0002 0aff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff 2602 ffff 0000 ..........&.....
00000c0: ffff ffff ffff 3a01 ffff ffff ffff 4301 ......:.......C.
00000d0: ffff ffff 0000 0000 0000 0000 0000 0000 ................
00000e0: 0000 0000 0000 0000 0000 0003 d666 7673 .............fvs
00000f0: 210a d853 c854 0561 a024 57ea e7ec 5e99 !..S.T.a.$W...^.
0000100: da68 fc92 3387 c1db 38d2 b5c5 c32d ed69 .h..3...8....-.i
0000110: 7a94 dc04 8864 aec1 17e9 6371 37ba 2eb1 z....d....cq7...
0000120: d5f2 77a2 ..w.
After:
0000000: 0bbe 49d0 0000 cb1e 4601 ffff 3701 2c01 ..I.....F...7.,.
0000010: 2f01 2f01 ffff 0000 0000 0000 0000 000a /./.............
0000020: 0000 0000 0000 0000 9f01 5e00 47bc 11ea ..........^.G...
0000030: cd03 0000 4676 0002 0000 0000 0000 0000 ....Fv..........
0000040: 0000 0000 0000 0000 2b01 5201 4801 5601 ........+.R.H.V.
0000050: 4901 5b01 ffff 0000 0000 000a 0204 0000 I.[.............
0000060: 1600 0004 0c00 0000 e600 1000 0000 0000 ................
0000070: 1423 0000 0000 0000 ff0c 719f 0000 0000 .#........q.....
0000080: 0200 0000 0000 0000 0000 0000 0c00 2000 .............. .
0000090: 2000 0d00 1000 1300 0e00 1000 0000 0000 ...............
00000a0: 0002 0aff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff 2602 ffff 0000 ..........&.....
00000c0: ffff ffff ffff 3a01 ffff ffff ffff 4301 ......:.......C.
00000d0: ffff ffff 0000 0000 0000 0000 0000 0000 ................
00000e0: 0000 0000 0000 0000 0000 0003 d666 7673 .............fvs
00000f0: 200a d853 c854 0561 a024 57ea e7ff 6699 ..S.T.a.$W...f.
0000100: da68 fc92 3387 c1db 38d2 b5c5 c32d ed69 .h..3...8....-.i
0000110: 7a94 dc04 8864 aec1 17e9 6371 37ba 2eb1 z....d....cq7...
0000120: d5f2 77a2 ..w.
Differences are in the same places.
So. Flipped bits at 0xf8 and 0x106 in the data. Discarding the 0x08 bytes for the header, that leaves offsets 0xf0 and 0xfd -- which are the exact bytes that differ in the decoded Pokémon.
Awesome.
Here's the bit-twiddled data, minus the first eight bytes, XORed with the Pokémon that came back:
0000000: a464 f4dd 913e e766 9e9f f396 9829 0ee1 .d...>.f.....)..
0000010: b33f 0020 ade1 ae0f 45c7 a70a ddbc ed05 .?. ....E.......
0000020: 6c3f 06ca a856 4478 71b3 5239 820b 0044 l?...VDxq.R9...D
0000030: 54b3 5113 537d c4e7 45d3 e07a f812 0304 T.Q.S}..E..z....
0000040: 2d2a 6d72 c274 88e2 24d5 7b64 f512 f0ed -*mr.t..$.{d....
0000050: fa73 239c 489c 2d32 b0a9 8fcd 6989 03e6 .s#.H.-2....i...
0000060: fe9d 808b 7892 8cdd cd7d c7ce 8a36 b615 ....x....}...6..
0000070: bdf7 cd73 2536 c12b 9ec1 0dbc c819 c4e2 ...s%6.+........
0000080: f811 97cd 62a7 27a1 8623 8d2f d86f 28f3 ....b.'..#./.o(.
0000090: b4b8 a84f 8244 5907 2793 b2fe adb9 1e30 ...O.DY.'......0
00000a0: 33fc 0af1 18ab 3165 653f 2640 79b6 20c0 3.....1ee?&@y. .
00000b0: f92c 0ae9 f7bc cc01 6297 d44c af63 e90a .,......b..L.c..
00000c0: c7d7 32af 3296 8362 8249 e8b9 0301 75b4 ..2.2..b.I....u.
00000d0: a2cd 4df8 1c97 f24f 6845 cd5e 680e fea6 ..M....OhE.^h...
00000e0: cc1b 66be 4760 f4cf f7ba 2d51 0f4a 0006 ..f.G`....-Q.J..
00000f0: c911 c935 88ce a329 8b11 f7fe 7e84 0e3c ...5...)....~..<
0000100: 593f ffd6 f101 5ce5 ec5a 97c4 3587 97ef Y?....\..Z..5...
0000110: 8372 d458 d458 b8c9 3580 a2ab 5a47 6405 .r.X.X..5...ZGd.
0000120: 88ba 54b1 ..T.
イーブイ
Mar 21st, 2010, 08:51 PM
Current thoughts on the cipher itself:
Pokémon sent to the GTS have an extra eight bytes added. What are these? The data sent to post_finish.asp is also eight bytes long; is it the same thing?
Pokémon sent to exchange.asp have *another* four bytes added -- presumably the receiver's pid.
I'm assuming here that info.asp has an empty payload. Here are four data sent to info.asp, from two of magical's games, LordLandon's game, and my Platinum:
pid 0x05da5237: 0x752d3b4a 0x1dcc143f
pid 0x0f3ad0df: 0xe52d3b4a 0x3902b107
pid 0x06fab95b: 0x092e3b4a 0x608aa63f
pid 0x0b7b1424: 0xa32c3b4a 0x6b3bb412
LordLandon did an experiment, slightly changing his game's pid. The results were:
pid 0x06fab95b: 0x092e3b4a 0x608aa63f
pid 0x06fab95c: 0x082e3b4a 0x374801f5
pid 0x07fab95b: 0x082e3b4a 0x364801f2
pid 0x07fab95c: 0x0b2e3b4a 0xfb0ee8b2
pid 0x07faba5c: 0x0a2e3b4a 0xc0cc506f
In inconvenient binary form:
00000110 11111010 10111001 01011011 pid
00001000 00101110 00111011 01001010
01100000 10001010 10100110 00111111
00000110 11111010 10111001 01011100 pid
00001000 00101110 00111011 01001010
00110111 01001000 00000001 11110101
00000111 11111010 10111001 01011011 pid
00001000 00101110 00111011 01001010
00110110 01001000 00000001 11110010
00000111 11111010 10111001 01011100 pid
00001011 00101110 00111011 01001010
11111011 00001110 11101000 10110010
00000111 11111010 10111010 01011100 pid
00001010 00101110 00111011 01001010
11000000 11001100 01010000 01101111
We know:
- Flipping one bit in good data makes bad data. Flipping two separated bits in good data makes good data.
- The same pid sends the same data to info.asp every time. Different pids send different data to info.asp.
- Posting the same Pokémon *from a box* twice sends radically different data (magical). Posting the same Pokémon *from the party* twice sends exactly the same data (LordLandon).
It seems both the pid and a checksum of the data are used to generate the key.
interdpth
Mar 23rd, 2010, 12:24 PM
Hey there, just joined this thread is awesome.
Is there a way yet, to send multiple pokemon in one go without having to restart the game? Or would I have to figure this out by decoding wi-fi dumps?
Edit: I read the thread saw there isn't.
But question, I don't have my DS wth me and won't for a few hours, but in sendpkm.py
Why does it return 1? In most big company code(I say that loosely) doesn't returning 1 usually indicate an error while 0 indicates success?
Also, has anyone tried to have their browser emulate whatever the DS sends? Like the identity thing if it's a FF browser, IE or Opera and all that?
イーブイ
Mar 23rd, 2010, 01:29 PM
Is there a way yet, to send multiple pokemon in one go without having to restart the game?
I believe this would be possible by replying to result.asp with several different Pokémon in a row, but it won't actually work unless we can figure out why Pt/HG/SS report a communication error.
Why does it return 1? In most big company code(I say that loosely) doesn't returning 1 usually indicate an error while 0 indicates success?
Process exit codes use 0 for success and 1–255 for error, yes. The only place sendpkm.py explicitly exits is if you don't provide a filename, which is indeed an error. Otherwise it drops out and Python will exit with 0.
Edit: Oh, the 0x0001 response. I can't recall ever seeing 0 used for success outside process exit, actually. But that's what was sniffed from D/P, and we have no idea what it actually means either way; result.asp uses 0x0004 and 0x0005 to mean yes/no. (What.) Dumps of the same operations performed by both D/P and Pt/HG/SS should tell us for sure.
Also, has anyone tried to have their browser emulate whatever the DS sends? Like the identity thing if it's a FF browser, IE or Opera and all that?
It would probably work, but I doubt it would be useful. We don't know the encryption used for sending data, you need to respond to a challenge every time you send a request, and the response is binary.
Wichu
Mar 24th, 2010, 11:25 AM
We know:
- Flipping one bit in good data makes bad data. Flipping two separated bits in good data makes good data.
This looks like parity checking (http://en.wikipedia.org/wiki/Parity_bit) to me. So there's most likely a parity bit(s) in there somewhere.
Ringo
Mar 25th, 2010, 12:30 PM
I seem to still be having some troubles that keep leading to the blue screen.
I am running Mac OS X. Python version 2.6
With LordLandon's advice on my first issue I checked what else was running. I turned off printer sharing, web sharing, etc.
I used an AR DSi to dump my save file to micro SD. I coverted it from .DUC to SAV and extracted my party Pokemon.
For some reason it appears to connect and still goes to the blue screen that says "press A to return to title screen." When I attempted to use a box Pokemon the screen flickered blue and black and static.
I have tried Diamond, Pearl, and Platinum all three do the same thing. I am wondering is there an updated version of sendpkm? Or is there anything else on my own network or computer I can try? Are thee any settings on my router I can change? I keep looking through my control panels, and the router settings and don't see anything that would make sense to change in either place. Any advice would be appreciated.
Also, has anyone tried this on Heartgold/Soulsilver yet??? I have made it to Goldenrod City on both of my saves and would have already tried it if not for the issues I am still having on D/P/PT
Thanks in advance to any kind sould who can help solve this for me.
--Ringo
PS-- Thanks again to LordLangdon for your service to the Pokemon community and for the help solving the first issue I had.
KazoWAR
Mar 25th, 2010, 05:28 PM
Do you think it would be possible to have a program like sendpkm download wondercards to a retail cart via the get from Wi-Fi feature?
derrick
Mar 28th, 2010, 01:47 AM
probly not as its made to send pokemon
Pingouin7
Mar 28th, 2010, 02:13 PM
probly not as its made to send pokemon
Well... Reading his post would probably be a good idea.
He asked if it was possible to make a program that works like sendpkm, except it lets you download Wondercards over Wi-Fi.
Vlad
Mar 28th, 2010, 07:09 PM
I've played a bit around with this myself, thanks to the sample DNS server script LordLandon submitted and after some Python quick courses I managed to make a simple DNS redirect .py script that simply redirects all GTS related requests to a specific IP (webserver) thus you can by manually entering a DNS on the Pokemon game network settings, you can connect to a custom web-server and let it handle your client requests -rather than the official GTS.
It's not perfect but combining the DNS server with a simple PHP script it currently let's you be online without disconnecting (though no results are returned when you search, deposit only shows the visuals -no pokemon is actually deposited anywhere). With a simple on/off flag I can make anyone that connects "forcefully" receive a pokemon as if someone traded with them. Looking around and I see others are looking into the server side data, it's nice because if the _GET[data] can be decoded and information extracted, it's possible to even create a PKM file server where you "search" for a pokemon and you always find "people" that trade it away (funny enough it would simply be the server decoding your search and then for example forcing you to accept a pokemon as if someone traded it to you the normal way).
A lot of possibilities and I think there will be a projectpokemon.org official GTS DNS address everyone can input and fetch their legal pokemon at what ever level and gender they want. ;)
Included my sources as an attachment, nothing big just another version of what LordLandon made only that this is for a webserver (PHP and Python to encode/decode pkm/bin).
By the way if you wanna try it out and see what awesome Pokémon you get by connecting to my GTS server, you actually can for tonight! Load the game, edit the network settings, set the DNS primary IP to my IP: 84.202.82.24. Save the changes and load the save, go to GTS (Goldenrod City, west of the Radio Station) and connect. So far the connection tests and "handshake" server(?) connections are not touched, but once it starts to read from the website it will be my own server and not Nintendos. :P If someone uses it tonight I'll check the logs and see how it went, just trying it out so won't be online after ~12 hours. ;)
M@T
Mar 28th, 2010, 08:17 PM
Hi everyone !
I made two VB.NET console applications, one for the DNS Server part, and the other for the Pokémon sending part (fake GTS).
It was ready for quite a while, but I couldn't test it until Saturday.
Now it's been tested and it works well, I was able to send a Pokémon to a friend of mine across the Internet without problem.
I made the GTS server working with threads, so several connections are possible simultaneously.
It is mainly a copypasta of the Python script, but it can be easily improved and included in a window application.
For example, I was planning to make a GUI that would include the ability to make a list of Pokémon to send.
I attached a ZIP file containing the sources and the binaries of the two programs.
Vlad
Mar 29th, 2010, 10:38 AM
This is kind of neat. Package contains a mini DNS server and the PHP files for the logging.
It does require some configuration but in the end by having $pure_log on, it simply receives requests and writes the communication to log files. It still uses the official servers but the game is not aware of that, kind of cool. Helps log stuff when you go to GTS or the battletower, do some stuff and the data is logged for future research.
I doubt it's something new but what the heck, perhaps someone gets more use of this than me. :)
For example when I turn on my DNS server and set my NDS to connect to it, I can use the GTS/Battletower and the communications will be logged at http://vlacula.no-ip.com/pokemon/egts/pokemondpds/logs/!
Weby
Mar 29th, 2010, 02:42 PM
Hello (and Welcome to me, I know).
I'm just working on a FULL PHP GTS server, and will examinate your code with attention...
Evil cheater, using python for calculating values :P (the part of encoding .pkm is already done on my server, if you're intersted...).
Just for you to know, the part with sockets is very difficult in this server with PHP, because of the port 80, used by Apache... And the asynchron connexion.
Thank you for your egts server.
PS : I'm a French speaking Swiss, so don't pay attention to my scabrous english :bidoof:
datoneguy
Apr 1st, 2010, 01:47 PM
This is kind of neat. Package contains a mini DNS server and the PHP files for the logging.
It does require some configuration but in the end by having $pure_log on, it simply receives requests and writes the communication to log files. It still uses the official servers but the game is not aware of that, kind of cool. Helps log stuff when you go to GTS or the battletower, do some stuff and the data is logged for future research.
I doubt it's something new but what the heck, perhaps someone gets more use of this than me. :)
For example when I turn on my DNS server and set my NDS to connect to it, I can use the GTS/Battletower and the communications will be logged at http://vlacula.no-ip.com/pokemon/egts/pokemondpds/logs/!
Just a quick question, but how'd you set this up?
I'm having issues trying to figure out how to set it up so that I can publish my DNS to allow people outside my network to connect. I was under the original assumption that your script is made so it can go up on a webhost, but when I put it up on mine it doesn't do anything (probably due to shared hosting), or maybe I'm missing on how to do this altogether, working on like 6 hours of sleep from 2 days ago.
Forgot to mention, I'm really only interested in serving up pokemon, preferably many at a time to different people (if possible) and being able to just have the script run at different times of day (easy enough to setup).
I tried no-ip (what you're using), but was still a bit lost despite having used it before.
Vlad
Apr 1st, 2010, 07:53 PM
Just a quick question, but how'd you set this up?
I'm having issues trying to figure out how to set it up so that I can publish my DNS to allow people outside my network to connect. I was under the original assumption that your script is made so it can go up on a webhost, but when I put it up on mine it doesn't do anything (probably due to shared hosting), or maybe I'm missing on how to do this altogether, working on like 6 hours of sleep from 2 days ago.
Forgot to mention, I'm really only interested in serving up pokemon, preferably many at a time to different people (if possible) and being able to just have the script run at different times of day (easy enough to setup).
I tried no-ip (what you're using), but was still a bit lost despite having used it before.
The Python script will send all DNS requests to what ever IP you like (in this case your own host IP). Now the PHP website thing is just a fragment of what "GTS" really is, just a test and it's not something I recommend you use. On the other hand what you can do is simply use the original LordLandon Python script (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=67086&viewfull=1#post67086) that is both webserver and DNS server.
Run sendpkm.py and it should ask you to enter the path to a .pkm file. Once that's done it will wait for a DS to contact it, the way that happens is to put your own IP (public IP even if you like) on the Pokemon network settings (in the Pokemon game, main screen, WIFI settings). Port 53 must be publicly open on the PC you use as a "server" and you should be able to log the GTS (official one) from before, this means all ports are okay.
About the PHP script I made you must edit .htaccess (the relative "root" path) and the index.php (lines 16-20 and 26-27). Btw if line 16 is set to "$pure_log = 1;" then it simply acts and works as the official GTS because it just sends all requests to GTS and sends the response to the NDS and it wont tell the difference. You could try that just to see if it works, then by disabling $pure_log and enabling $pkmdist it will send what ever .pkm file you specify on line 27 to each person that connect. The DNS server must run on the side to keep redirecting requests properly.
It's not bug free, it's far from finished and if you hang on a while longer there will be a proper GTS source-code available for all the enthusiasts that wanna run their own home GTS for themselves and friends.
*Edit*
Also, for the DNS to work properly, if you have a host and you ping the domain for your site you can read the proper IP, now if you http://0.0.0.0 directly, if you do not get to the website directly then it wont work using that as the server for the PHP files. I myself run XAMPP on my own machine, that's why my no-ip domain points directly to my IP so you can access my "homepage" both using IP and domain name. The DNS server LordLandon and I made are simple ;)
diando
Apr 1st, 2010, 10:32 PM
Do you think it would be possible to have a program like sendpkm download wondercards to a retail cart via the get from Wi-Fi feature?
Thought about that too check my post on GBATEMP
http://gbatemp.net/index.php?showtopic=211989&st=195&p=2707811&#entry2707811
I thinks it would be great.
Vlad
Apr 2nd, 2010, 11:52 AM
Let's just say that if it does utilize the DNS settings (as it should) and if the connection is not SSL encrypted it will be possible to as well emulate that like the GTS. Problem is if the server use SSL encryption it will be really hard to crack and then act as the server, the client would not get what it expects and it would just end up with errors and blue screens. Let's hope for the best but I have not looked into it, last time I checked for Mystery Gift over WIFI it connected to a special download server, didn't check the communication but it may be SSL. :/
Twitch
Apr 3rd, 2010, 05:16 PM
I can't seem to get it to work for me. I'm using a laptop with Vista, and I've tried running it both wirelessly and with a cable going to the router. I've opened port 53, and forwarded it on the router to this computer. I put the IP that sendpkm gave me in as the DNS info in the WFC setup. Every time I go it either tells me I can't connect, or gives me the blue error screen. Did I miss something on this thread? Some help would be greatly appreciated :)
Arjun - PeeB4UGo
Apr 3rd, 2010, 05:17 PM
How would the sendpkm.py script be modified to work more as a distribution center to multiple systems, kind of like this (http://gts.determinismsucks.net/index.html)?
Vetle
Apr 3rd, 2010, 05:21 PM
I've played a bit around with this myself, thanks to the sample DNS server script LordLandon submitted and after some Python quick courses I managed to make a simple DNS redirect .py script that simply redirects all GTS related requests to a specific IP (webserver) thus you can by manually entering a DNS on the Pokemon game network settings, you can connect to a custom web-server and let it handle your client requests -rather than the official GTS.
It's not perfect but combining the DNS server with a simple PHP script it currently let's you be online without disconnecting (though no results are returned when you search, deposit only shows the visuals -no pokemon is actually deposited anywhere). With a simple on/off flag I can make anyone that connects "forcefully" receive a pokemon as if someone traded with them. Looking around and I see others are looking into the server side data, it's nice because if the _GET[data] can be decoded and information extracted, it's possible to even create a PKM file server where you "search" for a pokemon and you always find "people" that trade it away (funny enough it would simply be the server decoding your search and then for example forcing you to accept a pokemon as if someone traded it to you the normal way).
A lot of possibilities and I think there will be a projectpokemon.org official GTS DNS address everyone can input and fetch their legal pokemon at what ever level and gender they want. ;)
Included my sources as an attachment, nothing big just another version of what LordLandon made only that this is for a webserver (PHP and Python to encode/decode pkm/bin).
By the way if you wanna try it out and see what awesome Pokémon you get by connecting to my GTS server, you actually can for tonight! Load the game, edit the network settings, set the DNS primary IP to my IP: 84.202.82.24. Save the changes and load the save, go to GTS (Goldenrod City, west of the Radio Station) and connect. So far the connection tests and "handshake" server(?) connections are not touched, but once it starts to read from the website it will be my own server and not Nintendos. :P If someone uses it tonight I'll check the logs and see how it went, just trying it out so won't be online after ~12 hours. ;)
when i try to connect to the gts server, it works fine until the gamestats2 request.
ingame i get this message: "You were disconnected from the GTS. Returning to the reception counter."
i placed .htaccess in the root of my webserver. i edited so it points to /pokemon/egts/pokemondpds/index.php$1
i edited the index.php file server root to point to C:\xampp\htdocs
i edited the log to goto C:\xampp\htcods\pokemon\egts\pokemondpds\logs ect.
what did i do wrong?
Twitch
Apr 3rd, 2010, 05:23 PM
@Arjun - PeeB4UGo: From what I understand, anybody who has the IP for the sendpkm setup can access it, making it an automatic "distribution center". All you have to do is hand out the IP to be input into as the system's DNS, and they all can access it.
Arjun - PeeB4UGo
Apr 3rd, 2010, 05:27 PM
@Arjun - PeeB4UGo: From what I understand, anybody who has the IP for the sendpkm setup can access it, making it an automatic "distribution center". All you have to do is hand out the IP to be input into as the system's DNS, and they all can access it.
Twitch: While that's true for one system, that's as far as it goes, because the script closes immediately after the file is sent.
Vlad
Apr 3rd, 2010, 09:26 PM
Still bugs in this version but overall it works for distribution. You get the idea at least, one is for DNS other is for the actual server. If you don't got a host the Python will act as the webserver too. Still using the library from LordLandon (think it still only accepts PKM files from Party pokemon and not Storage).
Anyway try it out, seems some are desperate so I made a alpha release for private use. You need Python and port 80 to be open up, if you can connect to the official GTS then you can connect to this one too. Going to post a update and working (bugfree) version when I get time to polish it. :)
Devo
Apr 3rd, 2010, 10:03 PM
Thanks for the work
Um how do i make this work on a web server >.<?
I got shared hosting server wanted to see if its possible to give it a try
Vetle
Apr 3rd, 2010, 10:19 PM
Still bugs in this version but overall it works for distribution. You get the idea at least, one is for DNS other is for the actual server ....
i was mainly looking for the logging feature, as i already got a xampp server setup.
thedarkspine
Apr 4th, 2010, 12:04 AM
Alright, How do i Open up Ports 53 and 80?
datoneguy
Apr 4th, 2010, 01:00 AM
Depends on your modem, go to portforward.com
If anyone is interested, I got this working on my computer, and I made a little package with everything I needed, using the dnsserver.py that Vlad posted and the vB script for distribution (since it's threaded).
For some reason it does require having Apache installed, and it required me to enable python for it as well (in hindsight PHP wasn't needed since I couldn't even get it to work properly with it, it wouldn't hand out pokemon, it would just do nothing :/)
I'm gonna try the new one Vlad posted now, seems cool.
I'm also checking out that Pokemon Fan Event site, looks good.
I've been hanging around Trickroom recently (they do a similar thing).
I've been wondering how hard it would be to get one DNS server and just have it randomly dish out to the other 3~4, so that the load isn't as bad on one, and you don't get lots of errors. It seems this will be very simple to do by editing the dnsserver.py, making it an array and serving different IPs (randomly selected) to different people.
AngelSL
Apr 4th, 2010, 01:27 AM
Just a quick question, but how'd you set this up?
I'm having issues trying to figure out how to set it up so that I can publish my DNS to allow people outside my network to connect. I was under the original assumption that your script is made so it can go up on a webhost, but when I put it up on mine it doesn't do anything (probably due to shared hosting), or maybe I'm missing on how to do this altogether, working on like 6 hours of sleep from 2 days ago.
Forgot to mention, I'm really only interested in serving up pokemon, preferably many at a time to different people (if possible) and being able to just have the script run at different times of day (easy enough to setup).
I tried no-ip (what you're using), but was still a bit lost despite having used it before.
You guys, why not install a full-fledged DNS server and redirect your DS there?
Have the DNS server lookup the real DNS server (your ISP provides). So you can just replace <insert GTS domain here> while still being able to trade (normal, not GTS) without changing wifi settings every time?
And for datoneguy, use the simple DNS script, and portforward TCP&UDP 53. Direct people to set their DNS server to your WAN ip.
datoneguy
Apr 4th, 2010, 01:34 AM
Twitch: While that's true for one system, that's as far as it goes, because the script closes immediately after the file is sent.
Not only does a simple batchscript fix this, but if you read the whole thread, on page 7 or 8 there is a link to GTS_Nuker, which is threaded and allows for multiple pokemon to be sent at the same time, and keeps sending pokemon as long as requests are made, until it is closed.
datoneguy
Apr 4th, 2010, 01:41 AM
Still bugs in this version but overall it works for distribution. You get the idea at least, one is for DNS other is for the actual server. If you don't got a host the Python will act as the webserver too. Still using the library from LordLandon (think it still only accepts PKM files from Party pokemon and not Storage).
Anyway try it out, seems some are desperate so I made a alpha release for private use. You need Python and port 80 to be open up, if you can connect to the official GTS then you can connect to this one too. Going to post a update and working (bugfree) version when I get time to polish it. :)
File "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\dnsse
rver.py", line 84
except Exception as ex:
^
SyntaxError: invalid syntax
Get this thrown up when I use it.
You guys, why not install a full-fledged DNS server and redirect your DS there?
Have the DNS server lookup the real DNS server (your ISP provides). So you can just replace <insert GTS domain here> while still being able to trade (normal, not GTS) without changing wifi settings every time?
And for datoneguy, use the simple DNS script, and portforward TCP&UDP 53. Direct people to set their DNS server to your WAN ip.
When I had portforwaded TCP/UDP 53 it still wouldn't work. I'm going to give it another shot now, just in case.
I've been having problems with dnsserver.py working period without having Apache setup, which is weird. :|
planetraptor420
Apr 4th, 2010, 02:18 AM
Hey, I'm having trouble getting my DS to connect to my MacBook Pro.
I use my MacBook to connect my DS to the Internet in the first place via Internet sharing and AirPort. But I think it's just having trouble connecting to my actual computer.
It works fine when I enter the DNS of this (http://gts.determinismsucks.net/) thing (which I'm guessing is essentially the same thing except not on a local network) but it doesn't work when I enter the IP of my Macbook. So I'm assuming it's something wrong with my Mac/router settings but I don't know what, I'm not an expert on this.
I quickly read through this thread and I didn't find anything helpful in relation to this problem, so forgive me if I missed something.
Forwarding port 53 didn't work and the python script seems to run fine (it shows no errors).
Any ideas how to get it working?
datoneguy
Apr 4th, 2010, 02:26 AM
What IP are you adding into your DS? I'm not exactly knowledgeable of this whole internet sharing AirPort thing, and I don't use a mac, but the gist of it from what I understand is that you get your LAN IP (however you do that on your MAC), and you put that in your DNS settings for your DS.
The whole portforwarding and all of that is only if your DS is NOT on the network (via internet, etc)
planetraptor420
Apr 4th, 2010, 02:32 AM
I'm putting 192.168.0.6 in the Primary DNS section on my DS (which is the IP of my MacBook). When I tap `Test Settings' it gives me error 52100.
datoneguy
Apr 4th, 2010, 03:04 AM
Test Settings will always fail, 100% of the time, unless you use certain methods here.
Here's what you do:
Insert the DNS, don't test, just accept, and move on to going ingame.
In game go to the GTS center (in Goldenrod), and connect from there.
This script only works through GTS.
--
@Vlad - I've been on /v/, and a certain IRC room and there is a LOT of demand for this working easily.
Hope you don't mind but I hosted a small bundle of what worked for me of the stuff I found in this thread, and it works easily:
pyrofyr.net/Stuff/pokemon/
I've only had one person say this way doesn't work so far, and he's still trying to figure it out now.
planetraptor420
Apr 4th, 2010, 03:09 AM
It still doesn't work. When I try to connect to GTS the signal goes green and then red while still on the ``Connecting to Nintendo Wi-Fi'' screen. It eventually fails to connect. No ``Checking GTS server..'', no Pokeball falling from the sky animation. I checked my boxes, the Pokemon isn't in there.
I also assumed that testing connection would work because if I use the Pokemon Fan Event Center (link above) as the DNS, the test succeeds.
datoneguy
Apr 4th, 2010, 03:57 AM
They probably use the proper version (not normal sendpkm.py and dns), that actually does reroute everything that's not GTS, to the proper servers.
What error are you getting exactly?
Most likely the reason I'm not able to properly help you is due to me not using macs and having no idea how an AirPort works (and never having done this with InternetSharing). I guess you'll probably have to wait for someone more knowledgeable in both fields to help, sorry.
planetraptor420
Apr 4th, 2010, 04:08 AM
Internet Sharing basically uses the AirPort card (that is used to connect to Wi-Fi on Macs) as a wireless router. My MacBook is connected via ethernet though.
The connection setup error is:
Error Code: 52100
Unable to connect to Nintendo Wi-Fi
Connection. Confirm connection settings
and access point settings.
For help, visit support.nintendo.com.
The GTS error is:
Unable to connect to Nintendo
W-Fi Connection.
Check your connection settings.
For help, visit
support.nintendo.com.
Error code: 52100
They're basically the same thing.
Devo
Apr 4th, 2010, 04:55 AM
Test Settings will always fail, 100% of the time, unless you use certain methods here.
Here's what you do:
Insert the DNS, don't test, just accept, and move on to going ingame.
In game go to the GTS center (in Goldenrod), and connect from there.
This script only works through GTS.
--
@Vlad - I've been on /v/, and a certain IRC room and there is a LOT of demand for this working easily.
Hope you don't mind but I hosted a small bundle of what worked for me of the stuff I found in this thread, and it works easily:
pyrofyr.net/Stuff/pokemon/
I've only had one person say this way doesn't work so far, and he's still trying to figure it out now.
I tried t and it works , nice going there
Question, is t possible to implement it on a regular shared webhosting ?
datoneguy
Apr 4th, 2010, 10:27 AM
Don't know, tried it and failed.
You mean you tried the script,or the testing? The testing works if you use Vlad's egts script. I haven't had success with the others.
Guardna
Apr 4th, 2010, 11:04 AM
With the GTS nuker, how do I send multiple Pokemon at a time ? and What am I supposed to write for "Please enter the IP of the fake GTS server", is it the same DNS displayed by LordLandon's sendpkm app ?
datoneguy
Apr 4th, 2010, 11:31 AM
I can't say, I didn't fuss around too much with the visual basic DNS Server. If you want to try the one I linked to, the readme explains how to set it up easily.
Guardna
Apr 4th, 2010, 11:59 AM
Thanks I'll try it, I really like the multi-threading option.
Arjun - PeeB4UGo
Apr 4th, 2010, 01:22 PM
Not only does a simple batchscript fix this, but if you read the whole thread, on page 7 or 8 there is a link to GTS_Nuker, which is threaded and allows for multiple pokemon to be sent at the same time, and keeps sending pokemon as long as requests are made, until it is closed.
Thanks. I've read the whole thread, but I must've missed it.
Guardna
Apr 4th, 2010, 02:28 PM
I still can't make more than one request at the same time -.-
gamer9678
Apr 4th, 2010, 04:12 PM
Just wondering if anybody had figured out how to send a pokemon to the computer in this way and receive it in the form of a pkm. Basically the reverse of the sendpkm.
zowayixx
Apr 4th, 2010, 04:43 PM
Alright, so I've gotten dnsserver to work and pkmserver to work, but right when my character goes to check the PC/GTS thing, the game starts rapidly flashing blue, and the pkmserver says "python: can't open file 'pkmlib.py': [Errno 2] No such file or directory". Can anyone help with this?
Also, I have all the files in the same directory, if that matters.
thedarkspine
Apr 4th, 2010, 05:01 PM
When it asks me to Enter in the IP of the fake GTS Server, i enter in my IP, and it says "Dns Server started on 0.0.0.0:53" Whats that mean?
thedarkspine
Apr 4th, 2010, 05:15 PM
Alright, I have the Dns server from the dns_and_pkm_srv File posted in this same thread, it says
Checking redirect Table and fetching proper IP's....
[gamestats2.gs.nintendowifi.net] "2" set to "75.91.55.18"
Starting Dns server in seperate thread...done!
Server is waiting for Requests.....
And the Pkmserver from the same file says
Started HTTP Server on port 80...
And when i connect to the GTS with 75.91.55.18 as my primary DNS. The Signal starts red, goes green, then red and says
Unable to connect to Nintendo Wi-fi Connection
Check your Connection Settings
For help, Visit support.nintendo.com
Error Code: 52100
zowayixx
Apr 4th, 2010, 05:28 PM
Alright, so I've gotten dnsserver to work and pkmserver to work, but right when my character goes to check the PC/GTS thing, the game starts rapidly flashing blue, and the pkmserver says "python: can't open file 'pkmlib.py': [Errno 2] No such file or directory". Can anyone help with this?
Also, I have all the files in the same directory, if that matters.
Nevermind on this, I got it to work. However, it works for myself, but whenever someone else tries to connect, dnsserver says
"conntest.nintendowifi.net" <buypass>
"nas.nintendowifi.net" <buypass>
"gamestats2.gs.nintendowifi.net" -> "My IP address"
and they end up losing their connection. Basically, it goes through for me but not for them. Any help?
Also, when I do other .pkm files, no matter if they're legal or not, the screen starts flashing blue and black really fast, then prompts me to restart the game. Any help on this also?
EDIT: On Pokemon HG/SS, it doesn't flash, but it does give a blue screen.
Twitch
Apr 4th, 2010, 08:03 PM
I think it would be awesome if the people who understand these things the best could make up some sort of user manual for them, and maybe a FAQ for them as well. would clear up a lot of these questions people have.
Zerovile
Apr 4th, 2010, 10:54 PM
Found this thread about 2 hours ago, on the whim of a friend who's sick of IV breeding. been putting various bits of coding together since.
On Windows 7/32bit with a D.Link-524 router
I have gotten the SendPKM python code working in conjunction with edited .PKM files (from PokeSAV) Python Scripts working properly, and I managed to transfer things into my old, junk copy, of Diamond.
my test BS bulbasaur looks to be working perfectly (but will probably get flagged by every hack detector ever, so i have no intention of using it). When DL'd from the fake GTS server there were no errors.
On a different whim I tried to make an exploding magikarp. Communication error resulted, but still transferred into box buuuuuuuuuuuut~ game freezes everytime I attempt to stare at it. I suspect ineptitude with PokeSAV. (could anyone possibly tell me which values on pokesav HAVE to be filled in to avoid this in the future)
Anyways I just wanted to reaffirm that it does work, and congratulations and thank you for all of your (presumably) hard work.
datoneguy
Apr 4th, 2010, 11:00 PM
I think it would be awesome if the people who understand these things the best could make up some sort of user manual for them, and maybe a FAQ for them as well. would clear up a lot of these questions people have.
I'd make some sort of thing, being able to get them to work was a task, but eventually wasn't a huge problem, however I'm not well equipped enough.
What you're using are extreme Alpha versions, if you can't handle the code don't expect a manual or something, you will have to be somewhat computer savvy and know how/where to mess with the code to get stuff to work, it's decently documented.
"conntest.nintendowifi.net" <buypass>
"nas.nintendowifi.net" <buypass>
"gamestats2.gs.nintendowifi.net" -> "My IP address"
and they end up losing their connection. Basically, it goes through for me but not for them. Any help?
Also, when I do other .pkm files, no matter if they're legal or not, the screen starts flashing blue and black really fast, then prompts me to restart the game. Any help on this also?
EDIT: On Pokemon HG/SS, it doesn't flash, but it does give a blue screen.
Are you making sure those other pokemon are PARTY pokemon? 236 bytes instead of 136 bytes?
Also, do you get the blue screen on HG/SS AFTER you get the pokemon? If you see the pokemon come over and then you blue screen, that's normal.
It seems your issue with other people connecting is because you're router is connecting fine, but to other people you aren't.
What IP are you giving to others? It seems that they're connecting to your DNS server you setup, but not actually 'getting' to the sendpkm.exe/py , Someone I met in IRC also had this problem.
Alright, I have the Dns server from the dns_and_pkm_srv File posted in this same thread, it says
And the Pkmserver from the same file says
And when i connect to the GTS with 75.91.55.18 as my primary DNS. The Signal starts red, goes green, then red and says
How far does your DNS server take you?
Also which scripts are you using? (The most recent one posted by Vlad?)
Devo
Apr 4th, 2010, 11:17 PM
Don't know, tried it and failed.
You mean you tried the script,or the testing? The testing works if you use Vlad's egts script. I haven't had success with the others.
Scratch that, its not working for me anymore =/
I mean ive never had issues sending myself the pokemons. But im trying to use the one you posted which would allow others to connect.
I have static IP, made 4 entries on my router for 53 UDP/TCP and 80 UDP/TCP ; as well as the same for my computer(windows firewall).
but i cant get anyone else to connect.
Mind giving me a hand =/?
And the other questioin would be if it would be possible to make the scripts work ona regular web host
datoneguy
Apr 5th, 2010, 12:08 AM
Scratch that, its not working for me anymore =/
I mean ive never had issues sending myself the pokemons. But im trying to use the one you posted which would allow others to connect.
I have static IP, made 4 entries on my router for 53 UDP/TCP and 80 UDP/TCP ; as well as the same for my computer(windows firewall).
but i cant get anyone else to connect.
Mind giving me a hand =/?
And the other questioin would be if it would be possible to make the scripts work ona regular web host
What issue are you having exactly?
The only common problem I've run into is people end up with seeing the DNS server connections, but the people get 52100/52101 errors (the DNSserver.py not properly directing towards somewhere for the sendpkm.exe to pick it up, or the sendpkm.exe not properly reading where the DNSserver.py is sending it).
I've yet to find a perfect solution, but I'd recommend: A)Disabling firewall both on your modem (for that single PC), and windows firewall if you have it, and running in Administrator mode. Make sure that you have in "Internet Settings" "Public" set for that program, so that people outside your network can connect without a problem.
I've yet to figure out the webhost problem, I'm pretty interested in an answer myself. I believe since the DNS goes by server, you can't exactly forward it to a shared hosting server. If you have dedicated hosting (expensive as hell so I doubt it), you could probably do this easily.
Doesn't matter whether or not your shared hosting supports python and all that crap, just probably won't work, I tried it, but then again I didn't try hard, so w/e.
Devo
Apr 5th, 2010, 01:21 AM
What issue are you having exactly?
The only common problem I've run into is people end up with seeing the DNS server connections, but the people get 52100/52101 errors (the DNSserver.py not properly directing towards somewhere for the sendpkm.exe to pick it up, or the sendpkm.exe not properly reading where the DNSserver.py is sending it).
I've yet to find a perfect solution, but I'd recommend: A)Disabling firewall both on your modem (for that single PC), and windows firewall if you have it, and running in Administrator mode. Make sure that you have in "Internet Settings" "Public" set for that program, so that people outside your network can connect without a problem.
Well thing is that i dont get an error message
I try and connect, but then it just says it cant conenct and that im gonna get send to the counter, but theres not a message with an error #
I cant disable the router firewall for th whole router or the one PC.
Windows firewall is turned off.
heres a screenie with the sendpkm.exe log
http://img101.imageshack.us/img101/8596/cmdk.jpg
zowayixx
Apr 5th, 2010, 04:13 AM
http://img101.imageshack.us/img101/8596/cmdk.jpg
I'm having this same problem. All ports are open, my firewall on the router is completely off, Windows Firewall is completely off, and he has no hacked Pokemon with him. Any help?
(btw, I solved my other problem stated in reply #155)
AngelSL
Apr 5th, 2010, 04:14 AM
I'm having this same problem. All ports are open, my firewall on the router is completely off, Windows Firewall is completely off, and he has no hacked Pokemon with him. Any help?
(btw, I solved my other problem stated in reply #155)
Firewall doesn't matter, you need to portforward. (unless you DMZ'd your computer)
Portforward TCP&UDP 53 and TCP&UDP 80 to your LAN IP (I suggest setting your lan IP to static (in the DHCP reservation table))
That should fix it
Well thing is that i dont get an error message
I try and connect, but then it just says it cant conenct and that im gonna get send to the counter, but theres not a message with an error #
I cant disable the router firewall for th whole router or the one PC.
Windows firewall is turned off.
heres a screenie with the sendpkm.exe log
http://img101.imageshack.us/img101/8596/cmdk.jpg
That isn't much help. Check if your IP is correct, try using your LAN IP, etc..
-end reply to quote-
I might try to convert this into a PHP script ASP.NET and then PHP (so that you can use it on your webhost). You'll need to figure out how to redirect DNS, though.
Python script won't work there.
zowayixx
Apr 5th, 2010, 05:39 AM
Nevermind, my ISP sucks. It's blocking 53 and 80. Thanks anyway. :/
AngelSL
Apr 5th, 2010, 05:54 AM
I'm having this same problem. All ports are open, my firewall on the router is completely off, Windows Firewall is completely off, and he has no hacked Pokemon with him. Any help?
(btw, I solved my other problem stated in reply #155)
Nevermind, my ISP sucks. It's blocking 53 and 80. Thanks anyway. :/
Vlad posted a PHP script you could use.
http://projectpokemon.org/forums/attachment.php?attachmentid=3930&d=1269817603
Your ISP isn't blocking 53 by the way, your forwarding has some problems.
You could use that script on your webhost (on a subdomain), and have the simple DNS CNAME to that subdomain. Then have your friend set the DNS to you, and he'll get redirected to that script.
Vlad
Apr 5th, 2010, 06:58 AM
File "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\dnsse
rver.py", line 84
except Exception as ex:
^
SyntaxError: invalid syntax
Get this thrown up when I use it.
Odd, hmm... Well basically this happens when it tries to bind the DNS server to port 53, it seems like some other program have taken the port and it's busy so it casts an error. About the syntax error it's odd as "except Exception as ex:" would be triggered when there is an exception and "ex" would be the string value that explains what went wrong. By the way http://www.python.org/ "Quick Links (2.6.5)" 'Windows Installer' -that's what I use, dunno, may be just a version difference that there is a syntax error there and not when I run it. :/
Alright, so I've gotten dnsserver to work and pkmserver to work, but right when my character goes to check the PC/GTS thing, the game starts rapidly flashing blue, and the pkmserver says "python: can't open file 'pkmlib.py': [Errno 2] No such file or directory". Can anyone help with this?
Also, I have all the files in the same directory, if that matters.
The command/executable "python" should be accessible from any directory. It's not up to date (couldn't find one that was) but take a look at the idea of how to set up Python in the "Path" variable, click here (http://www.katsbits.com/htm/tutorials/blender_python_path_setup.htm). I think that would fix the issue.
When it asks me to Enter in the IP of the fake GTS Server, i enter in my IP, and it says "Dns Server started on 0.0.0.0:53" Whats that mean?
I means any IP that leads to the current machine (acting as server) will be accepted by the application, that is all port 53 connections. Note this does not mean that port forwarding can be ignored, only that 127.0.0.1, 192.168.0.100 (internal IP's) and so on, can access the service. Public clients will still be blocked by the router if port forwarding is not done properly.
... And when i connect to the GTS with 75.91.55.18 as my primary DNS. The Signal starts red, goes green, then red and says
I believe this is a port forwarding issue, I myself use DMZ (because I am awesome) so it's basically like my PC is directly connected to the internet -thus I don't need to port forward stuff (don't worry about my security, I got a strong firewall configuration). Basically if you can access the official GTS without problems then you can also use the server(s) I made without a problem. Only issue is if port 53 (for the DNS) is not forwarded but it seems like you managed to as it shows connection queries on the console. When "gamestats2.gs.nintendowifi.net" is redirected to your own IP, the pkmserver.py script should show requests and responses on the console, if not then port 80 is not accessible and you need to port forward it too. Port 80 is the website, port 53 is the DNS server. Those two must be forwarded properly -this is ONLY if you want public access. You can still set the DNS to your local (behind router) IP. Also edit dnsserver.py and look at line 13. You can change "2" (use public IP) to "1" or manually enter your IP. This way you can manage to at least use it yourself without public access but only local access, I mean it's not a big deal if all you want is send stuff to yourself (like most people want). ;)
-----
Most issues people will encounter are port forwarding issues, because I've tested this on a port forwarding "free" environment (all ports open) and communication works fine both from the intranet requests and when using my public IP. When you want a public service you must open ports 53 and 80 for public access, then all DNS requests that are hooked will be visible on the pkmserver.py console as HTTP requests. Basically you run your mini http server (and you can if you like open http://<ip> in your browser to see a neat "Hello world" page for all non NDS users. :P Anyway I hope people work their problems out eventually. We developers do work on the GTS because there are still some small details left undocumented, thus there is no real GTS yet available. Thats why what you see is just some snippets of code made to barely work for specific things (like sending you a pokemon when you connect to the GTS). Expect problems and some errors here and there. ;)
Also since I use pkmlib.py by LordLandon for encoding the pkm files properly it still is limited to party-pkm files and not storage once. Storage files are smaller and the script fails to properly encode those while it works fine for the party once. Yet again some party files may also end up in a blue screen, I believe it's a encoding issue that will be fixed sooner or later.
Arjun - PeeB4UGo
Apr 5th, 2010, 09:51 AM
I'm using the GTS nuker, but whenever I try to access my IP address from my computer, I get an error on the DNS server as seen here (http://stuff.ramp-it.ca/gts-nuker_error.png) (the last message in the window on the left).
Is there any way to get around this?
I'm not port forwarding; I'm using DMZ.
Devo
Apr 5th, 2010, 10:40 AM
+
Firewall doesn't matter, you need to portforward. (unless you DMZ'd your computer)
Portforward TCP&UDP 53 and TCP&UDP 80 to your LAN IP (I suggest setting your lan IP to static (in the DHCP reservation table))
That isn't much help. Check if your IP is correct, try using your LAN IP, etc..
-end reply to quote-
I might try to convert this into a PHP script ASP.NET and then PHP (so that you can use it on your webhost). You'll need to figure out how to redirect DNS, though.
Python script won't work there.
my IP is static, and it that one.
The port are forwarded fine on the routeer, although i dont trust the port 80TCP<.<
Its that i used a portchecker called PFPortchecker(from portforward.com) ports 53 tcp/udp are open and 80 udp is open, but the 80 tcp shows as closed...., but if i use a portchecker online it shows port80 as open Xx
ay suggestions =/ ?
Vlad posted a PHP script you could use.
http://projectpokemon.org/forums/attachment.php?attachmentid=3930&d=1269817603
Your ISP isn't blocking 53 by the way, your forwarding has some problems.
You could use that script on your webhost (on a subdomain), and have the simple DNS CNAME to that subdomain. Then have your friend set the DNS to you, and he'll get redirected to that script.
Would u mind explaining that one with a bit more detail ?
Tyranitar11
Apr 5th, 2010, 10:54 AM
Sorry about this but I have 2 questions
Q1. How do I form a .pkm file. A more detailed guide than the 56 file would be helpful
Q2. I am running python 2.6 (the basic 2.6 not 2.65 or similar) and when I run any of the files in the Sendpkm.zip folder a Black box( it comes up so fast I cant read the box type but it is python.exe) Flicks on but dissapears a milisecond Later.
It wouyld be appreciated if these questions were answered.
Keep up the good work .
Devo
Apr 5th, 2010, 11:14 AM
Sorry about this but I have 2 questions
Q1. How do I form a .pkm file. A more detailed guide than the 56 file would be helpful
Q2. I am running python 2.6 (the basic 2.6 not 2.65 or similar) and when I run any of the files in the Sendpkm.zip folder a Black box( it comes up so fast I cant read the box type but it is python.exe) Flicks on but dissapears a milisecond Later.
It wouyld be appreciated if these questions were answered.
Keep up the good work .
Form a pkm file? You should use pokesav and just save the pkm file to the same folder as the script.
Idk about th 2nd one, i have the 2.6.X that was on the python website and it works for e when i send pokemon to myself.
what OS are you using?
Tyranitar11
Apr 5th, 2010, 01:00 PM
I am running windows xp professional service pack 2
Tyranitar11
Apr 5th, 2010, 01:17 PM
Its fixed Now.
Do I have to type the path to the .pkm file or is there a different way
Devo
Apr 5th, 2010, 01:28 PM
Its fixed Now.
Do I have to type the path to the .pkm file or is there a different way
drag & drop the pkm file to the sendpkm
Lol anyone that can help me with my issue >.<
Tyranitar11
Apr 5th, 2010, 01:58 PM
I get an erorr
this is the last line of it the critical bit
Socket.gaierror: [Errno 11001] getaddrinfo failed
datoneguy
Apr 5th, 2010, 04:20 PM
Interesting, I was unaware of being able to use a CNAME instead of a direct IP.
danhomer
Apr 5th, 2010, 05:26 PM
So, can someone tell me what I have to do to make my own event? I am very knowledged at computers, but everything here is all seperate instructions that stop halfway through. It would be nice if someone would just sum it all up and tell me what to do.
Twitch
Apr 5th, 2010, 07:24 PM
I'm trying to use GTS Nuker, and a Windows message keeps popping up saying that SendPKM.exe has stopped working. Its not giving me any potential fixes, its just telling me that SendPKM.exe stopped working correctly, and it needs to close. Any advice about this? Not sure what is causing it, but I figure I can't be the only person having this problem.
M@T
Apr 5th, 2010, 07:46 PM
Make sure that no other program is binding port 80, like an HTTP server, another instance of SendPKM.exe or the sendpkm.py script.
Twitch
Apr 5th, 2010, 10:15 PM
SendPKM.exe, DNS_Server.exe, and Firefox were the only things open at the time when I was trying to use it. I don't think firefox could cause that, could it? Oh well, I'll keep trying :\
kickhopper
Apr 6th, 2010, 03:02 AM
I've gone through the thread and several programs and scripts have been posted that do similar things. Sendpkm worked for me from the start, so I use that for myself. I do want to send Pokemon to friends though, without having to send it to myself and trade, of course. So would anyone be kind enough to tell me which of the things in this thread, or any other, is the best/most successful way to send pkm files across the internet?
Opodomus
Apr 6th, 2010, 10:22 AM
I registered just to say great work here. This is the kind of thing I would have loved to do in my free time. My brother almost did, but he does this type of thing all day at work and it just burns him out to go packet sniffing more when he gets home.
trance
Apr 6th, 2010, 10:51 AM
I've gone through the thread and several programs and scripts have been posted that do similar things. Sendpkm worked for me from the start, so I use that for myself. I do want to send Pokemon to friends though, without having to send it to myself and trade, of course. So would anyone be kind enough to tell me which of the things in this thread, or any other, is the best/most successful way to send pkm files across the internet?
A VPN like Hamachi (https://secure.logmein.com/products/hamachi2/)... maybe? But that would require some sort of sharing/bridging on your pals' side, to connect their wireless to the VPN network, which I don't know much about.
datoneguy
Apr 6th, 2010, 08:09 PM
Anyone else having an error where instead of attempting to connect to gamestats2.gs.nintendowifi.net, their DS tries to connect to conntest.nintendowifi.net ? Using GTS.
LordLandon
Apr 7th, 2010, 11:09 AM
That's not an error. Besides gamestats2, the DS connects to conntest, and nas. (The former to test that it has interweb, and the latter to do some sekrit magic voodoo that gives it a PID if it doesn't have one)
datoneguy
Apr 7th, 2010, 11:39 AM
Well, mine gets stuck on conntest, and it won't pass it.
I'm trying to see if my retail cart will work but I'm still onmy way to goldenrod. My flashcart always gets stuck on conntest though connecting to ANYONE's DNS, but it connects to the normal GTS fine.
Other people also connect to my DNS fine, man so weird. D:
LordLandon
Apr 7th, 2010, 11:55 AM
If the DS can't access conntest, whatever you've got rigged up is terribly borked. (=
Elr
Apr 7th, 2010, 02:31 PM
Maybe we can make some windows application that can work as the official GTS?
datoneguy
Apr 7th, 2010, 06:05 PM
That's essentially what they're doing. These are windows applications, just download PYTHON to be able to use the .py scripts, and for the .exe's, just run them. They dont have GUIs, but they don't need them.
Elr
Apr 7th, 2010, 06:52 PM
I know how to use python scripts. I just love these beautiful bells and whistles :lol:.
FarePak
Apr 7th, 2010, 11:58 PM
Just curious but is it possible to run this on a different port?
I run apache for testing on port 80 thus not able to use this on port 80 is there any way that this could be changed although I'm able to run this on another computer but it'll be much easier running this on the same computer as the one running apache and such.
zowayixx
Apr 8th, 2010, 12:43 AM
I tried doing this on my site, and uploaded all the files I *think* I was supposed to upload, but when I opened dnsserver.py from my computer, it got to here:
http://i41.tinypic.com/104ey6s.png
And then disconnected me from Wi-Fi. Any help on this issue?
Also, here are the files I uploaded to the server:
http://i43.tinypic.com/2luz790.png
In case it helps.
EDIT: I didn't upload cgi-bin, that was there when I made the subdomain. Also, indecks.php is the old index.php, which serves virtually no purpose besides being a backup.
datoneguy
Apr 8th, 2010, 02:30 AM
I never could get the index.php to work properly even when my DNS server was properly forwarding so I can't say for sure, but it probably needs quite a bit of tweakin'
AngelSL
Apr 8th, 2010, 02:53 AM
I tried doing this on my site, and uploaded all the files I *think* I was supposed to upload, but when I opened dnsserver.py from my computer, it got to here:
http://i41.tinypic.com/104ey6s.png
And then disconnected me from Wi-Fi. Any help on this issue?
Also, here are the files I uploaded to the server:
http://i43.tinypic.com/2luz790.png
In case it helps.
EDIT: I didn't upload cgi-bin, that was there when I made the subdomain. Also, indecks.php is the old index.php, which serves virtually no purpose besides being a backup.
I think I didn't do the CNAME properly or something.
Or the DS just doesn't support CNAMEs.
Try this: open dnsserver.py in WORDPAD.
Find these lines: (line 57 & 58)
packet+="\x00\x05\x00\x01\x00\x00\x00\x3c\x00\x16"
packet+="\x03gts\x0Challoforigin\x03com\x00"
Replace with
packet+="\x00\x05\x00\x01\x00\x00\x00\x3c\x00\x18"
packet+="\x03gts\x0Challoforigin\x03com\x01.\x00"
Do NOT mess up the spaces. There should be 6 spaces behind the lines. Or else python will complain.
FarePak
Apr 8th, 2010, 03:00 AM
Just curious but is it possible to run this on a different port?
I run apache for testing on port 80 thus not able to use this on port 80 is there any way that this could be changed although I'm able to run this on another computer but it'll be much easier running this on the same computer as the one running apache and such.
I've changed the port in the "pokehaxlib.py" script to a random port (7771) and forwarded the port and everything appears to be working seeing as its able to connect but after waiting 30 seconds-1 minute it disconnects without an error code.
It says "You were disconnected from the GTS. Returning to the reception counter." After that, nothing happens.
If I try a port such as 32 I get the "52100" error but with the 7771 port it just disconnects me straight after connecting for a while.
Vlad
Apr 8th, 2010, 04:58 AM
...
The issue is that it must be a IP it directs to and not a domain.
Also you need to configure the .htaccess (RewriteBase value) then edit the index.php on lines 20, probably 21 ($servwww and $servroot). You almost need to echo the variables and see what they are to know what's wrong with them (or if they are configured right). The idea was to fetch the name of the request URI and extract the original file requested then $filename will contain the file requested so the if-part can handle the request properly. I know it's messy, haven't had time to implement a real script mostly because I have some math stuff to deal with (university) before I can sit down and work on the GTS site.
I hope the host can handle IP's, problem is that I don't really know how to handle domain requests, just fetching the domains IP gives 207.182.149.248 and when you http:// it the host site is shown instead of yours (since they run multiple sites on one machine and use the domain and sub-domains to distinguish them). I'll look into a solution but for now the current DNS server is not domain friendly. D:
I've changed the port in the "pokehaxlib.py" script to a random port (7771) and forwarded the port and everything appears to be working seeing as its able to connect but after waiting 30 seconds-1 minute it disconnects without an error code.
It says "You were disconnected from the GTS. Returning to the reception counter." After that, nothing happens.
If I try a port such as 32 I get the "52100" error but with the 7771 port it just disconnects me straight after connecting for a while.
The NDS tries to connect on port 80 but if it's busy or someone else uses it at home then they need to put theirs to pause or your server won't be reachable. I haven't tried forwarding but if you use 7771 then on the router forward it so that when people type http://<your-ip>:80 they end up at http://<your-ip>:7771 otherwise it won't work, don't think the game tries other ports than 80.
Vlad
Apr 8th, 2010, 05:01 AM
I've changed the port in the "pokehaxlib.py" script to a random port (7771) and forwarded the port and everything appears to be working seeing as its able to connect but after waiting 30 seconds-1 minute it disconnects without an error code.
It says "You were disconnected from the GTS. Returning to the reception counter." After that, nothing happens.
If I try a port such as 32 I get the "52100" error but with the 7771 port it just disconnects me straight after connecting for a while.
The NDS tries to connect on port 80 but if it's busy or someone else uses it at home then they need to put theirs to pause or your server won't be reachable. I haven't tried forwarding but if you use 7771 then on the router forward it so that when people type http://<your-ip>:80 they end up at http://<your-ip>:7771 otherwise it won't work, don't think the game tries other ports than 80.
FarePak
Apr 8th, 2010, 05:52 AM
Hm, I guess I'll just get my laptop running when I want to use this. Strange that it uses the same port as HTTP. :/
M@T
Apr 8th, 2010, 06:26 AM
Strange that it uses the same port as HTTP. :/
That's because it IS HTTP. :rolleyes:
FarePak
Apr 8th, 2010, 09:25 AM
Meant that its strange the whole thing was using HTTP. Thought it was a separate server kinda thing at first.
warmo161
Apr 8th, 2010, 09:35 AM
could this idea be made using somthing else?
i mean, i have used python for a bit for basic stuff, but what about somebody who doesn't have the program? could this be made into a windows program, with some working this could be better and may fix the 127.0.0.1 problem, i'm having :(
Vlad
Apr 8th, 2010, 10:09 AM
This is how Pokemon accesses GTS:
1. conntest server (any response is sufficient)
2. SSL server that gives the NDS a "pid" (personal idendification)
3. the HTTP server (where pid is used to generate hashes, really weak security...)
So far step #1 and #3 can be manipulated and the NDS can be tricked but the SSL part is much harder and so far we only use a DNS server to simply let the rest of the communication go as default but only hook the HTTP requests as thats actually the GTS itself, thus we modify data send to the client. This is how NDS connects to the GTS In a nut shell. Also I believe Mystery Gifts connect to a SSL server (not the one we connect when using GTS, but still SSL I believe) thus it's not easy to emulate that. SSL is supposed to be secure, thus it's not easy to hack and emulate it -the client will deny the server if not everything is as it should be.
What we can do is distribute key items via Pokemon (as "held" items I suppose), hehe. Have not tried but perhaps it could work, if not meh then isn't a custom GTS server enough? D:
sieghart
Apr 8th, 2010, 11:11 AM
So I've just about gone through all of this and am having issues with setting this up correctly, Firstly I have NO CLUE what files to use because everybody keeps posting new ones or edited ones and etc... WHICH ONE IS CORRECT!!!, I'm trying to set up a distributive center to send pokemon to other people not on my network(mainly friends). With my current SendPKM file, It prompts me to enter a specific dotted quad in my DNS settings on my DS, how do I configure this program to send over the internet to other people on different networks. Could someone who got it working just maybe post a step by step tutorial from start to end(sorry if it would be alot of work to type out) on how to get the DNS server up and running online.
Thanks,
Sieghart
zowayixx
Apr 8th, 2010, 11:19 AM
...
Alright, so if I upload the files to my site's front page, it should have a better chance at working, right?
AngelSL
Apr 8th, 2010, 06:46 PM
Alright, so if I upload the files to my site's front page, it should have a better chance at working, right?
No, problem is the DS doesn't support CNAMEs probably. Did you do the fix I told you to try?
If this doesn't work, putting it at your frontpage won't either as you don't have a dedicated IP.. (shared IP using virtual hosts)
@Vlad I modified his script to return a CNAME instead of an IP. Theoretically it should work.
What we can do is distribute key items via Pokemon (as "held" items I suppose), hehe. Have not tried but perhaps it could work, if not meh then isn't a custom GTS server enough? D:
Won't work, you also need the event flag set, not just the Key Item. (which is why there is a special wonder card type for each of the event items in DPPHGSS, and not just a 'Item')
zowayixx
Apr 8th, 2010, 09:22 PM
Did you do the fix I told you to try?
Aw crap, you must have modified the one I had, because I downloaded another dnsserver.py because it wouldn't work, so I reverted the changes I made, and it still didn't work. I can't find what you told me to look for now. =/
lizzledpink
Apr 8th, 2010, 11:00 PM
Based on the findings here I've created a quick, very basic guide, readable by pretty much anybody who'd bother to be on this website, about how to use the GTS servers to download your own customized and created pokemon (.pkm files) to your Pokemon games. Check it out! http://projectpokemon.org/forums/showthread.php?8325-GTS-Servers-and-%28Valid%29-Pokemon-Creation-for-Dummies&p=73435&viewfull=1#post73435
BeansNRice
Apr 8th, 2010, 11:45 PM
wait do i have to restart the game or will the program do it cuz i got the ERROR message for my SS
zowayixx
Apr 9th, 2010, 12:11 AM
You have to manually restart the game, then the Pokemon will either be in your party or your Storage.
BeansNRice
Apr 9th, 2010, 12:19 AM
i tried that and it didnt work after i got the error 51200
BeansNRice
Apr 9th, 2010, 12:25 AM
oh snap never mind it some how worked when re-entered it
sieghart
Apr 9th, 2010, 02:39 PM
So anyone have news of getting this to work through the internet so I can create events for my friends and stuff without me having to trade them or them having to come to my house? =<, I know its possible because of a site I saw recently that did it.(currently dont have the link to it as I am not at home)
FarePak
Apr 9th, 2010, 02:48 PM
You will need to forward port 80 on your router then tell your friends to set their DNS on their DS' as your external IP. You can get your external IP from whatismyip.com. After that, you can get your friends to connect to it via GTS.
sieghart
Apr 9th, 2010, 02:52 PM
Oh sweet, thanks. What about keeping it open so all my friend can do it though without me having to reopen sendpkm =S, because I'll be going to a friends house this weekend and there's like three of them who are going to want it, and my brother has my ds atm.
FarePak
Apr 9th, 2010, 03:03 PM
The programs code would need to be edited for that to happen. Unless you find someone willing to do this for you then you would need to re-open it each time.
sieghart
Apr 9th, 2010, 03:05 PM
hmm alright I'll have to look into that then, thank you for the help though, when I get home I'll give it a shot.
Oh um I guess one last question. Which file would need to be edited for me to be able to have it stay open til its awarded more than one. I'll do that myself and learn how, just need to know which ones.
Thanks in advance.
FarePak
Apr 9th, 2010, 03:25 PM
Not entirely sure as I don't know much about it myself but its most likely the pokehaxlib.py and sendpkm.py
M@T
Apr 9th, 2010, 04:14 PM
My program coded in VB.NET sends the .pkm at each request it receives until it is closed, you can find it here (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=71061&viewfull=1#post71061) if you want.
I also included a DNS server, you just input your external IP address, you also forward your UDP 53 port and you're done, your friends don't even need to launch a DNS server on their computers, they only have to put your IP in their DS settings.
Vlad's PHP server is awesome too, but it needs Apache being installed and some modifications to fit your configuration.
kickhopper
Apr 9th, 2010, 05:42 PM
My program coded in VB.NET sends the .pkm at each request it receives until it is closed, you can find it here (http://projectpokemon.org/forums/showthread.php?780-GTS-website-research&p=71061&viewfull=1#post71061) if you want.
I also included a DNS server, you just input your external IP address, you also forward your UDP 53 port and you're done, your friends don't even need to launch a DNS server on their computers, they only have to put your IP in their DS settings.
Vlad's PHP server is awesome too, but it needs Apache being installed and some modifications to fit your configuration.
Alright I cannot seem to get this to work for me, not sure exactly what the problem is. I forwarded port 53 properly but when I start the dns server it says, "DNS server started on 0.0.0.0:53" Any clue how to fix this? Also could you tell me, step by step, what exactly I need to do? First I start up sendpkm with a pkm file, then the DNS server? Any help would be appreciated.
M@T
Apr 9th, 2010, 06:43 PM
"DNS server started on 0.0.0.0:53" only means that the socket was successfully bound on the port 53 of your computer, this is NOT the equivalent of sendpkm.py's "Please set your DS's DNS server to 192.168.1.7" (for example).
This was more for debugging purpose actually.
So, step by step, you must :
- Know your external IP address, go here (http://www.whatismyip.com/) to have it for example
- Launch DNS_Server.exe, and input that IP when asked
- You are done with the DNS part, now start SendPKM.exe with a 236-byte .pkm or .bin file (you can drag and drop it on the .exe, that's much easier). It should say that it is ready and waiting for a connexion.
That's all.
If both UDP port 53 and TCP port 80 are forwarded and reachable from the Internet, then any person who sets your external IP as his DS's primary DNS server and connects to the GTS should receive the .pkm you chose.
But remember that it may not work when connecting with a DS in the same network, in that case you have to replace your external IP by your computer's private IP in both DNS_Server.exe and your DS's DNS settings.
kickhopper
Apr 9th, 2010, 07:16 PM
Ah yes, now that I look at the code I can see different colors used for success/fail. The printout just made it seem like a fail since one of the programs posted here had that printout as an error.
And yes, I was using my DS on the same network to test it out. So that would explain why it didn't work for me. Guess I'll have to have someone else test it for me. Thanks for the fast help.
Pine
Apr 10th, 2010, 02:07 AM
"DNS server started on 0.0.0.0:53" only means that the socket was successfully bound on the port 53 of your computer, this is NOT the equivalent of sendpkm.py's "Please set your DS's DNS server to 192.168.1.7" (for example).
This was more for debugging purpose actually.
So, step by step, you must :
- Know your external IP address, go here (http://www.whatismyip.com/) to have it for example
- Launch DNS_Server.exe, and input that IP when asked
- You are done with the DNS part, now start SendPKM.exe with a 236-byte .pkm or .bin file (you can drag and drop it on the .exe, that's much easier). It should say that it is ready and waiting for a connexion.
That's all.
If both UDP port 53 and TCP port 80 are forwarded and reachable from the Internet, then any person who sets your external IP as his DS's primary DNS server and connects to the GTS should receive the .pkm you chose.
But remember that it may not work when connecting with a DS in the same network, in that case you have to replace your external IP by your computer's private IP in both DNS_Server.exe and your DS's DNS settings.
M@T I have tested this method with a local Network, meaning connecting my DS to the same network as my PC and I have succeded. I believe most problems are because people don't know their Private IP.
On most router's settings (if you have access to them, which you should since it's your HOME NET) you can see a list of the DHCP clients, see what's your PC in there and use that number.
Anyway, as I was saying, I succeeded. I actually expected it to kick me off the connection (but to still get the Poke), like the fan GTS site does/did. But no, I actually saw the Pokemon arrival and then was left inside the GTS and I had to disconnect like I normally would.
I don't know if that's what should happen but I'm just letting you know. All else went smooth. Thanks a lot, bro.
SwiftStratos
Apr 10th, 2010, 03:56 AM
"DNS server started on 0.0.0.0:53" only means that the socket was successfully bound on the port 53 of your computer, this is NOT the equivalent of sendpkm.py's "Please set your DS's DNS server to 192.168.1.7" (for example).
This was more for debugging purpose actually.
So, step by step, you must :
- Know your external IP address, go here (http://www.whatismyip.com/) to have it for example
- Launch DNS_Server.exe, and input that IP when asked
- You are done with the DNS part, now start SendPKM.exe with a 236-byte .pkm or .bin file (you can drag and drop it on the .exe, that's much easier). It should say that it is ready and waiting for a connexion.
That's all.
If both UDP port 53 and TCP port 80 are forwarded and reachable from the Internet, then any person who sets your external IP as his DS's primary DNS server and connects to the GTS should receive the .pkm you chose.
But remember that it may not work when connecting with a DS in the same network, in that case you have to replace your external IP by your computer's private IP in both DNS_Server.exe and your DS's DNS settings.
Hey, I have followed your steps but I cannot seem to get the TCP port 80 forwarded, or at least I think I didn't, as it did not show up when I entered my external IP address (found in the link you provided), just the port 53 part.I'm obviously trying to get the distribution to work for those not on my network. Any help is appreciated, thanks !
Plus:
-I have followed your directions, I get the "Waiting for connexion.." on sendpkm, and as I said, I only see the "DNS server started on 0.0.0.0:53" after I put my external IP.
Distribution does not seem to be working for a friend not on my network.
M@T
Apr 10th, 2010, 04:29 AM
Anyway, as I was saying, I succeeded. I actually expected it to kick me off the connection (but to still get the Poke), like the fan GTS site does/did. But no, I actually saw the Pokemon arrival and then was left inside the GTS and I had to disconnect like I normally would.
I don't know if that's what should happen but I'm just letting you know..
You're lucky then, because most of the time, I get a BSOD when trying with Platinum, Heart Gold or Soul Silver, with every unofficial GTS. :tongue:
Diamond and Pearl work properly though.
Anyway, thanks for the feedback. :wink:
Hey, I have followed your steps but I cannot seem to get the TCP port 80 forwarded, or at least I think I didn't, as it did not show up when I entered my external IP address (found in the link you provided), just the port 53 part.I'm obviously trying to get the distribution to work for those not on my network. Any help is appreciated, thanks !
To forward your ports you can use that website to help you : http://portforward.com/.
Then, to see whether or not it was successful, test it here when SendPKM.exe is listening for connections : http://ping.eu/port-chk/ (only work for TCP ports, so you can't test your DNS UDP-53 port).
Vlad
Apr 10th, 2010, 08:32 AM
Hmm, I had this MW2 port check tool to help figure out if the ports are open or not... so what I did is modify the script and compile one for the Python scripts. It simply checks TCP80 and UDP53 and that they are properly open to the public. The script I made is in AutoIT3 so the ZIP includes the sources and a compiled executable. Note that AutoIT3 does show up as viruses on some antivirus programs but that's life, compile it on your own then. ;)
Maybe it helps with the ports issue, at least you will know if the ports are configured properly...
Note: ports 80 and 53 are special, the tool may even say they are open if they are not properly forwarded. I believe it's just something to do with routers or how the OS handles requests. Even if I strictly request the connectivity to go trough a specific IP (i.e. out trough the router then back in) it does not always do that -not on all OS and routers. Would be neat if we could have a port check to validate that ports are properly forwarded and such but I am not really much of a networking guy, hehe. ;p
andreqms
Apr 10th, 2010, 08:58 AM
Hi! First, I want to thank LordLandon and all guys that worked to make the 'sendpkm'! I used that to get local event Pokémon that I could not get like Jirachi, Arceus, etc... Thank you very much! =D
I am here to ask if someone know how to use it by getting a PDC file (Wonder Card)! I want that to use Key Itens events! I askes that and people from other web sites said that Project Pokémon is working in that.
Thank you againd, and sorry about my English! Bye!
BeansNRice
Apr 10th, 2010, 09:27 AM
I tried doing this on a separate computer than last time when it worked but now it sends the .pkm but when i try to connect there's no Error Code just Unable to connect to GTS
datoneguy
Apr 10th, 2010, 12:41 PM
Just a quick question here for Vlad, as I've been getting issues recently.
For some reason with the newer DNS server (the one that just toggles 1/2 for internal/external IP)
Whenever I'm connecting from MY DS I need to set it to 1 for internal IP, and whhenever I want others to connect I need to set it to 2 for external IP, if I don't do this, it just doesn't work, anything up with this?
GuerrillaDawg
Apr 10th, 2010, 06:29 PM
So , basically I can download ANY pokemon's .pkmn file , then edit it in Pokesav and transfer it to my DS using this program ?
Arjun - PeeB4UGo
Apr 10th, 2010, 06:50 PM
So last week GTS_Nuker was working just fine, but now, I can only start the DNS server:
Whenever I open SendPKM.exe by dragging and dropping the *.pkm file onto the exe file, it opens, and then crashes.
However, when I just double-click on the exe file, and I'm prompted to enter the path to a PKM file, it works fine, until the "encoding" part.
Any ideas?
EDIT:
When I cd to the directory and run the exe from command prompt, it get this error:
http://stuff.ramp-it.ca/cmdsendpkm.png
SwiftStratos
Apr 10th, 2010, 06:59 PM
What should my starting/ending ports be? I only want to distribute pokemon to friends over the GTS.
Whenever I click apply, it says theres a problem with another server.
Arjun - PeeB4UGo
Apr 10th, 2010, 07:35 PM
So last week GTS_Nuker was working just fine, but now, I can only start the DNS server:
Whenever I open SendPKM.exe by dragging and dropping the *.pkm file onto the exe file, it opens, and then crashes.
However, when I just double-click on the exe file, and I'm prompted to enter the path to a PKM file, it works fine, until the "encoding" part.
Any ideas?
EDIT:
When I cd to the directory and run the exe from command prompt, it get this error:
http://stuff.ramp-it.ca/cmdsendpkm.png
I figured out this problem: If you have IIS running, then the program will fail to run correctly.
I had installed IIS unaware of that, thus causing the problem.
TheRevolution1
Apr 10th, 2010, 08:12 PM
Just registered here to say thanks for the awesome program!
I used the GTS_Nuker to host some event pokemon for some forums and people kept reposting it so it spread like crazy!
It all worked great except the DNS server stopped working after i was getting 100+ connections a minute.
I must have given out at least 50,000 pokemon(no joke).
So thanks again guys =)
datoneguy
Apr 10th, 2010, 09:37 PM
I figured out this problem: If you have IIS running, then the program will fail to run correctly.
I had installed IIS unaware of that, thus causing the problem.
If ANYTHING is running on port 80 (Typically an HTTP server) like IIS or Apache GTS_Nuker will not work.
sieghart
Apr 10th, 2010, 10:36 PM
"DNS server started on 0.0.0.0:53" only means that the socket was successfully bound on the port 53 of your computer, this is NOT the equivalent of sendpkm.py's "Please set your DS's DNS server to 192.168.1.7" (for example).
This was more for debugging purpose actually.
So, step by step, you must :
- Know your external IP address, go here (http://www.whatismyip.com/) to have it for example
- Launch DNS_Server.exe, and input that IP when asked
- You are done with the DNS part, now start SendPKM.exe with a 236-byte .pkm or .bin file (you can drag and drop it on the .exe, that's much easier). It should say that it is ready and waiting for a connexion.
That's all.
If both UDP port 53 and TCP port 80 are forwarded and reachable from the Internet, then any person who sets your external IP as his DS's primary DNS server and connects to the GTS should receive the .pkm you chose.
But remember that it may not work when connecting with a DS in the same network, in that case you have to replace your external IP by your computer's private IP in both DNS_Server.exe and your DS's DNS settings.
tysm for that, sux tho cuz i cant forward my ports since i have no access to the router, i live in a hotel and run off their internet =S
Devo
Apr 10th, 2010, 10:43 PM
"DNS server started on 0.0.0.0:53" only means that the socket was successfully bound on the port 53 of your computer, this is NOT the equivalent of sendpkm.py's "Please set your DS's DNS server to 192.168.1.7" (for example).
This was more for debugging purpose actually.
So, step by step, you must :
- Know your external IP address, go here (http://www.whatismyip.com/) to have it for example
- Launch DNS_Server.exe, and input that IP when asked
- You are done with the DNS part, now start SendPKM.exe with a 236-byte .pkm or .bin file (you can drag and drop it on the .exe, that's much easier). It should say that it is ready and waiting for a connexion.
Still not working for me....
I forwarded both ports, i tested them and they seem to be open. I sued 2 different types of port checkers =(
Any suggestions, i been trying for over a week to get this working T.T
When the person tries to connect on the GTS they get a "you have been disconencted from the GTS,you will be taken to the counter"
http://img23.imageshack.us/img23/8250/test3yo.jpg
http://img46.imageshack.us/img46/7430/test4n.jpg
Vlad
Apr 11th, 2010, 06:20 AM
For some reason with the newer DNS server (the one that just toggles 1/2 for internal/external IP)
Whenever I'm connecting from MY DS I need to set it to 1 for internal IP, and whhenever I want others to connect I need to set it to 2 for external IP, if I don't do this, it just doesn't work, anything up with this?
That's only where to redirect the original requests to. If you are going to host the webserver locally behind the router, then local IP is enough (the DNS server IP is then the local IP -192.168.0.X or something and all at your home can access it). The public IP will work but you need to properly fix port 80 forwarding to the PC running the webserver (package is in two parts, DNS server and "web" server, also no other webservers must run at home or there will be problems). If you use external IP then make sure you can access the server using http://<yourexternalip>/ -if you get 404 then ports are not configured (you can try using another device as well) but if it works then it should work. DNS runs on 53 UDP I believe, it must be open too for the DNS to work (but I assume it already does for you).
Also if you like "dual boot" you can set the primary DNS on the NintendoDS to your IP (either public or local) then the second to your routers IP (because it also has a DNS) so even if you shutdown your server you can still access the official GTS since it will use the second DNS when the first is unavailable (just a tip).
datoneguy
Apr 11th, 2010, 04:32 PM
Iunno I guess the only problem I had with all of that was I had to put it down if I wanted one.
It seems most of this was an issue to deal with my modem and my DS, it's all fixed now and everything works fine. :]
Soshite
Apr 11th, 2010, 05:44 PM
Okay, make that Windows 7, then. I've had to use the built-in XP virtual machine to use the USB connector. LordLandon's script still works there.
If you wouldn't mind explaining, what were the steps you did to do that? Would both the DNS changing and the Python script be ran inside XP Mode's virtual machine, or would the DNS need to be changed before XP Mode got booted up?
M@T
Apr 12th, 2010, 06:53 AM
Just registered here to say thanks for the awesome program!
I used the GTS_Nuker to host some event pokemon for some forums and people kept reposting it so it spread like crazy!
It all worked great except the DNS server stopped working after i was getting 100+ connections a minute.
I must have given out at least 50,000 pokemon(no joke).
So thanks again guys =)
Wow, very impressive ! :O
I'm sorry for the DNS server, it is not really made to handle a big number of requests in a short time...
The best thing to do would be to make it working with threads, but because of UDP protocol structure, it's not as easy as TCP. :\
Still not working for me....
I forwarded both ports, i tested them and they seem to be open. I sued 2 different types of port checkers =(
Any suggestions, i been trying for over a week to get this working T.T
When the person tries to connect on the GTS they get a "you have been disconencted from the GTS,you will be taken to the counter"
http://img23.imageshack.us/img23/8250/test3yo.jpg
http://img46.imageshack.us/img46/7430/test4n.jpg
The DNS port seems to be forwarded correctly, the problem comes from HTTP 80 port.
When you use a port checker while SendPKM.exe is running, it should receive a wrong request and show an error, like that :
http://www.plixup.com/pics_core/12710691145706GTS.png
If no error is shown, then that's not your computer that receives the HTTP requests, dunno what it could be (maybe your router).
Devo
Apr 12th, 2010, 12:15 PM
Wow, very impressive ! :O
I'm sorry for the DNS server, it is not really made to handle a big number of requests in a short time...
The best thing to do would be to make it working with threads, but because of UDP protocol structure, it's not as easy as TCP. :\
The DNS port seems to be forwarded correctly, the problem comes from HTTP 80 port.
When you use a port checker while SendPKM.exe is running, it should receive a wrong request and show an error, like that :
http://www.plixup.com/pics_core/12710691145706GTS.png
If no error is shown, then that's not your computer that receives the HTTP requests, dunno what it could be (maybe your router).
So no idea of what I could do then =/ ?
vince220
Apr 12th, 2010, 07:15 PM
Does this method only work with PKM files or can it also send files for Wonder Cards?
zowayixx
Apr 12th, 2010, 08:05 PM
I seem to be having a problem with my dnsserver.py. It gives me an error (which I had to screenshot very quickly, as it disappeared upon opening), and shows that this is incorrect:
packet+="\x03gts\x0Challoforigin\x03com\x00"str.join("",map(lambda x: chr(int(x)), "gts.halloforigin.com".split(".")))
Any help on this one?
Vlad
Apr 13th, 2010, 08:09 AM
zowayixx: I've tried to fix it by making the packet differ between IP and domain names and so far the dnsserver.py is like this: http://pastey.net/135213
Problem is that the packet when it's a domain is not yet working properly, I did look at a example here http://forum.codecall.net/tutorials/7298-dns-hacking.html#post38807 and tried to find out how the CNAME packets look like and implemented it -but it didn't work, I didn't manage to figure out what so I post the source here so other Python masters can take a shot at it -if they feel like doing so. :P
Once it's fixed it should handle both IP redirections and domain names, just like what you are trying to do. :)
AngelSL
Apr 13th, 2010, 09:41 AM
I seem to be having a problem with my dnsserver.py. It gives me an error (which I had to screenshot very quickly, as it disappeared upon opening), and shows that this is incorrect:
packet+="\x03gts\x0Challoforigin\x03com\x00"str.join("",map(lambda x: chr(int(x)), "gts.halloforigin.com".split(".")))
Any help on this one?
str.join was supposed to be commented out.
Comment it out by appending a #
Pine
Apr 13th, 2010, 02:25 PM
zowayixx: I've tried to fix it by making the packet differ between IP and domain names and so far the dnsserver.py is like this: http://pastey.net/135213
Problem is that the packet when it's a domain is not yet working properly, I did look at a example here http://forum.codecall.net/tutorials/7298-dns-hacking.html#post38807 and tried to find out how the CNAME packets look like and implemented it -but it didn't work, I didn't manage to figure out what so I post the source here so other Python masters can take a shot at it -if they feel like doing so. :P
Once it's fixed it should handle both IP redirections and domain names, just like what you are trying to do. :)
Once it's kind of fixed, or at least working. Is there any plans to make a plain PHP version of this so website/domain-based services can use this without Python?
Vlad
Apr 13th, 2010, 04:03 PM
Pine: DNS must be in some language (or compiled as EXE at least). The website can be in what ever you like, including PHP (as long the HTTP protocols are there :P)
chinedu11
Apr 13th, 2010, 09:25 PM
Does this work on mac?
zowayixx
Apr 13th, 2010, 09:56 PM
zowayixx: I've tried to fix it by making the packet differ between IP and domain names and so far the dnsserver.py is like this: http://pastey.net/135213
...
Once it's fixed it should handle both IP redirections and domain names, just like what you are trying to do. :)
Alright, so I replaced "2" with "gts.halloforigin.com", but I'm getting the same error, and when I leave it as "2", it gives me a target machine refused connection error. Does my webhost just suck, or am I still doing something wrong? =/
datoneguy
Apr 14th, 2010, 04:18 AM
Okay, here's the thing.
Replacing 2 with gts.halloforigin.com (Your domain) isn't working at the moment because it can only be redirected by a CNAME, your domain doesn't have it's own IP (The only thing that the dnsserver.py takes at the moment).
You can either:
A)Talk to your host to get a second IP, my host offers this for 4 dollars a month, maybe yours offers it too
B)Wait until CNAME's are working.
As for the "2", that would mean that it simply redirects it to your WAN IP (The IP you give out to others to connect to you), if this is not forwarded from your router, your router is refusing it, otherwise if it is, your computer's firewall is refusing it. Check to make sure it's properly forwarded and that your sendpkm script is up.
Vlad
Apr 14th, 2010, 07:47 AM
zowayixx: hehe, you skipped right to the ending, I also said "Problem is that the packet when it's a domain is not yet working properly (...)" :D I am not good with DNS packets so I need slight help making the CNAME version work, so far what I implemented didn't fix the issue with redirecting to domains.
About the "1" and "2" it's just implemented functions that will replace "1" with the local IP and "2" with the public IP (by connecting to a public website and reading what your actual IP is). Alternatively you can enter a IP "X.X.X.X" and that works, but domains do not yet work -I'll let you know and update the original post (link on the first post in this thread) as soon it's working properly. ;)
Also forwarding is really unique for every router and user, knowing you need to properly forward TCP ports 80 and 53 to your machine should be enough and would fix any connectivity issues -only if you do it right. Only way to make sure is to use the manual or get one from your router manufacturer site. There are also sites to help forward like http://portforward.com
I know I repeat both myself and what others have said about port forwarding but don't feel like there is enough emphasis on it. :P
(If the host can give you a second IP -that leads directly to your site, that would be one way to work around this issue. This does not mean domains won't be supported, just not right now.)
*Edit*
Btw made this (for fun) http://ziuo.net/portforward :P
Powered by vBulletin™ Version 4.0.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.