Skip to content

Commit

Permalink
Merge pull request #39 from F5-Labs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
warburtr0n committed Jul 5, 2021
2 parents 0814577 + 3f127a8 commit 19544e5
Show file tree
Hide file tree
Showing 38 changed files with 20,649 additions and 423 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.7
LABEL version="1.3.7.1"
LABEL version="1.3.8"
LABEL maintainer="f5labs@f5.com"
RUN pip3 install pycurl
RUN pip3 install cryptonice
Expand Down
2 changes: 1 addition & 1 deletion cryptonice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# __init__.py

# Version of cryptonice package
__version__ = "1.3.7.1"
__version__ = "1.3.9"
Binary file added cryptonice/__pycache__/wappalyze.cpython-39.pyc
Binary file not shown.
20 changes: 19 additions & 1 deletion cryptonice/gethttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Wappalyzer Requirements
import json
import re
from wappalyze import wappalyze
# import warnings
import pkg_resources
from bs4 import BeautifulSoup
Expand Down Expand Up @@ -275,18 +276,30 @@ def get_http(ip_address, hostname, int_port, usetls, http_pages, force_redirect)
if http_pages:
connection_data.update({'Page': pagebody})

conn.close()

#### Wappalyzer build #####

webpage = {}

'''
webpage['url'] = str_host + str_path
webpage['headers'] = res.getheaders()
webpage['response'] = str(pagebody)
webpage['html'] = BeautifulSoup(str(pagebody), 'html.parser')
webpage['scripts'] = [script['src'] for script in webpage['html'].findAll('script', src=True)]
webpage['metatags'] = {meta['name'].lower(): meta['content']
for meta in webpage['html'].findAll('meta', attrs=dict(name=True, content=True))}
'''

webpage['url'] = str_host + str_path
webpage['headers'] = res.headers
webpage['response'] = str(pagebody)
webpage['html'] = BeautifulSoup(str(pagebody), 'html.parser')
webpage['scripts'] = [script['src'] for script in webpage['html'].findAll('script', src=True)]
webpage['metatags'] = {meta['name'].lower(): meta['content']
for meta in webpage['html'].findAll('meta', attrs=dict(name=True, content=True))}

conn.close()

page = {}
page['scripts'] = webpage['scripts']
Expand All @@ -301,3 +314,8 @@ def get_http(ip_address, hostname, int_port, usetls, http_pages, force_redirect)
connection_data.update({'Page': page})

return [str_host, str_path, b_httptohttps], connection_data


if __name__ == '__main__':
analyzed = get_http('93.184.216.34', 'example.com', 443, True, True, True)
print (analyzed)

0 comments on commit 19544e5

Please sign in to comment.