Skip to content

Commit

Permalink
use biplist instead of plistlib (#719)
Browse files Browse the repository at this point in the history
* use biplist instead of plistlib

* format

* delete classes2-error.zip
  • Loading branch information
sydowma authored Sep 6, 2018
1 parent e136e05 commit d2f7c52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions StaticAnalyzer/views/ios/plist_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
import glob
import subprocess
import plistlib

from MobSF.utils import PrintException, isFileExists

from MobSF.utils import (
PrintException,
isFileExists
)
from biplist import (
readPlist,
writePlistToString
)

def convert_bin_xml(bin_xml_file):
"""Convert Binary XML to Readable XML"""
try:
plist_obj = plistlib.readPlist(bin_xml_file)
data = plistlib.writePlistToBytes(plist_obj)
with open(bin_xml_file, 'wb') as flip:
flip.write(data)
return data.decode("utf-8", "ignore")
except:
PrintException("[ERROR] Converting Binary XML to Readable XML")
plist_obj = readPlist(bin_xml_file)
data = writePlistToString(plist_obj)
return data


def __check_permissions(p_list):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ configparser==3.5.0
androguard==3.2.1
lxml==4.2.4
rsa==3.4.2
biplist==1.0.3
git+https://github.com/MobSF/CapFuzz.git

0 comments on commit d2f7c52

Please sign in to comment.