コード例 #1
0
    def __init__(self, emu):

        super(Wininet, self).__init__(emu)

        self.funcs = {}
        self.data = {}
        self.win = None
        self.netman = netman.NetworkManager(config=emu.get_network_config())
        super(Wininet, self).__get_hook_attrs__(self)
コード例 #2
0
ファイル: netio.py プロジェクト: yashomer1994/speakeasy
    def __init__(self, emu):

        super(Netio, self).__init__(emu)

        self.funcs = {}
        self.data = {}
        self.win = None
        self.nt = None
        self.wsk_registrations = {}
        self.wsk_sockets = {}
        self.provider_npi = None

        self.win = wsk
        self.nt = nt

        self.netman = netman.NetworkManager(config=emu.get_network_config())

        super(Netio, self).__get_hook_attrs__(self)

        self.prov_disp = self.win.WSK_PROVIDER_DISPATCH(emu.get_ptr_size())
        self.prov_disp.Version = 0x100

        addr = emu.add_callback(Netio.name,
                                self.WskSocket.__apihook__[0])  # noqa
        self.prov_disp.WskSocket = addr
        addr = emu.add_callback(Netio.name,
                                self.WskSocketConnect.__apihook__[0])  # noqa
        self.prov_disp.WskSocketConnect = addr
        addr = emu.add_callback(Netio.name,
                                self.WskControlClient.__apihook__[0])  # noqa
        self.prov_disp.WskControlClient = addr
        addr = emu.add_callback(Netio.name,
                                self.WskGetAddressInfo.__apihook__[0])  # noqa
        self.prov_disp.WskGetAddressInfo = addr
        addr = emu.add_callback(Netio.name,
                                self.WskFreeAddressInfo.__apihook__[0])  # noqa
        self.prov_disp.WskFreeAddressInfo = addr
        addr = emu.add_callback(Netio.name, self.WskGetNameInfo.__apihook__[0])
        self.prov_disp.WskGetNameInfo = addr