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

Nick lupien nick lupien/fix fps manifest analysis #2484

Merged
merged 4 commits into from
Jan 23, 2025
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
12 changes: 6 additions & 6 deletions mobsf/MobSF/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

logger = logging.getLogger(__name__)

VERSION = '4.2.9'
VERSION = '4.3.0'
BANNER = r"""
__ __ _ ____ _____ _ _ ____
| \/ | ___ | |__/ ___|| ___|_ _| || | |___ \
| |\/| |/ _ \| '_ \___ \| |_ \ \ / / || |_ __) |
| | | | (_) | |_) |__) | _| \ V /|__ _| / __/
|_| |_|\___/|_.__/____/|_| \_/ |_|(_)_____|
__ __ _ ____ _____ _ _ _____
| \/ | ___ | |__/ ___|| ___|_ _| || | |___ /
| |\/| |/ _ \| '_ \___ \| |_ \ \ / / || |_ |_ \
| | | | (_) | |_) |__) | _| \ V /|__ _| ___) |
|_| |_|\___/|_.__/____/|_| \_/ |_|(_)____/
""" # noqa: W291
# ASCII Font: Standard

Expand Down
29 changes: 18 additions & 11 deletions mobsf/StaticAnalyzer/views/android/manifest_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,32 @@ def assetlinks_check(act_name, well_knowns):


def _check_url(host, w_url):
"""Check for the presence of Assetlinks URL."""
try:
iden = 'sha256_cert_fingerprints'
proxies, verify = upstream_proxy('https')
status = False
status_code = 0

r = requests.get(w_url,
timeout=5,
allow_redirects=False,
proxies=proxies,
verify=verify)
urls = {w_url}
if w_url.startswith('http://'):
# Upgrade http to https
urls.add(f'https://{w_url[7:]}')

status_code = r.status_code
if status_code == 302:
logger.warning('302 Redirect detected, skipping check')
status = False
if (str(status_code).startswith('2') and iden in str(r.json())):
status = True
for url in urls:
r = requests.get(url,
timeout=5,
allow_redirects=False,
proxies=proxies,
verify=verify)

status_code = r.status_code
if (str(status_code).startswith('2') and iden in str(r.json())):
status = True
break
if status_code in (301, 302):
logger.warning('Status Code: [%d], Redirecting to '
'a different URL, skipping check!', status_code)
return {'url': w_url,
'host': host,
'status_code': status_code,
Expand Down
Loading
Loading