DEV Community

Mudacumura Brunoblaise
Mudacumura Brunoblaise

Posted on

Ready Gladiator 1

Ready Gladiator 1

200 points

Description
Can you make a CoreWars warrior that wins?
Your opponent is the Imp. The source is available here. If you wanted to pit the Imp against himself, you could download the Imp and connect to the CoreWars server like this:
nc saturn.picoctf.net port number < imp.red
To get the flag, you must beat the Imp at least once out of the many rounds.

Note: This challenge launches an instance on demand.


I tried asking chatGPT to help me understand the syntax and what to do, but it gave me 3 programs that just lost with a weird syntax.

So the next thing I did is google, a reddit thread where someone asks how to beat the Imp gave the instructions:

sub 1, -10
jmp -1
Enter fullscreen mode Exit fullscreen mode
;redcode
;name Paper-Scissors-Rock
;assert 1

sub 1, -10
jmp -1

end
Enter fullscreen mode Exit fullscreen mode

and this code won 40 out of a 100 wins and got me the flag (still don't understand the game mostly...)

picoCTF{your flag}

Top comments (2)

Collapse
 
geekpentesting profile image
geekpentesting

I added some random code i copied from google-fu , and i got 3 wins,

Warrior1:
;redcode
;name Imp Ex
;assert 1
jmp 4
mov 2, -1
jmp -1
dat 9
spl -2
spl 4
add #-16, -3
mov -4, @-4
jmp -4
spl 2
jmp -1
mov 0, 1
end

Rounds: 100
Warrior 1 wins: 3
Warrior 2 wins: 0
Ties: 97
You did it!

Collapse
 
brunoblaise profile image
Mudacumura Brunoblaise

why did you do so