Skip to content

Convert your locally compiled binary to a C++ code/text format that you can use on Codingame.com

Notifications You must be signed in to change notification settings

Agade09/CG-Send-Binary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CG-Send-Binary

Convert your locally compiled binary to a C++ code/text format that you can use on Codingame.com
Flagged as a cheat during contests since Wondev Woman

What it does:

  • Converts the binary to base85 text encoding
  • Outputs a .cpp file with code to recreate the binary file on the CG servers and run it

How to use:

  • Compile this tool
  • Compile your AI as a linux binary
  • Run this tool on the linux binary (e.g: Binary_To_Base85 MyBinary)
  • Optionally pass a third argument, a source code file to be appended as a comment (e.g: Binary_To_Base85 MyBinary MySource.cpp)
  • Use the "_Base85.cpp" file as your program on Codingame

Caution:

  • If you compile your AI with a different version of the compiler to what CG is using the binary may not run due to looking for a non-existing version of the runtime libraries

Recommendations:

  • Strip the binary
  • Compress it with UPX

before using this tool, to reduce the chance of hitting the 100ko code size limit of Codingame.

The included Base85.sh shell script is meant as an example of using this tool. It will not work on your machine if your not on linux, your PATH is not correct and/or you have not installed UPX.

Acknowledgements:

  • Original idea is from [CPC]rOut on Codingame.com

About

Convert your locally compiled binary to a C++ code/text format that you can use on Codingame.com

Resources

Stars

Watchers

Forks

Packages

No packages published