Jump to content

mmavipc

Member
  • Content Count

    25
  • Joined

  • Last visited

  • Medals

Everything posted by mmavipc

  1. edit: (I can make them links myself by editing now that my post count is 1) I've written a program to encrypt SQF files with a password, and an SQF script to then decrypt. I'm relatively new to SQF and the language I'm most comfortable in is C++, so the SQF decryptor probably sucks, one major problem is the lack of bitwise manipulation commands in SQF, so I had to do xor using loops & integers, which takes a long time because it's inefficient, but it's the only solution. I've put in a feature request here: http://dev-heaven.net/issues/65613 if it gets accepted and implemented, decryption will happen nearly instantly. The zip contains two files: sqfcryptor.exe and decrypt.sqf Usage: Put the exe in the same folder as the sqfs you would like to encrypt, double click it, enter password, and then watch the magic. Your original files will still be in the folder, along with filename_enc.sqf which contain an array of numbers Example: http://pastebin.com/3PhdBsbp Put decrypt.sqf in your addon/mission/whereever you'll be using it. To use it, compile it in a SQF and assign a variable to it, then private["_decrypted"]; _decrypted =[] call compile loadFile "mysqf_enc.sqf"; _decrypted = ["password", _decrypted] call decrypt; This will give you a string containing the SQF's code, you can then manipulate it as you would if you had just loadFile'd the unencrypted SQF. Full example decrypt = compile preprocessFileLineNumbers "decrypt.sqf"; secretFunc = [] call compile loadFile "secretfunc_enc.sqf"; secretFunc = ["random password", secretFunc] call decrypt; secretToLife = ["omgwat"] call secretFunc; There's no way to preprocess code in memory, so if you need the preprocessor you need to do it manually before you encrypt the sqf. One way to do this would be to copyToClipboard preprocessFile "unprocessed.sqf"; and then put your clipboard's contents in a new SQF file and encrypt that instead. But what's the point if they can just open up the sqf and see the password? If you have it set up that way, then it's just a hoop they need to go through to get to the code. If it's an addon that's unavoidable, unless you want that addon to only work on your server. In a mission you need to put the password in a file that's somewhere on the server eg \userconfig\mission_name\pass.txt and have the mission load that file to get the password, then send the password over the network to clients who are joining. Example: if(isServer) { decPass = loadFile "\userconfig\mission_name\pass.txt"; publicVariable "decPass"; } else { waitUntil {!isNil "decPass"}; //decrypt using decPass }; I know you probably don't trust the exe(good for you, I wouldn't either if I were you, random exe from internet from guy with 1 post? no thanks), it's included only as a convenience, either open it up in a disassembler(I didn't pack it, so it should be easy to reverse), or code your own by looking at the decryption algorithm and preforming the steps in reverse. VirusTotal of exe: http://virustotal.com/file/d683f0e3ea7a4dda9ccd64cb5ec63a874bcda85b0e2ac5e17e6ab1c4437ce7a5/analysis/1354401178 Zip: http://filedropper.com/sqfcryptor Edit: I've cleaned up the code of sqfcryptor.exe it is available here: http://pastebin.com/S4QdJ205
  2. I made an sqm to biedi converter. The code is available here: https://github.com/mmavipc/SQM2BIEdi If someone would like to, it could easily be ported to an operating system different from windows, because it uses nothing windows specific(except for the #pragma once header guards, I was lazy). Pre-built binary: https://mega.co.nz/#!mMUlEDbZ!XGOa8gZF1GQ5C4AMhHCRWQoytq0JK4G5EGs9KOZ90AQ Virus scan of binary: https://www.virustotal.com/file/27aa6879c739ba584ab67c3a8c6c087bfa55a3e499727c479ebd182df68bd2e1/analysis/1355596836/ How to use: Put SQM2BIEdi.exe and your mission.sqf in the same directiory Run SQM2BIEdi.exe A mission.biedi has been generated Put it in Documents/Arma 2 Profiles/profilename/missions/mission_name.world_name Load it up in the 3D editor There are still some things that it is missing, the ones I know of are listed here: https://github.com/mmavipc/SQM2BIEdi/issues?state=open If you find something that isn't listed there, make a new issue if you already have a GitHub account, or post in this thread if you don't.
  3. Also, something to keep in mind. If you use callExtension, all of the detection messages would have to propogate through the script VM, and the skiddies could just patch that out. If using callExtension, at most, I recommend having the DLL call ExitProcess() to end A3, and not worry about banning them.
  4. If you're taking this route, you're going to have to distribute your dll to everyone who wants to play on your server.
  5. The only way to do it currently would be to release a DLL that scans as the game is running, and interface with the dll using callExtension, or have the dll hook into the game and interface with the game directly.
  6. mmavipc

    No alpha lite keys

    I'm missing them too.
  7. mmavipc

    Found reproducable crash

    Thanks, was looking for that.
  8. AnlGrp = createGroup civilian; _goat = AnlGrp createUnit ["Rabbit_F", position player, [], 25, "NONE"]; selectPlayer _goat; Can be Rabbit_F or any other animal. Run the above code, and then try to zoom your view with right mouse button, crash.
  9. mmavipc

    Warfare BE

    In my case, the init was running before the engine initialized the player object, so at that point in time local player = false .
  10. mmavipc

    Warfare BE

    Your isHostedServer in the init does not work, I replaced it with isHostedServer = (isServer && !isDedicated); so I can play on a listen server
  11. Headless client just randomly stopped working for us. We restarted our server, and now headless client wont connect to it, or any other server. I can spawn a HC on my local box using the exact same settings and have it connect to the server though. SOLUTION FOUND!!!!! where -port=x the HC will try to bind to x+2, so if you specify it as 2302, or leave it blank, it will try to bind to 2304 Problem: server binds to 2304 Solution: add -port=2303 Hc will bind to 2305 https://dev-heaven.net/issues/70604
  12. mmavipc

    Secure ID progress

    Version 1.62.100296 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl ca\missions\MPScenarios\MP_Deathmatch.chernarus: string @str_mpdeathmatch_subname cannot be localized client-side - move to global stringtable HTTP error 500 (res=35) Info: (( About to connect() to is.bistudio.com port 8181 (#0) Trying 109.123.194.186... connected Connected to is.bistudio.com (109.123.194.186) port 8181 (#0) schannel: SSL/TLS connection with is.bistudio.com port 8181 (step 1/3) schannel: checking server certificate revocation schannel: sending initial handshake data: sending 123 bytes... schannel: sent initial handshake data: sent 123 bytes schannel: SSL/TLS connection with is.bistudio.com port 8181 (step 2/3) schannel: failed to receive handshake, need more data schannel: SSL/TLS connection with is.bistudio.com port 8181 (step 2/3) schannel: encrypted data buffer: offset 3185 length 4096 schannel: sending next handshake data: sending 326 bytes... schannel: SSL/TLS connection with is.bistudio.com port 8181 (step 2/3) schannel: encrypted data buffer: offset 6 length 4096 schannel: SSL/TLS connection with is.bistudio.com port 8181 (step 2/3) schannel: encrypted data buffer: offset 53 length 4096 schannel: SSL/TLS handshake complete schannel: SSL/TLS conne Registration failed: error SSL connect error (schannel: failed to setup extended errors)
  13. mmavipc

    Secure ID progress

    Version 1.62.100258 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl ca\missions\MPScenarios\MP_Deathmatch.chernarus: string @str_mpdeathmatch_subname cannot be localized client-side - move to global stringtable Registration failed: error SSL connect error And that's where it ends. Not really much of a help.
  14. mmavipc

    Secure ID progress

    Build 100258 isn't out yet, but I captured packet with wireshark: https://dl.dropbox.com/u/3925811/ssl.pcap With the SSL private key you should be able to decrypt them, and that encrypted alert at the end.
  15. mmavipc

    Secure ID progress

    Nothing unusual about how I access the web, when I open that link in my web browser it works fine. I'll try ArmA 2 OA Beta in a bit and post a screenshot if it errors again. Screenshot: http://img.ctrlv.in/50d12a7d43ed6.jpg (162 kB) SSL Connect error is very non-descript, even just adding an error code generated by whatever library you're using would make this so much easier to debug.
  16. That only sets the name of the variable that holds the unit, not the name of the unit that appears in teamswitch.
  17. If I createUnit then addSwitchable unit, it appears in teamswitch. It has a name like "Soldier (unarmed)", how do I change what name appeares in the teamswitch menu?
  18. mmavipc

    Secure ID progress

    Every time I join a server running this, it says my ID is unregistered and there was a SSL connection error. Next beta you might want to make the error message a bit more specific, many things can go wrong during an SSL/TLS handshake
  19. mmavipc

    SQF Encryptor

    That's up to you. In the pilot cert mission the password isn't encrypted at all, it's stored in \userconfig\...\pass.txt on the server, and when a client joins, the server sends it to them.
  20. mmavipc

    SQF Encryptor

    they could just depbo it and look at decrypt.sqf, if decrypt.sqf was ever encrypted nothing could be decrypted. The only way to keep the encryption secure is to safeguard the password, like I mentioned in the OP.
  21. mmavipc

    SQF Encryptor

    Yeah, but that's if the password is embedded in the mission, and not sent to the clients from the server. If it's only sent when they connect they'd have to dump the code while connected, and if you don't give them a way to run scripts while playing they'd have to inject the script, which usually causes a BE global ban. If they asked us for it I'm sure we'd give it to them, it's more to prevent the scenario in which they don't
  22. mmavipc

    SQF Encryptor

    I was going to write an automated obfuscator, but encryption was less work, and more secure the way I'd be using it. I might write an obfuscator later on, and then obfuscate it before I encrypt it, double whammy.
  23. mmavipc

    SQF Encryptor

    I initially made it for a pilot qualification map that the group I'm a part of uses, so others couldn't rip it our of their mission cache and use it for their own group/train specifically for it. I thought, why not share it with others, and couldn't think of a reason, so I shared it here.
  24. Take a look at setVariable and getVariable https://community.bistudio.com/wiki/setVariable In the init box I'd put this setVariable ["canusemyscript", true, true]; And in the script I'd put if(!(_activator getVariable ["canusemyscript", false])) then { //do stuff } else { //tell them they can't };
×