Commit 764436dd authored by Romain Bignon's avatar Romain Bignon

ability to give a direct URL

parent 03fb0748
Pipeline #11 failed with stages
......@@ -5,8 +5,8 @@
Abstract
--------
This project aim to find XSS trivial issues on websites and exploit them to
print the Goatse™ photo, and to take screenshots.
This project aims to find XSS trivial issues on websites and exploit them to
print the Goatse™ photo, and to automatically take screenshots.
Architecture
------------
......
......@@ -20,6 +20,7 @@
from __future__ import with_statement
import sys
import re
import os
import urllib
from urlparse import urlparse
......@@ -245,12 +246,22 @@ command %s
if __name__ == '__main__':
if len(sys.argv) < 2 or sys.argv[1] == '--help' or sys.argv[1] == '-h':
print 'Syntax: %s pattern [PAGE [NB]]' % sys.argv[0]
print ' %s URL' % sys.argv[0]
sys.exit(1)
if sys.argv[1] == '--version':
print 'Goatser v%s Copyright(C) 2011 Romain Bignon' % VERSION
sys.exit(0)
config = Config()
b = Browser(config)
pattern = sys.argv[1]
if re.match(r'https?://.*', pattern):
try:
b.try_website(pattern)
except KeyboardInterrupt:
print ''
else:
page = 1
nb = 10
if len(sys.argv) > 2:
......@@ -258,9 +269,6 @@ if __name__ == '__main__':
if len(sys.argv) > 3:
nb = int(sys.argv[3])
config = Config()
b = Browser(config)
for url in b.iter_results(pattern, page-1, nb):
print '-'
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment