Skip to content

Commit

Permalink
Fixing Command Injection Issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
DEMON1A committed Feb 25, 2021
1 parent a6996fb commit 26e2a08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ async def ip(ctx , *, argument):

@Client.command()
async def dirsearch(ctx , *, argument):
if not CommandInjection.commandInjection(argument=argument , RCE=RCE):
await ctx.send("**Your Command Contains Unallowed Chars. Don't Try To Use It Again.**")
return

Path = TOOLS['dirsearch']; MainPath = getcwd(); chdir(Path)
await ctx.send(f"**Running Your Dirsearch Scan, We Will Send The Results When It's Done**")
Process = subprocess.Popen(f'python3 dirsearch.py -u {argument} -e * -b' , shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
Expand All @@ -115,6 +119,10 @@ async def dirsearch(ctx , *, argument):

@Client.command()
async def arjun(ctx , *, argument):
if not CommandInjection.commandInjection(argument=argument , RCE=RCE):
await ctx.send("**Your Command Contains Unallowed Chars. Don't Try To Use It Again.**")
return

Path = TOOLS['arjun']; MainPath = getcwd(); chdir(Path)
await ctx.send(f"**Running Your Arjun Scan, We Will Send The Results When It's Done**")
await ctx.send(f"**Note: The Bot Won't Respond Until The Scan is Done. All Of Your Commands Now Will Be Executed After This Process is Done.")
Expand Down

0 comments on commit 26e2a08

Please sign in to comment.