Skip to content

Commit 9772327

Browse files
author
Ryan Peck
committed
README.md improvements
1 parent 0bb8a5a commit 9772327

1 file changed

Lines changed: 23 additions & 21 deletions

File tree

‎README.md‎

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
# httpscreenshot
22

3-
##Installation on Ubuntu:
3+
### Installation on Ubuntu
44

5-
###Via Script
5+
#### Via Script
66

7-
./install-dependencies.sh
7+
Run `install-dependencies.sh` script as root.
88

9-
###Manually
9+
This script has been tested on Ubuntu 14.04.
1010

11-
apt-get install python-requests python-m2crypto phantomjs
11+
### Manually
1212

13-
If you run into: 'module' object has no attribute 'PhantomJS'
14-
then pip install selenium (or pip install --upgrade selenium)
13+
apt-get install swig swig2.0 libssl-dev python-dev python-pip
14+
pip install -r requirements.txt
1515

16+
If you run into: 'module' object has no attribute 'PhantomJS' then `pip install selenium` (or `pip install --upgrade selenium`).
1617

17-
If installing on Kali linux, PhantomJS might not be in the repositories, you can download from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 and symlink to /usr/bin like so:
1818

19-
sudo ln -s /path/to/phantomjs /usr/bin/phantomjs
19+
If installing on Kali Linux, PhantomJS might not be in the repositories, you can download from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 and symlink to `/usr/bin` like so:
2020

21-
##Readme and Use cases:
21+
sudo ln -s /path/to/phantomjs /usr/bin/phantomjs
22+
23+
## README and Use Cases
2224

2325
HTTPScreenshot is a tool for grabbing screenshots and HTML of large numbers of websites. The goal is for it to be both thorough and fast which can sometimes oppose each other.
2426

2527
Before getting into documentation - this is what I USUALLY use for options if I want to screenshot a bunch of sites:
2628

27-
./httpscreenshot.py -i \<gnmapFile\> -p -w 40 -a -vH
29+
./httpscreenshot.py -i \<gnmapFile\> -p -w 40 -a -vH
2830

2931
Notice there are a ton of worker threads (40). This can be problematic, I make up for failures that could have been a result of too many threads with a second run:
3032

31-
./httpscreenshot.py -i \<gnmapFile\> -p -w 5 -a -vH
33+
./httpscreenshot.py -i \<gnmapFile\> -p -w 5 -a -vH
3234

3335
YMMV
3436

@@ -60,7 +62,7 @@ Some of the above options have non-obvious use-cases, so the following provides
6062

6163
-i, --input -> Takes a gnmap file as input. This includes masscan gnmap output.
6264

63-
-p, --headless -> I find myself using this option more and more. By default the script "drives" FireFox. As the number of threads increases this becomes really ugly - 20,30 FireFox windows open at once. This options uses "phantomjs" which doesn't have a GUI but will still do a decent job parsing javascript.
65+
-p, --headless -> I find myself using this option more and more. By default the script "drives" Firefox. As the number of threads increases this becomes really ugly - 20,30 Firefox windows open at once. This options uses "phantomjs" which doesn't have a GUI but will still do a decent job parsing javascript.
6466

6567
-w, --workers -> The number of threads to use. Increase for more speed. The list of input URL's is automatically shuffled to avoid hammering at IP addresses that are close to each other when possible. If you add too many threads, you might start seeing timeouts in responses - adjust for your network and machine.
6668

@@ -70,23 +72,23 @@ Some of the above options have non-obvious use-cases, so the following provides
7072

7173
-a, --autodetect -> Without this option enabled, HTTPScreenshot will behave as follows:
7274

73-
If a LIST of urls is specified as input, sites with scheme "http://" are treated as non-ssl and sites with scheme "https://" are treated as ssl-enabled
75+
> If a LIST of urls is specified as input, sites with scheme "http://" are treated as non-ssl and sites with scheme "https://" are treated as ssl-enabled
7476
75-
For GNMAP input the script will scrape input and try to use any SSL detection performed by nmap. Unfortunately this is unreliable, nmap doesn't always like to tell you that something is SSL enabled. Further, masscan doesn't do any version or service detection.
77+
> For GNMAP input the script will scrape input and try to use any SSL detection performed by nmap. Unfortunately this is unreliable, nmap doesn't always like to tell you that something is SSL enabled. Further, masscan doesn't do any version or service detection.
7678
77-
The -a or --autodetect option throws away all SSL hints from the input file and tries to detect on its own.
79+
> The -a or --autodetect option throws away all SSL hints from the input file and tries to detect on its own.
7880
7981
-vH, --vhosts -> Often when visiting websites by their IP address (e.g: https://192.168.1.30), we will receive a different page than expected or an error. This is because the site is expecting a certain "virtual host" or hostname instead of the IP address, sometimes a single HTTP server will respond with many different pages for different hostnames.
8082

81-
For plaintext "http" websites, we can use reverse DNS, BING reverse IP search etc... to try and find the hostnames associated with an IP address. This is not currently a feature in HTTPScreenshot, but may be implemented later.
83+
> For plaintext "http" websites, we can use reverse DNS, BING reverse IP search etc... to try and find the hostnames associated with an IP address. This is not currently a feature in HTTPScreenshot, but may be implemented later.
8284
83-
For SSL enabled "https" sites, this can be a little easier. The SSL certificate will provide us with a hint at the domain name in the CN field. In the "subject alt names" field of the certificate, when it exists, we may get a whole list of other domain names potentially associated with this IP. Often these are in the form "*.google.com" (wildcard certificate) but sometimes will be linked to a single hostname only like "www.google.com"
85+
> For SSL enabled "https" sites, this can be a little easier. The SSL certificate will provide us with a hint at the domain name in the CN field. In the "subject alt names" field of the certificate, when it exists, we may get a whole list of other domain names potentially associated with this IP. Often these are in the form "\*.google.com" (wildcard certificate) but sometimes will be linked to a single hostname only like "www.google.com"
8486
85-
the -vH or --vhosts flag will, for each SSL enabled website extract the hostnames from the CN and subject alt names field, and add them to the list of URL's to be screenshotted. For wildcard certificates, the "*." part of the name is dropped.
87+
> The -vH or --vhosts flag will, for each SSL enabled website extract the hostnames from the CN and subject alt names field, and add them to the list of URL's to be screenshotted. For wildcard certificates, the "\*." part of the name is dropped.
8688
87-
-dB, --dns_brute -> Must use with -vH for it to make sense. This flag specifies a file containing a list of potential subdomains. For any wildcard certificate e.g: "*.google.com", HTTPScreenshot will try to bruteforce valid subdomains and add them to the list of URLs to be screenshotted.
89+
-dB, --dns_brute -> Must use with -vH for it to make sense. This flag specifies a file containing a list of potential subdomains. For any wildcard certificate e.g: "\*.google.com", HTTPScreenshot will try to bruteforce valid subdomains and add them to the list of URLs to be screenshotted.
8890

89-
-r, --retries -> Sometimes FireFox or ghostscript timeout when fetching a page. This could be due to a number of factors, sometimes you just have too many threads going, a network hiccup, etc. This specifies the number of times to "retry" a given host when it fails.
91+
-r, --retries -> Sometimes Firefox or ghostscript timeout when fetching a page. This could be due to a number of factors, sometimes you just have too many threads going, a network hiccup, etc. This specifies the number of times to "retry" a given host when it fails.
9092

9193

9294

0 commit comments

Comments
 (0)