Skip to content

Commit

Permalink
Block arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
DEMON1A authored Apr 19, 2021
1 parent 6cfe7e9 commit 8892591
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion assets/CommandInjection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import re

def commandInjection(argument , RCE):
for char in argument:
if char in RCE: return False

return True
argumentFinder = re.search(r"(..*\-|^\-)[a-zA-Z]", argument)
if argumentFinder != None:
argument = argument.split(' ')[1].strip()
if not argument.startswith('https://') or not argument.startswith('http://'):
return False
else:
return True
else:
return True

0 comments on commit 8892591

Please sign in to comment.