AntonnMal / pso2-proxy

Simple proxy for PSO2NGS
MIT License
6 stars 2 forks source link

How to obtain SEGAKey.blob? #4

Closed crispbitload closed 4 months ago

crispbitload commented 4 months ago

Compiled the proxy, but I can't seem to find a way/find a source to grab SEGAKey.blob.

Went to cyberkitsunes github as well for methods to grab the key, but it just states to ask in a IRC channel (which seems to be pretty dead at the moment)

(also looking for both keys for JP and US, if they are different)

AntonnMal commented 4 months ago

The RSA injector can dump public keys. You'll need to enable grab_keys option.

crispbitload commented 4 months ago

Got it, thanks!

Screenshot 2024-07-08 224623

crispbitload commented 4 months ago

I was wondering, how do I get this fully running? I tried running it and launching the JP version, and I have not gotten any packets at all.

I obtained the server link via http://the-ghf-clan.de/pso2serverstatus.html

AntonnMal commented 4 months ago

Did you add the IP replacement in the injector's config file?

crispbitload commented 4 months ago

I have added the IP replacement to the config (To account for the JP server)

Screenshot 2024-07-09 105243

Still no luck grabbing packets

AntonnMal commented 4 months ago

That's not the config I'm talking about. I meant the config that you've set up during the key grabbing process.

crispbitload commented 4 months ago

I disabled the replace address option, ill add the links and re-enable it (If I need to replace them)

Screenshot 2024-07-09 190648

My apologies, also do I add the same link I added in the config for JP? or use different links?

AntonnMal commented 4 months ago

Yes, you'll need to replace (and possibly add more fields) the IPs with the JP ones.

crispbitload commented 4 months ago

Got it, is there a file I can grab/place I can look to obtain the other links? Similar to unpacking the FPK file back on the vita version, would a similar file exist on the PC version?

AntonnMal commented 4 months ago

I believe the addresses haven't changed, so you can use the vita FPK file.

crispbitload commented 4 months ago

Alright! I'll grab the links again and test once maintenance is over and report back.

Also, would using another proxy (ex. Router Proxy) cause a conflict?

AntonnMal commented 4 months ago

I think no, but I'm not sure.

crispbitload commented 4 months ago

So I attempted to log in, and with the injected RSA key I keep receiving a "Server timed out" error. Even with link replacement, I receive this error. Launching the game without the injector does not cause the message to occur. (Also tested with and without the Ryuker proxy enabled via VPN)

AntonnMal commented 4 months ago

In the proxy window do you see 'Got connection'?

crispbitload commented 4 months ago

I do not see the got connection message

Screenshot 2024-07-10 180759

AntonnMal commented 4 months ago

Then I'm assuming that you didn't configure the injector correctly. Address definitions should be in the following format:

[[addresses]]
old = "<server ip>"
new = "<proxy ip>
crispbitload commented 4 months ago

That is most likely the reason...

Where would I get the proxy IP's? Would it be something local (like my home IP)? I never configured a proxy before, so excuse my inexperience.

AntonnMal commented 4 months ago

It's the IP of the PC that you have the proxy open (in your case localhost should work)

crispbitload commented 4 months ago

Still no luck, I even tried the IP addresses, which weirdly the config just reset itself after I did so.

Using the server links/IPs from http://the-ghf-clan.de/pso2serverstatus.html

Screenshot 2024-07-10 192850

Screenshot 2024-07-10 192920

Screenshot 2024-07-10 192934

AntonnMal commented 4 months ago

The proxy should first say Got connection when you load the ship selection screen. Since you say that you don't see that I'm assuming that the client connects to some different ship info server. Also, do the ship statuses show up? If so, then you'll probably need to use Wireshark to get the IPs (and hostnames from DNS packets). If they don't, then I going to ask you also use Wireshark to get the address that the client is trying to connect.

Sorry, I just don't use JP version.

crispbitload commented 4 months ago

On JP it shows the ships online, but it errors out with "Server timed out" after the SEGA ID screen.

It's fine, honestly I might use my alt account and grab packets on the Global version instead. Can I grab both English and Japanese item ID's using global? Along with that, would grabbing packets related to functions like using AC and gacha help?

lastly, would it be more preferred to grab packets on classic instead of NGS?

AntonnMal commented 4 months ago

I believe that you can use global to grab both languages, it depends on the selected language in game. AC and trading packets would be very nice to have. Also, NGS sends different packets in a lot of cases, so classic packets are preferred.

crispbitload commented 4 months ago

Alright! Also does it matter what version of the game I am using? The Microsoft store version to be more specific (I also have the steam version, but don't have an alt account on steam)

EDIT: Also wanted to ask when grabbing packets, would it be ok to do multiple actions on the same capture or should I separate actions between different packets?

AntonnMal commented 4 months ago

The version you use doesn't matter.

It's fine to to multiple action on the same capture as long as there is some identification as to what you were doing (a chat message would suffice)

crispbitload commented 4 months ago

I got the proxy running, however every time I run PSO2 with the proxy enabled, all the servers are stuck on maintenance.

Screenshot 2024-07-11 210114

This happens when I use my direct IP address of my PC (Via ethernet). Using localhost makes the proxy not run and game error out under error 240.

Configurations included

Screenshot 2024-07-11 211230

AntonnMal commented 4 months ago

From the proxy window it seems that it can't connect to sega servers for some reason. The server is correct and I've checked that it is up.

crispbitload commented 4 months ago

If it helps, here is the file structures of both the proxy and injector (output) as well.

Screenshot 2024-07-11 213800

AntonnMal commented 4 months ago

Can you check if you can connect to the server (using ncat for example) under different conditions (i.e. when running the game w/o injector or with it, running the proxy in the background)?

crispbitload commented 4 months ago

Alright, what command would I use on ncat to listen/record me testing connecting to the servers?

AntonnMal commented 4 months ago

.\ncat.exe gs0100.westus2.cloudapp.azure.com 12180

crispbitload commented 4 months ago

Ok I feel stupid...

After changing the link back to gs0100.westus2.cloudapp.azure.com 12180 on the proxy, I no longer receive errors.

Screenshot 2024-07-12 002245

EDIT: Also something to add to documentation when relating to the injector is you need to run as administrator on windows