also the script is using r2pipe.open(file) and it would be good if could be executed from inside r2 by doing r2pipe.open() if the r2pipe env is set in r2pipe-1.9.0 you can use the r2pipe.in_r2() method
[0x00170000]> #!pipe python /tmp/ppSearch.py
/tmp/ppSearch.py:150: SyntaxWarning: invalid escape sequence '\s'
instr_pattern1 = re.compile(f"add\s+(x\d+),\s+x27,\s+{first_target},\s+lsl\s+12")
/tmp/ppSearch.py:150: SyntaxWarning: invalid escape sequence '\s'
instr_pattern1 = re.compile(f"add\s+(x\d+),\s+x27,\s+{first_target},\s+lsl\s+12")
/tmp/ppSearch.py:151: SyntaxWarning: invalid escape sequence '\s'
instr_pattern2 = re.compile(f"ldr\s+(x\d+),\s+\[(x\d+),\s+{second_target}]")
usage: ppSearch.py [-h] binary hex_value
ppSearch.py: error: the following arguments are required: binary, hex_value
[0x00170000]>
also the script is using r2pipe.open(file) and it would be good if could be executed from inside r2 by doing r2pipe.open() if the r2pipe env is set in r2pipe-1.9.0 you can use the
r2pipe.in_r2()method