Jump to content

M@T

Member
  • Posts

    344
  • Joined

  • Last visited

Posts posted by M@T

  1. Hi M@T, are you able to make a GTS Server that is loggable like the DNS Server above? Thanks.

    Yes, what do you want to log exactly ?

    Every HTML request/response, with the complete URL and IP of the client ?

    I can give people using my External Ip Random pokemon but I want to Give my self (people in my house) Random pokemon too.

    Instead of putting your external IP in the DNS server, use your internal one.

  2. M@T would it be possible to add the feature of depositing pokemon by IP (seperate folders per IP)? Just thought it'd be a neat feature :P

    My new GTS server works with the IDs of the games, which is better than IP (if you have a dynamic IP, you wouldn't be able to take your Pokémon back when it changes for example).

    I can do what you say with IDs, and write in a file which IP(s) corresponds to each ID...

    Or if you really want it, one folder per IP, but dynamic IPs might make it a bit confusing.

    My friend noticed a problem, like with the pkmsend each time he D/C's and reconnects, it wont allow him to. Except instead of the server shutting down, it just kicks him out to the title screen, and the server is still active?

    I don't have this problem when connecting from my local network, but unfortunately I can't test it from the Internet.

    Could you copy/paste the entire DNS and GTS logs when he connects to the GTS, then disconnects and reconnects ?

    Did you have this problem with my old DNS server too ?

    Python. Sendpkmn.py

    And you say that it is possible with external IPs, but not with your internal one ?

    That's odd, or I don't understand your previous post...

  3. Thank you codemonkey85.

    I finished the new version of my DNS server, it includes some automation now.

    I added several command-line options, described with "/?" :

    Usage : DNS_Server [public_IP] [/local:<local_IP>] [/dns:<DNS_IP>] [/auto]
                      [/localonly | /nolocal] [/log]
    
     public_IP     Public (external) IP address to use.
                   Must be a valid IP address (e.g. 123.45.67.89).
                   This parameter is ignored if /localonly is specified.
     local_IP      Local (internal, private) IP address to use.
                   Must be a valid IP address (e.g. 192.168.1.2).
                   This parameter is ignored if /nolocal is specified.
     DNS_IP        IP address of the real DNS server used to perform DNS queries.
                   The default value can be changed in 'DNS_Server.exe.config'.
     /auto         If this flag is set, the program will try and find both public
                   and private IPs automatically.
                   If, for any reason, one or both of the operations failed,
                   you would be prompted to give the missing IP address(es).
                   This option enables automatic public/private IP switching.
                   If used with /localonly, the program won't try and find a
                   public IP.
                   Similarly, with /nolocal, only the public IP will be fetched.
     /localonly    When used, this parameter will make the program use only the
                   internal IP, and disables autoswitching between public and
                   private IPs.
     /nolocal      The opposite of /localonly : only the public IP will be used.
     /log          If set, the program will log every request it receives and what
                   it sends to the client, including raw DNS-queries packets.
     /?, --help    Shows this help screen ('?', '-h' and '-?' also work).
    
    Every parameter is case-insensitive, and can be set using prefixes '/', '-' and
    '--' (e.g. '-lOcAl:192.168.1.2', '--DNS:8.8.8.8', '-Auto', '/LOG', etc.).

    (I included a .bat file to run it in 'auto' mode in the ZIP.)

    Basically, to use it, simply enter things as asked (public and/or private IP, and whether you want to use automatic IP switching).

    It automatically finds your IPs, and asks you whether or not you agree with what it found.

    The automatic IP switching checks whether the client's IP is a private one (see here for private IP ranges).

    If so, the DNS server tells the client that gamestats2.gs.nintendowifi.net's IP is the one set as local IP.

    If not, it uses the public IP.

    It is really useful for people who want to run a GTS server on their own computer, and have clients from both their local network (e.g. themselves) and the Internet.

    Please report any problem.

    EDIT : This program, as well as all my other programs, needs Microsoft .NET Framework 3.5 in order to run properly.

    You can find it here.

    Is it possible to Set Random pokemon to your Personal (House) Gts Server? I only know how to set random on the ones others are receiving (Using my External Ip)

    I don't see exactly what you mean...

    What program are you using ?

    DNS_Server_v0.3+src.zip

    DNS_Server_v0.3+src.zip

  4. No, it doesn't go through at all. But I had him type in the same ip to his browser to see if it would, and it did. Not sure if that helps any.

    You mean, it appeared in the console of the GTS server ?

    So, it means that your port 80 is forwarded correctly, that's a good thing.

    The problem seems to come from port 53, make sure you didn't forward TCP instead of UDP.

    And check that this port is allowed by your firewall.

  5. In the DNS server, put your public IP (you can have it here for example).

    People must use that IP as their primary DNS, and whatever as their secondary DNS (the best is not to set anything here, for testing purposes).

    BTW, I finished version 0.3 of my DNS server as I had some free time today, I'll post it soon.

    It has an automatic IP fetching functionality, as well as an auto public/local IP switching, depending on where the client is connected.

  6. I think that the easiest way is to use my program to get the .pkm, then send it to the other game with sendpkm.

    No you just made it sound like a full working GTS instead of a glorified Pokemon depository.

    I never intended to make a full working GTS server, read more carefuly :

    I am currently making a VB.NET program that acts as a GTS server, allowing users to deposit/retrive a Pokémon and saving a .pkm of every Pokémon it receives (but no "search" function yet, so no real trading).
  7. I made that program so that you can get your Pokémon back after depositing it, but I can easily add a switch to choose whether you want to be able to take it back.

    Just wait a couple of minutes...

    EDIT : It seems to be harder than what I expected...

    When the game deposits a Pokémon, it seems to keep a copy in the save.

    Indeed, if the GTS tells the game that there is no Pokémon whereas you deposited one, the game says "<the Pokémon> has not been traded" when you want to check its summary, and it comes back into the PC, without the usual animation.

    It looks like an useful security to prevent your Pokémon from disappearing if there is a problem with the GTS server, but sadly I don't know how to bypass it and make the game believe it deposited nothing.

  8. Without a search function the only use it has is to convert Pokemon on your game to Pkm files on the computer.

    Yes, that is the only use of the program for the moment, I don't know what you expected...

    That's pretty useful however if, like me, you don't have any way to extract your save and you want the .pkm of your Pokémon.

  9. Finally, here it is. :tongue:

    I took my old SendPKM.exe program as a base, on which I added some functions present in fake_gts.py.

    I also used some parts of codemonkey85' awesome PokemonDSLib for the Pokémon data-manipulating functions (encryption/decryption).

    It is threaded, just like my other program.

    You just have to run 'GTS Server.exe' with a DNS server redirecting to your IP (local or public, depending on where you connect your DS from).

    [bTW, I improved my DNS server a long time ago but there are some bugs now, I'll see if I can release a new version soon.]

    When the program is launched for the first time, it creates 2 folders, named 'PKMs' and 'Current'.

    Every Pokémon sent by the game is converted to a .pkm and put in the 'PKMs' folder, under the name '[current timestamp]_[Pokémon specie]_[game PID].pkm' (without the brackets).

    'Current' contains the current Pokémon data, one for each game PID, under the name 'current_[game PID].dat' (without the brackets).

    The data files are 292 bytes long, beginning with the 236 encrypted party-Pokémon bytes and followed by 56 GTS-specific bytes, as described here.

    When a game deposits a Pokémon, a .dat file is created in that folder.

    It remains present until the game calls 'return.asp', typically when the Pokémon is taken back.

    However, the .pkm stays in the 'PKMs' folder.

    ---

    I started to add a 'verbose' functionnality, you can use it by passing '-verbose' (or '-v') as argument.

    It simply shows more description of the requests made by the DS.

    The program is still a console application, but can easily be included in a window app.

    I was planning to make a kind of Pokémon management system, to change which Pokémon are currently stored for example, but I don't have much time at the moment.

    PS : .NET Framework version 3.5 is requied to run this program, if you don't have it or if you are unsure of the version you have, download it from here.

    GTS_Server_v0.2+src.zip

    GTS_Server_v0.2+src.zip

×
×
  • Create New...