text stringlengths 1 93.6k |
|---|
self.lock.release()
|
time.sleep(0.001)
|
# Wait for any additional function requests to come in
|
self.status = ""
|
while (len(self.queue) == 0) and (not self.update_request) and self.run:
|
time.sleep(0.1)
|
def stop(self):
|
run = False
|
def find_instr(self, addr, exact_match = False):
|
self.lock.acquire()
|
for func in self.functions.values():
|
for block in func.blocks.values():
|
for instr in block.instrs:
|
if (exact_match and (addr == instr.addr)) or ((not exact_match) and (addr >= instr.addr) and (addr < (instr.addr + len(instr.opcode)))):
|
result = [func.entry, instr.addr]
|
self.lock.release()
|
return result
|
self.lock.release()
|
return [None, None]
|
def notify_data_write(self, data, ofs, contents):
|
self.lock.acquire()
|
# Update any functions containing the updated bytes
|
start = ofs
|
end = ofs + len(contents)
|
for func in self.functions.values():
|
added = False
|
for block in func.blocks.values():
|
for instr in block.instrs:
|
if (end > instr.addr) and (start < (instr.addr + len(instr.opcode))):
|
if func.entry not in self.queue:
|
self.queue += [func.entry]
|
added = True
|
break
|
if added:
|
break
|
self.lock.release()
|
def create_symbol(self, addr, name):
|
self.lock.acquire()
|
self.exe.create_symbol(addr, name)
|
if addr in self.functions:
|
self.functions[addr].rename(name)
|
self.update_request = True
|
self.lock.release()
|
def undefine_symbol(self, addr, name):
|
self.lock.acquire()
|
self.exe.delete_symbol(addr, name)
|
if addr in self.functions:
|
self.functions[addr].rename("sub_%.8x" % addr)
|
self.update_request = True
|
self.lock.release()
|
def set_address_view(self, addr):
|
self.lock.acquire()
|
if addr:
|
self.options.add("address")
|
else:
|
self.options.remove("address")
|
self.update_request = True
|
self.lock.release()
|
def isPreferredForFile(data):
|
for type in ExeFormats:
|
exe = type(data)
|
if exe.valid:
|
return True
|
return False
|
isPreferredForFile = staticmethod(isPreferredForFile)
|
# <FILESEP>
|
# -*- coding: utf-8 -*-
|
"""
|
Created on Wed Jun 26 10:44:37 2019
|
@author: rulix
|
"""
|
import numpy as np
|
import tensorflow as tf
|
from layers.SoftDCCALayer import SoftDCCALayer
|
from layers.CorrFusion import CorrFusion
|
from losses import *
|
class model():
|
def __init__(self, inputs_shape=None):
|
# alternative network: vgg16, vgg19, densenet...
|
tf.reset_default_graph()
|
self.base_net_t1 = tf.keras.applications.VGG16
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.