Skip to content

Commit

Permalink
There is still more to do. working on how to fix with linter,
Browse files Browse the repository at this point in the history
  • Loading branch information
jweezy24 committed Sep 27, 2024
1 parent d263345 commit d52fed5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import hmac
import os
import shlex

from pathlib import Path
from sys import platform

Expand Down
2 changes: 1 addition & 1 deletion parse_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def parse_dump_file(self, fname) -> dict:
elif line.startswith("DUMP OF SETTINGS"): # Setting
setting = "settings_" + line.strip().rsplit(" ", 1)[1]
content = self._extract_info_lines(fp)
settings_d = dict(l.split("=", 1) for l in content if "=" in l)
settings_d = dict(line.split("=", 1) for line in content if "=" in line)
d[setting] = settings_d
else:
if not line:
Expand Down
18 changes: 11 additions & 7 deletions phone_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import shlex
import sqlite3
import sys
from collections import defaultdict
from datetime import datetime

import pandas as pd

import blocklist
import config
import parse_dump

import pandas as pd

from collections import defaultdict
from datetime import datetime
from android_permissions import all_permissions
from runcmd import catch_err, run_command

Expand Down Expand Up @@ -595,7 +595,11 @@ def _is_device(x):
cmd = "{}idevice_id -l | tail -n 1".format(self.cli)
self.serialno = None
s = catch_err(run_command(cmd), cmd=cmd, msg="")
d = [l.strip() for l in s.split("\n") if l.strip() and _is_device(l.strip())]
d = [
line.strip()
for line in s.split("\n")
if line.strip() and _is_device(line.strip())
]
print("Devices found:", d)
return d

Expand Down Expand Up @@ -674,7 +678,7 @@ def isrooted(self, serial):
except FileNotFoundError:
print("Couldn't find Jailbroken FS check log.")
# TODO: trigger error message? like
# TODO: show a try again, maybe it's not plugged in properly. still not working?
# TODO: show a try again, maybe it's not plugged in properly. still not working?
# this could be due to many many many reasons.
# return (True, ['FS check failed, jailbreak not necessarily occurring.'])

Expand Down

0 comments on commit d52fed5

Please sign in to comment.