Esempio n. 1
0
temp = simple_api_constant_counter("AF_INET", string_temp)

print temp


temp = simple_api_function_counter("socket", string_temp)

print temp
"""

fetchnetapps = fetchNetApps(applications)
fetchnetapps.download_apps()
fetchnetapps.decompress_apps()

dbhandle = dbHandle(constants, functions, structures, applications)

apps_in_analysis_db = dbhandle.apps_analysis_is_done()

search_engine = SearchEngine(all_socket_api)

#count all socket APIs under applications directory
apps_dir = os.path.join(os.environ['PWD'], 'applications')

#buggy Here
#for name in os.listdir(apps_dir):
for conf_name in applications:
    #check whether it is the right application download based on configuration file
    # FIX ME:  not try to get
    #for conf_name in applications:
    for name in os.listdir(apps_dir):
Esempio n. 2
0
#print reader.getItems('structures')

functions = reader.getItems('functions')
structures = reader.getItems('structures')
applications = reader.getItems('applications')

#print applications

#all = reader.getItems('functions') + reader.getItems('structures')
all = functions + structures

fetchnetapps = fetchNetApps(applications)
fetchnetapps.download_apps()
fetchnetapps.decompress_apps()

dbhandle = dbHandle(functions, structures, applications)
"""
reader.saveItemsDic('functions')
reader.saveItemsDic('structures')
dic = reader.getDicContainer()
#print dic['socket']
#print dic['bind']

print all
"""

search_engine = SearchEngine(all)
#search_engine.update_function_call_counters('socket', 4)
#search_engine.print_counts()

#string_temp = readFile('test.c')
Esempio n. 3
0
print temp


temp = simple_api_function_counter("socket", string_temp)

print temp
"""

fetchnetapps = fetchNetApps(applications)
fetchnetapps.download_apps()
fetchnetapps.decompress_apps()



dbhandle = dbHandle(constants, functions, structures, applications)

apps_in_analysis_db = dbhandle.apps_analysis_is_done()




search_engine = SearchEngine(all_socket_api)

#count all socket APIs under applications directory
apps_dir = os.path.join(os.environ['PWD'],'applications')


#buggy Here
#for name in os.listdir(apps_dir):
for conf_name in applications: