Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/passivex/CPassiveX.h
Views: 11766
/*1* This file is part of the Metasploit Exploit Framework2* and is subject to the same licenses and copyrights as3* the rest of this package.4*/5#ifndef _CPASSIVEX_H6#define _CPASSIVEX_H78#include <windows.h>9#include <atlbase.h>1011extern CComModule _Module;1213#include <atlcom.h>14#include <ocidl.h>1516#include "HttpTunnel.h"1718class ATL_NO_VTABLE CPassiveX :19public CComObjectRootEx<CComMultiThreadModel>,20public CComCoClass<CPassiveX, &CLSID_PassiveX>,21public CComControl<CPassiveX>,22public IOleObjectImpl<CPassiveX>,23public IOleControlImpl<CPassiveX>,24public IOleInPlaceActiveObjectImpl<CPassiveX>,25public IOleInPlaceObjectWindowlessImpl<CPassiveX>,26public IObjectWithSiteImpl<CPassiveX>,27public IProvideClassInfo2Impl<&CLSID_PassiveX, &DIID_PassiveXEvents, &LIBID_PassiveXCOM>,28public IConnectionPointContainerImpl<CPassiveX>,29public IDispatchImpl<IPassiveX, &IID_IPassiveX, &LIBID_PassiveXCOM>,30public IConnectionPointImpl<CPassiveX, &DIID_PassiveXEvents, CComDynamicUnkArray>,31public IPersistPropertyBagImpl<CPassiveX>,32public ISupportErrorInfo33{ public:34CPassiveX();35~CPassiveX();3637DECLARE_REGISTRY_RESOURCEID(IDR_PASSIVEX)38DECLARE_PROTECT_FINAL_CONSTRUCT()39BEGIN_COM_MAP(CPassiveX)40COM_INTERFACE_ENTRY(IPassiveX)41COM_INTERFACE_ENTRY(IDispatch)42COM_INTERFACE_ENTRY(ISupportErrorInfo)43COM_INTERFACE_ENTRY(IProvideClassInfo)44COM_INTERFACE_ENTRY(IProvideClassInfo2)45COM_INTERFACE_ENTRY(IObjectWithSite)46COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)47COM_INTERFACE_ENTRY(IOleInPlaceObject)48COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObject)49COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)50COM_INTERFACE_ENTRY(IOleControl)51COM_INTERFACE_ENTRY(IOleObject)52COM_INTERFACE_ENTRY(IPersistPropertyBag)53COM_INTERFACE_ENTRY(IConnectionPointContainer)54COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)55END_COM_MAP()5657// We are a singleton58DECLARE_CLASSFACTORY_SINGLETON(CPassiveX);5960// Messages61BEGIN_MSG_MAP(CPassiveX)62CHAIN_MSG_MAP(CComControl<CPassiveX>)63DEFAULT_REFLECTION_HANDLER()64END_MSG_MAP()6566// Connections67BEGIN_CONNECTION_POINT_MAP(CPassiveX)68CONNECTION_POINT_ENTRY(DIID_PassiveXEvents)69END_CONNECTION_POINT_MAP()7071// Properties72BEGIN_PROPERTY_MAP(CPassiveX)73PROP_ENTRY("HttpHost", PASSIVEX_PROPERTY_HTTP_HOST, CLSID_NULL)74PROP_ENTRY("HttpPort", PASSIVEX_PROPERTY_HTTP_PORT, CLSID_NULL)75PROP_ENTRY("HttpSid", PASSIVEX_PROPERTY_HTTP_SID, CLSID_NULL)76PROP_ENTRY("HttpUriBase", PASSIVEX_PROPERTY_HTTP_URI_BASE, CLSID_NULL)77PROP_ENTRY("DownloadSecondStage", PASSIVEX_PROPERTY_DOWNLOAD_SECOND_STAGE, CLSID_NULL)78END_PROPERTY_MAP()7980// ISupportErrorInfo81STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);8283// IPassiveX84STDMETHOD(get_HttpHost)(BSTR *Host);85STDMETHOD(put_HttpHost)(BSTR Host);86STDMETHOD(get_HttpSid)(BSTR *Sid);87STDMETHOD(put_HttpSid)(BSTR Sid);88STDMETHOD(get_HttpUriBase)(BSTR *UriBase);89STDMETHOD(put_HttpUriBase)(BSTR UriBase);90STDMETHOD(get_HttpPort)(ULONG *Port);91STDMETHOD(put_HttpPort)(ULONG Port);92STDMETHOD(get_DownloadSecondStage)(ULONG *Port);93STDMETHOD(put_DownloadSecondStage)(ULONG Port);9495#ifdef PXDEBUG96// Debug logging97static VOID Log(LPCTSTR fmt, ...);98#else99static VOID Log(LPCTSTR fmt, ...) { }100#endif101protected:102103VOID Initialize();104105VOID ResetExplorerZoneRestrictions();106107/**************108* Attributes *109**************/110111// Properties112CComBSTR PropHttpHost;113CComBSTR PropHttpSid;114CComBSTR PropHttpUriBase;115ULONG PropHttpPort;116117// Tunnel118HttpTunnel Tunnel;119};120121#endif122123124