Skip to content

Commit c8f9397

Browse files
authored
Merge pull request #83 from ccsplit/master
Make changes to the setup.py originally suggested by @MohitS10
2 parents 46086d6 + 04c01b9 commit c8f9397

26 files changed

+89
-46
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ install:
88
- pip install -r test-requirements.txt
99
- pip install pep8
1010
before_script:
11-
- pep8 -v *.py lib/
11+
- pep8 -v *.py VHostScan/
1212
script:
1313
- pytest

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include VHostScan *.txt

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Install via pip using:
2828
$ pip install -r requirements.txt
2929
```
3030

31+
Or simply run `python setup.py install` and the dependencies should be installed. If there is an issue regarding
32+
running `python setup.py build_ext`, you will need to reinstall `numpy` using `pip uninstall numpy` and `pip install numpy==1.12.0`. This should resolve the issue as there are sometimes issues with numpy being installed through setup.py.
33+
3134
# Usage
3235

3336
| Argument | Description |
@@ -65,7 +68,7 @@ _Note that a number of these examples reference 10.10.10.29. This IP refers to B
6568
The most straightforward example runs the default wordlist against example.com using the default of port 80:
6669

6770
```bash
68-
$ VHostScan.py -t example.com
71+
$ VHostScan -t example.com
6972
```
7073

7174
### Quick Example with SSL
@@ -81,21 +84,21 @@ $ VHostScan.py -t example.com --ssl
8184
Say you have an SSH port forward listening on port 4444 fowarding traffic to port 80 on example.com's development machine. You could use the following to make VHostScan connect through your SSH tunnel via localhost:4444 but format the header requests to suit connecting straight to port 80:
8285

8386
```bash
84-
$ VHostScan.py -t localhost -b example.com -p 4444 -r 80
87+
$ VHostScan -t localhost -b example.com -p 4444 -r 80
8588
```
8689

8790
### STDIN
8891
VHostScan Supports piping from other applications and will treat information passed to VHostScan as wordlist data, for example:
8992
```bash
90-
$ cat bank.htb | VHostScan.py -t 10.10.10.29
93+
$ cat bank.htb | VHostScan -t 10.10.10.29
9194
```
9295

9396
![VHOSTScan STDIN Example](https://github.com/codingo/codingo.github.io/blob/master/assets/Bank%20VHOST%20Pipe%20Example.png)
9497

9598
### STDIN and WordList
9699
You can still specify a wordlist to use along with stdin. In these cases wordlist information will be appended to stdin. For example:
97100
```bash
98-
$ echo -e 'a.example.com\b.example.com' | VHostScan.py -t localhost -w ./wordlists/wordlist.txt
101+
$ echo -e 'a.example.com\b.example.com' | VHostScan -t localhost -w ./wordlists/wordlist.txt
99102
```
100103
### Fuzzy Logic
101104
Here is an example with fuzzy logic enabled. You can see the last comparison is much more similar than the first two (it is comparing the content not the actual hashes):
@@ -111,4 +114,11 @@ pip install -r test-requirements.txt
111114
pytest
112115
```
113116

117+
Or you can optionally run:
118+
119+
```bash
120+
pip install -r test-requirements.txt
121+
python setup.py test
122+
```
123+
114124
If you're thinking of adding a new feature to the project, consider also contributing with a couple of tests. A well-tested codebase is a sane codebase. :)

VHostScan.py renamed to VHostScan/VHostScan.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
#!/usr/bin/python
22

3-
import os
43
import sys
54
import dns.resolver
65
from argparse import ArgumentParser
76
from socket import gethostbyaddr
8-
from lib.core.virtual_host_scanner import *
9-
from lib.helpers.output_helper import *
10-
from lib.helpers.file_helper import load_random_user_agents
11-
from lib.helpers.wordlist_helper import WordList
12-
from lib.core.__version__ import __version__
13-
from lib.input import cli_argument_parser
14-
15-
DEFAULT_WORDLIST_FILE = os.path.join(
16-
os.path.dirname(os.path.abspath(__file__)),
17-
'wordlists',
18-
'virtual-host-scanning.txt'
19-
)
7+
from pkg_resources import resource_filename
8+
from .lib.core.virtual_host_scanner import *
9+
from .lib.helpers.output_helper import *
10+
from .lib.helpers.file_helper import load_random_user_agents
11+
from .lib.helpers.wordlist_helper import WordList
12+
from .lib.core.__version__ import __version__
13+
from .lib.input import cli_argument_parser
14+
15+
DEFAULT_WORDLIST_FILE = resource_filename(
16+
'VHostScan', 'wordlists/virtual-host-scanning.txt')
2017

2118

2219
def print_banner():

VHostScan/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

lib/core/__version__.py renamed to VHostScan/lib/core/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# |V|H|o|s|t|S|c|a|n| Developed by @codingo_ & @__timk
33
# +-+-+-+-+-+-+-+-+-+ https://github.com/codingo/VHostScan
44

5-
__version__ = '1.8.2'
5+
__version__ = '1.8.3'
File renamed without changes.

lib/core/virtual_host_scanner.py renamed to VHostScan/lib/core/virtual_host_scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import hashlib
66
import pandas as pd
77
import time
8-
from lib.core.discovered_host import *
8+
from .discovered_host import *
99

1010
import urllib3
1111
urllib3.disable_warnings()

0 commit comments

Comments
 (0)