- Python
- Colorama and Subprocess python package
- Compiler for your language (C, C++, Java or Python)
- Create files inside
Files
according to your language and add them inhack.py
no_users = 2
files = [ # first file expected output
'./Files/correct.cpp',
'./Files/wrong1.cpp',
]
- Generate testcase in
testcase.cpp
file - Update
./Files/correct.cpp
file - Update
./Files/wrong1.cpp
file - Modify
hack.py
file according to number of users and files - Run
python hack.py
- After getting wrong answer chekout
wa.txt
(contains input, actual output and correct output) file andin.txt
(current input) file
- Testcase generator is written in
c++
, you can also use other language but make sure to modifyhack.py
accordingly. - Give a star⭐️ & Follow ;)