Anti obfuscation check

Revision en2, by HusseinFarhat, 2023-08-09 12:36:49

There are multiple blogs showing that some users get away with cheating by obfuscating their code, so codeforces really needs to check if a submission is obfuscated. It looks like the cheaters copy a solution and they put each line/token in a define, with a lot of junk in between. This is currently being handled on a case by case basis, which is a problem

/*Example*/

#include <iostream>
#define awhHRUTH1x using
#define b589AHWUin namespace
#define iuhA2781AB std;
#define v1895Krnba int
#define bATT68125F main(
#define bba5891AW4 ){
#define JKT15jyT51 cout<<
#define abb151A5h1 "HelloWorld\n";
#define Uikta5UUNW return
#define bbbqrgq214 0;
#define btpIOUHBWW }

awhHRUTH1x b589AHWUin iuhA2781AB
/*#define aiw uahiuwhha ruahwihaiuwhviunpawrry1pqrawu;*/
/*int gcd(int a,int b) return a+b;*/
/*im not sure if this compiles*/
v1895Krnba bATT68125F bba5891AW4 JKT15jyT51 abb151A5h1 Uikta5UUNW bbbqrgq214 btpIOUHBWW

Right now, as most of these solutions are accepted and not skipped, it seems like there's not a proper obfuscation check, so we need MikeMirzayanov to make a good one. For example, checking the code after it gets preprocessed (remove defines and comments) so that the junk won't circumvent the checks. Or counting the amount of random strings in the code (like a551hawibBY). These ideas can be made into a deobfuscator that preprocesses the code before the actual cheating check

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English HusseinFarhat 2023-08-09 12:36:49 105
en1 English HusseinFarhat 2023-08-09 12:07:45 1370 Initial revision (published)