Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b86c317

Browse files
committed
printing the hostname instead of the hash for easier to read output
1 parent f125765 commit b86c317

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

‎VHostScan/lib/helpers/output_helper.py‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
from ..core.discovered_host import *
2-
from .file_helper import *
3-
import time
4-
from fuzzywuzzy import fuzz
51
import itertools
6-
import numpy as np
72
import json
3+
import time
4+
5+
import numpy as np
6+
7+
from fuzzywuzzy import fuzz
8+
9+
from ..core.discovered_host import *
10+
from .file_helper import *
811

912

1013
class output_helper(object):
@@ -91,13 +94,13 @@ def output_fuzzy(self):
9194
request_hashes = {}
9295

9396
for host in self.scanner.hosts:
94-
request_hashes[host.hash] = host.content
97+
request_hashes[host.hash] = (host.hostname, host.content)
9598

9699
for a, b in itertools.combinations(request_hashes.keys(), 2):
97100
output += "\n\t[>] {} is {}% similar to {}".format(
98-
a,
99-
fuzz.ratio(request_hashes[a], request_hashes[b]),
100-
b
101+
request_hashes[a][0],
102+
fuzz.ratio(request_hashes[a][1], request_hashes[b][1]),
103+
request_hashes[b][1]
101104
)
102105

103106
return output

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /