def tools_binscope():
 mobsf_subdir_tools = CONFIG['MobSF']['tools']
 binscope_path = (mobsf_subdir_tools + 'BinScope')
 if platform.machine().endswith('64'):
  binscope_url = CONFIG['binscope']['url_x64']
  binscope_installer_path = (binscope_path + '\\BinScope_x64.msi')
 else:
  binscope_url = CONFIG['binscope']['url_x86']
  binscope_installer_path = (binscope_path + '\\BinScope_x86.msi')
 if (not os.path.exists(binscope_path)):
  os.makedirs(binscope_path)
 binscope_installer_file = open(binscope_installer_path, 'wb')
 print '[*] Downloading BinScope..'
 binscope_installer = urlrequest.urlopen(binscope_url)
 print '[*] Saving to File {}'.format(binscope_installer_path)
 binscope_installer_file.write(bytes(binscope_installer.read()))
 binscope_installer_file.close()
 print '[*] Installing BinScope to {}'.format(binscope_path)
 os.system(((((((('msiexec' + ' INSTALLLOCATION="') + binscope_path) + '" ') + '/i "') + binscope_installer_path) + '" ') + '/passive'))
 CONFIG['binscope']['file'] = (binscope_path + '\\Binscope.exe')
 with open(os.path.join(CONFIG_PATH, CONFIG_FILE), 'w') as configfile:
  CONFIG.write(configfile)

def tools_binscope ( ) : mobsf_subdir_tools = CONFIG [ 'MobSF' ] [ 'tools' ] binscope_path = ( mobsf_subdir_tools + 'BinScope' ) if platform . machine ( ) . endswith ( '64' ) : binscope_url = CONFIG [ 'binscope' ] [ 'url_x64' ] binscope_installer_path = ( binscope_path + '\\BinScope_x64.msi' ) else : binscope_url = CONFIG [ 'binscope' ] [ 'url_x86' ] binscope_installer_path = ( binscope_path + '\\BinScope_x86.msi' ) if ( not os . path . exists ( binscope_path ) ) : os . makedirs ( binscope_path ) binscope_installer_file = open ( binscope_installer_path , 'wb' ) print '[*] Downloading BinScope..' binscope_installer = urlrequest . urlopen ( binscope_url ) print '[*] Saving to File {}' . format ( binscope_installer_path ) binscope_installer_file . write ( bytes ( binscope_installer . read ( ) ) ) binscope_installer_file . close ( ) print '[*] Installing BinScope to {}' . format ( binscope_path ) os . system ( ( ( ( ( ( ( ( 'msiexec' + ' INSTALLLOCATION="' ) + binscope_path ) + '" ' ) + '/i "' ) + binscope_installer_path ) + '" ' ) + '/passive' ) ) CONFIG [ 'binscope' ] [ 'file' ] = ( binscope_path + '\\Binscope.exe' ) with open ( os . path . join ( CONFIG_PATH , CONFIG_FILE ) , 'w' ) as configfile : CONFIG . write ( configfile )
download and install binscope for mobsf .