Skip to content

Commit c5feb8f

Browse files
committed
Fixed numpy install 'hopefully'.
Numpy sometimes fails to properly install when just within the install_requires (see [#2434](numpy/numpy#2434)) so I also added it to setup_requires. Also changed from using scripts => entry_points:{'console_scripts'} and the command to `VHostScan` within the README for consistency.
1 parent 8c6f20c commit c5feb8f

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Using pip install via:
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
![VHOSTScan Wordlist example](https://github.com/codingo/codingo.github.io/blob/master/assets/Bank%20VHOST%20Example.png)
@@ -74,21 +77,21 @@ $ VHostScan.py -t example.com
7477
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:
7578

7679
```bash
77-
$ VHostScan.py -t localhost -b example.com -p 4444 -r 80
80+
$ VHostScan -t localhost -b example.com -p 4444 -r 80
7881
```
7982

8083
### STDIN
8184
VHostScan Supports piping from other applications and will treat information passed to VHostScan as wordlist data, for example:
8285
```bash
83-
$ cat bank.htb | VHostScan.py -t 10.10.10.29
86+
$ cat bank.htb | VHostScan -t 10.10.10.29
8487
```
8588

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

8891
### STDIN and WordList
8992
You can still specify a wordlist to use along with stdin. In these cases wordlist information will be appended to stdin. For example:
9093
```bash
91-
$ echo -e 'a.example.com\b.example.com' | VHostScan.py -t localhost -w ./wordlists/wordlist.txt
94+
$ echo -e 'a.example.com\b.example.com' | VHostScan -t localhost -w ./wordlists/wordlist.txt
9295
```
9396
### Fuzzy Logic
9497
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):

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ def dependencies(file):
88

99

1010
with open("README.md") as f:
11+
try:
12+
import numpy
13+
num_installed = True
14+
except ImportError:
15+
num_installed = False
1116
setup(
1217
name="VHostScan",
1318
license="GPLv3",
@@ -23,10 +28,11 @@ def dependencies(file):
2328
package_data={'VHostScan': ['*.txt']},
2429
entry_points={
2530
'console_scripts': [
26-
'vhostscan = VHostScan.VHostScan:main'
31+
'VHostScan = VHostScan.VHostScan:main'
2732
]
2833
},
2934
install_requires=dependencies('requirements.txt'),
30-
setup_requires=['pytest-runner'],
35+
setup_requires=['pytest-runner',
36+
'' if num_installed else 'numpy==1.12.0'],
3137
tests_require=dependencies('test-requirements.txt'),
3238
include_package_data=True)

0 commit comments

Comments
 (0)