I won't go into too much detail, but essentially, input was verified if it was an integer, and afterwards used in a raw SQL query
So I had to find some input that both validated as an integer, and which was useful for SQL injection
I tried commenting it out (just to "assume" I managed to evade somehow) and tried something like 1 and 53=ascii(substr(select/**/version(),1,1))
and that worked
so if I had somehow managed to evade the filter, I could have written a script to extract the relevant information from the database and proceed with the further steps, which by the way, I all figured out
Getting info from the DB was the only step I failed at