Skip to content

Commit

Permalink
Fixed bug in target, auto send updates to avoid hanging
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobTheDev committed Jan 7, 2019
1 parent 3cbe090 commit 70e4749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Scripts/niktos.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ def main():

# Force SSL on port 443
if (port == '80'):
output_nikto = subprocess.check_output(['nikto', '-host', target], universal_newlines=True)
output_nikto = subprocess.check_output(['nikto', '-host', target, '-ask', 'auto'], universal_newlines=True)
else:
output_nikto = subprocess.check_output(['nikto', '-host', target, '-ssl'], universal_newlines=True)
output_nikto = subprocess.check_output(['nikto', '-host', target, '-ask', 'auto', '-ssl'], universal_newlines=True)

# Print the output to terminal, if selected
if (args.print):
print(output_nikto)

# Write the nikto output to file
target = target.replace('.','-')
nikto_outfile = open('nikto/' + target + '-' + port + '.txt', 'w')
target_dash = target.replace('.','-')
nikto_outfile = open('nikto/' + target_dash + '-' + port + '.txt', 'w')
nikto_outfile.write(str(output_nikto))
nikto_outfile.close()

Expand Down

0 comments on commit 70e4749

Please sign in to comment.