Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List player outfit/equipment/weapon #423

Open
eletrofss opened this issue Mar 5, 2020 · 9 comments
Open

List player outfit/equipment/weapon #423

eletrofss opened this issue Mar 5, 2020 · 9 comments

Comments

@eletrofss
Copy link

Hi, i'd like to list the weapons of the accounts, i guess this would be a must-have function in any kind of bot, also i'm having difficulties finding the right name to use when equiping some weapon because there doesn't seem to be a list of weapons with their real IGN, thank you.

@Levak
Copy link
Owner

Levak commented Mar 6, 2020

Hi,

Hi, i'd like to list the weapons of the accounts,

You mean, ALL guns of other players other than the bot you are logged in on, or the all the items of the bot itself?

i'm having difficulties finding the right name to use when equiping some weapon

Unless you add the necessary queries to it, warface it does not handle inventory management. It only dumps the items you have in a list to display how much you have and help random boxes and clan management, but nothing more.

Knowing that, I may curious why you need the item names. Anyway, the English<->item id map is in the game client, /Game/Localized/English.pak/text_weapons.xml for instance.

@eletrofss
Copy link
Author

i need to inventory a bunch of bot accounts, if i could just dump the inventory items in whatever format i'd be pretty happy, i know how to parse the dumps, i'd like to have a command to list inventory of the logged bot account, thanks for the explanation on the names but i can't find a program to open pak files.

@eletrofss
Copy link
Author

Unless you add the necessary queries to it, warface it does not handle inventory management. It only dumps the items you have in a list to display how much you have
What command can i use to dump the items? i know that i can use the command "sponsor" to equip a certain equipment but it doesn't list any items when i issue "sponsor", instead it will display an usage message, i guess that listing the inventory instead of displaying the usage message is a great improvement that you didn't thought of.

@Levak
Copy link
Owner

Levak commented Mar 7, 2020

Ok then, as a haddock method you can recompile warfacebot in debug mode and enable query logging. With some parsing job you can get the inventory pretty easily. make clean debug-wb then enable query_dump_to_file, open the log file in Logs/ and look for the join_channel query in a comment (decompressed query).

@eletrofss
Copy link
Author

Thanks, you've helped a lot.

@eletrofss
Copy link
Author

Well, i guess i'm forking the source then... it would be really nice to have an inventory CVar, what about the program to open the .pak file, any thoughts?

@eletrofss
Copy link
Author

btw, any idea or code on MITM the DTLS? any library or information you could give me to start? i was thinking of using a custom (UDP-TCP) wrapper with ZAP and changing the certificate of the game with the ZAP certificate, but i'm not sure yet exactly how DTLS works, if you could point me to any compatible library it would be much appreciated, i'm doing this for research purposes and i don't intend on releasing any complete derivative working code on the internet, i think coding is more fun than playing, if i discover any stuff i'm happy to share with you, maybe i can even solve the need to kick the bots from the room once i know enough about the overlay on DTLS protocol.

@eletrofss
Copy link
Author

Great job with the warfacebot btw, i found it because i saw the warface logs mentioning XMPP and i wanted to do exactly what you did and halfway on my research for example code i found your bot already made, since you already did the job i might as well add more stuff using my time.

@Levak
Copy link
Owner

Levak commented Mar 7, 2020

it would be really nice to have an inventory CVar

Feel free to make a command to list the whole inventory, yes. There is already the inventory list saved in memory, it's basically a job of displaying it.

what about the program to open the .pak file, any thoughts?

PakDecrypt Warface. Pick the one for EU for the correct RSA keys. Google is your friend here. You may end up on a cheating forums with my name on it. All good.

any idea or code on MITM the DTLS?

  1. In the past, MiTM of the lobby protocol (TCP+TLS+mcrypt+XMPP) was possible. Since several months already, the game client has been patched to send the TLS certificate signature of the remote server to the internal anti cheat (obfuscated).

  2. MiTM of the in-game protocol (when in a game, shooting etc) requires first MiTM of the lobby protocol, as the IP of the game server to connect to is sent there. Unless you make a custom IP routing - anyway. Then you have to defeat the onboard Diffie&Hellman handshake to get the dynamic AES keys (assuming you want to eye drop before proxy'ing). Then defeat the Arithmetic compression of CryEngine. All of that for what? That doesn't deal with the inventory xD
    Reason why warfacebot doesn't support in game protocol is because of that. Too much complexity for no good (legit) features. So I'm not sure why you want to inspect the DTLS part of the game (unless you are just doing all of that for fun like I was doing 5 years ago).

changing the certificate of the game with the ZAP certificate,

As I said, the signature of the TLS server certificate it connects to is included in the internal anti cheat. The AC will say "yes" or "no". There are ways to bypass this by dynamically patching the game and remove the AC check, but then MRAC will certainly tap your fingers, if you were to connect with a patched game client on the live servers (I guess/hope).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants