I just started writing scripts using z3 , only for CTF tasks.
for ( i = 0; i <= 7; ++i )
{
s2[i] += s2[i] % 10;
if ( s2[i] > 123 )
s2[i] = -100 - s2[i];
}
strcmp("H0Tf00D:<", s2)
This is a fairly simple logic that can even be done manually. But since I am studying z3 , so I was wondering if this could be done or not using z3.
I did some of my homework in , if conditions using z3 , and not so much I found.
Here are some of the things I learned:
PS I don’t want a solution, I just want to know if it can be done with z3 or not, and if so, then point me in the right direction.
Update1
I have made a lot of progress (although this does nothing):
from z3 import *
s1 = Int('s[1]')
s2 = Int('s[2]')
s3 = Int('s[3]')
s4 = Int('s[4]')
s5 = Int('s[5]')
s6 = Int('s[6]')
s7 = Int('s[7]')
s = Solver()
a = "H0Tf00D:<"