# Path: androguard/core/androconf.py
# ANDROGUARD_VERSION = __version__
# CONF = Configuration()
#     R = color[1:3]
#     G = color[3:5]
#     B = color[5:7]
#     R = int(R, 16)
#     G = int(G, 16)
#     B = int(B, 16)
#     R = startcolor[0]
#     G = startcolor[1]
#     B = startcolor[2]
# class InvalidResourceError(Exception):
# class Configuration:
# def is_ascii_problem(s):
#     def __init__(self):
#     def __getattr__(self, item):
#     def __getitem__(self, item):
#     def __setitem__(self, key, value):
#     def __str__(self):
#     def __repr__(self):
# def is_android(filename):
# def is_android_raw(raw):
# def show_logging(level=logging.INFO):
# def set_options(key, value):
# def rrmdir(directory):
# def make_color_tuple(color):
# def interpolate_tuple(startcolor, goalcolor, steps):
# def color_range(startcolor, goalcolor, steps):
# def load_api_specific_resource_module(resource_name, api=None):


import sys, os
import hashlib, urllib, urllib2, json
    import requests
        import traceback
        import traceback
from optparse import OptionParser
from androguard.core import androconf
            method[1] = hashlib.sha256(f).hexdigest()    
        parameters = {"resource": method[1], "apikey": api_key}

    data = urllib.urlencode(parameters)
    req = urllib2.Request(url, data)
    try:
        response = urllib2.urlopen(req)
        xjson = response.read()
        getResponse(xjson, method[0])
        
    except urllib2.HTTPError, e:
        handleHTTPErros(e.code)
    except urllib2.URLError, e:
        print 'URLError: ' + str(e.reason)
    except Exception:
        print 'generic exception: ' + traceback.format_exc()

# prints response message according to method
def getResponse( xjson, method ):
    response_code = json.loads(xjson).get('response_code')
    verbose_msg = json.loads(xjson).get('verbose_msg')
    if method == "comments/put":
        print verbose_msg

    elif method == "file/report":
        if response_code == 1:
            printScanResults(xjson)
        else:
            print verbose_msg


# Path: androguard/core/androconf.py
# ANDROGUARD_VERSION = __version__
# CONF = Configuration()
#     R = color[1:3]
#     G = color[3:5]
#     B = color[5:7]
#     R = int(R, 16)
#     G = int(G, 16)
#     B = int(B, 16)
#     R = startcolor[0]
#     G = startcolor[1]
#     B = startcolor[2]
# class InvalidResourceError(Exception):
# class Configuration:
# def is_ascii_problem(s):
#     def __init__(self):
#     def __getattr__(self, item):
#     def __getitem__(self, item):
#     def __setitem__(self, key, value):
#     def __str__(self):
#     def __repr__(self):
# def is_android(filename):
# def is_android_raw(raw):
# def show_logging(level=logging.INFO):
# def set_options(key, value):
# def rrmdir(directory):
# def make_color_tuple(color):
# def interpolate_tuple(startcolor, goalcolor, steps):
# def color_range(startcolor, goalcolor, steps):
# def load_api_specific_resource_module(resource_name, api=None):


# Path: tools/andrototal.py
import sys, os
import hashlib, urllib, urllib2, json
    import requests
        import traceback
        import traceback
from optparse import OptionParser
from androguard.core import androconf

            method[1] = hashlib.sha256(f).hexdigest()    
        parameters = {"resource": method[1], "apikey": api_key}

    data = urllib.urlencode(parameters)
    req = urllib2.Request(url, data)
    try:
        response = urllib2.urlopen(req)
        xjson = response.read()
        getResponse(xjson, method[0])
        
    except urllib2.HTTPError, e:
        handleHTTPErros(e.code)
    except urllib2.URLError, e:
        print 'URLError: ' + str(e.reason)
    except Exception:
        print 'generic exception: ' + traceback.format_exc()

# prints response message according to method
def getResponse( xjson, method ):
    response_code = json.loads(xjson).get('response_code')
    verbose_msg = json.loads(xjson).get('verbose_msg')
    if method == "comments/put":
        print verbose_msg

    elif method == "file/report":
        if response_code == 1:
            printScanResults(xjson)
        else:
            print verbose_msg


    else: # method == "file/rescan"