Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove artifact ua cycler code #672

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Python/EyeWitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from modules.helpers import create_folders_css
from modules.helpers import default_creds_category
from modules.helpers import do_jitter
from modules.helpers import get_ua_values
from modules.helpers import target_creator
from modules.helpers import title_screen
from modules.helpers import open_file_input
Expand Down
118 changes: 0 additions & 118 deletions Python/modules/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,124 +479,6 @@ def target_creator(command_line_object):
command_line_object.f, command_line_object)
return file_urls


def get_ua_values(cycle_value):
"""Create the dicts which hold different user agents.
Thanks to Chris John Riley for having an awesome tool which I
could get this info from. His tool - UAtester.py -
http://blog.c22.cc/toolsscripts/ua-tester/
Additional user agent strings came from -
http://www.useragentstring.com/pages/useragentstring.php

Args:
cycle_value (String): Which UA dict to retrieve

Returns:
Dict: Dictionary of user agents
"""

# "Normal" desktop user agents
desktop_uagents = {
"MSIE9.0": ("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;"
" Trident/5.0)"),
"MSIE8.0": ("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;"
"Trident/4.0)"),
"MSIE7.0": "Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)",
"MSIE6.0": ("Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;"
" .NET CLR 2.0.50727)"),
"Chrome32.0.1667.0": ("Mozilla/5.0 (Windows NT 6.2; Win64; x64)"
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0"
"Safari/537.36"),
"Chrome31.0.1650.16": ("Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36"
" (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36"),
"Firefox25": ("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0)"
" Gecko/20100101 Firefox/25.0"),
"Firefox24": ("Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0)"
" Gecko/20100101 Firefox/24.0,"),
"Opera12.14": ("Opera/9.80 (Windows NT 6.0) Presto/2.12.388"
" Version/12.14"),
"Opera12": ("Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168"
" Version/12.00"),
"Safari5.1.7": ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8)"
" AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"),
"Safari5.0": ("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)"
" AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0 Safari/533.16")
}

# Miscellaneous user agents
misc_uagents = {
"wget1.9.1": "Wget/1.9.1",
"curl7.9.8": ("curl/7.9.8 (i686-pc-linux-gnu) libcurl 7.9.8"
" (OpenSSL 0.9.6b) (ipv6 enabled)"),
"PyCurl7.23.1": "PycURL/7.23.1",
"Pythonurllib3.1": "Python-urllib/3.1"
}

# Bot crawler user agents
crawler_uagents = {
"Baiduspider": "Baiduspider+(+http://www.baidu.com/search/spider.htm)",
"Bingbot": ("Mozilla/5.0 (compatible;"
" bingbot/2.0 +http://www.bing.com/bingbot.htm)"),
"Googlebot2.1": "Googlebot/2.1 (+http://www.googlebot.com/bot.html)",
"MSNBot2.1": "msnbot/2.1",
"YahooSlurp!": ("Mozilla/5.0 (compatible; Yahoo! Slurp;"
" http://help.yahoo.com/help/us/ysearch/slurp)")
}

# Random mobile User agents
mobile_uagents = {
"BlackBerry": ("Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en)"
" AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile"
" Safari/534.11+"),
"Android": ("Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision"
" Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0"
" Mobile Safari/533.1"),
"IEMobile9.0": ("Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS"
" 7.5; Trident/5.0; IEMobile/9.0)"),
"OperaMobile12.02": ("Opera/12.02 (Android 4.1; Linux; Opera"
" Mobi/ADR-1111101157; U; en-US) Presto/2.9.201 Version/12.02"),
"iPadSafari6.0": ("Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X)"
" AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d"
" Safari/8536.25"),
"iPhoneSafari7.0.6": ("Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_6 like"
" Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0"
" Mobile/11B651 Safari/9537.53")
}

# Web App Vuln Scanning user agents (give me more if you have any)
scanner_uagents = {
"w3af": "w3af.org",
"skipfish": "Mozilla/5.0 SF/2.10b",
"HTTrack": "Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)",
"nikto": "Mozilla/5.00 (Nikto/2.1.5) (Evasions:None) (Test:map_codes)"
}

# Combine all user agents into a single dictionary
all_combined_uagents = dict(desktop_uagents.items() + misc_uagents.items()
+ crawler_uagents.items() +
mobile_uagents.items())

cycle_value = cycle_value.lower()

if cycle_value == "browser":
return desktop_uagents
elif cycle_value == "misc":
return misc_uagents
elif cycle_value == "crawler":
return crawler_uagents
elif cycle_value == "mobile":
return mobile_uagents
elif cycle_value == "scanner":
return scanner_uagents
elif cycle_value == "all":
return all_combined_uagents
else:
print("[*] Error: You did not provide the type of user agents\
to cycle through!".replace(' ', ''))
print("[*] Error: Defaulting to desktop browser user agents.")
return desktop_uagents


def title_screen(cli_parsed):
"""Prints the title screen for EyeWitness
"""
Expand Down