forked from Hay1tsme/segatools
emoney: Add Thinca authentication card stuff #35
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Haruka/segatools:thinca_auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds everything that's needed on the segatools side to add E-Money support regarding Thinca authentication cards.
I've also included set-up documentation (with a network side bonus which was as far as I could figure out so far, but I'm pretty certain no more changes to segatools will be needed)
Due to the nature of a custom protcol called TCAP that Thinca uses for networking (see docs), I can't fully test that everything works as I haven't yet bothered to figure that protocol out.
Tested with both APMv3 and FGO.
Hello,
thanks again for an awesome PR! I'm currently still testing and verifying your PR but I have some small improvements/thoughts on your PR :)
Let me know what you think about them!
@ -0,0 +1,185 @@
E-Money Authentication Procedure
Would it be possible to format this file as MarkDown (.md) instead of .txt, this would greatly improve readability?
Can do, I just usually write everything as text files in my repo because I am really not a fan of markdown syntax lmao
@ -0,0 +7,4 @@
New-Item 'HKLM:\Software\TFPaymentService' -Force | Out-Null
$acl = Get-Acl HKLM:\SOFTWARE\TFPaymentService
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($env:username, "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow")
Would it be possible to add an registry hook to segatools for that key?
can do
@ -0,0 +13,4 @@
2) Obtain the 64 byte long authentication card encryption key and the 32 byte long static authentication card ID. amdaemon.exe holds the secrets.
3) Get this java file, insert the ID and key, probably edit the passphrase and compile+run to generate authcard.bin: https://gist.github.com/akechi-haruka/a506184638e695a04eabe8cb53f62c36
Maybe a Python script included in this PR would be more useful than a java file on a gist
I know no python, the best I can do is PHP lmao
Can modify it slightly that the keys are taken as parameter and specify to simply download the file somewhere and then run "javac emoney.java && java emoney" (no external deps)
@ -0,0 +19,4 @@
5) Check tfps-res-pro\env.json for your game. If it contains a "use_proxy: true" statement, add "proxy_flag=3" under [aime]
6) Replace the two URLs in tfps-res-pro\resource.xml to your servers'. This is to ensure the Host header will match the certificate's.
This is not needed as the corresponding URLS should be properly hooked:
Okay I missed that, but that definetly doesn't seem to work for me for some reason
I actually have never looked into why, I only know that it's supposed to use getaddrinfo though.
I was only able to test AimePay which used winhttp and worked correctly, it could well be that thinca uses something different.
thincahttpclient.dll is just dynamically loaded, so that would be fixed with commit
6dacc8ba
, however, this runs into several HTTPS failures. Host name to certificate mismatch, as well as that most servers can't really run HTTPS client-auth on port 443 (as that would block game services itself)Granted, you could do the whole dance with self-signed certificates but that's really overkill. Maybe a file redirection hook or something might be smarter.
Checkout
From your project repository, check out a new branch and test the changes.