You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
718 lines
16 KiB
718 lines
16 KiB
/*++=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
Copyright (c) 2000 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
w3spoof.idl
|
|
|
|
Abstract:
|
|
|
|
Interface definitions for the w3spoof object model.
|
|
|
|
Author:
|
|
|
|
Paul M Midgen (pmidge) 11-July-2000
|
|
|
|
|
|
Revision History:
|
|
|
|
11-July-2000 pmidge
|
|
Created
|
|
|
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--*/
|
|
|
|
#include "..\inc\dispids.h"
|
|
|
|
//
|
|
// forward declarations
|
|
//
|
|
|
|
interface IW3SpoofClientSupport;
|
|
interface ISession;
|
|
interface ISocket;
|
|
interface IRequest;
|
|
interface IResponse;
|
|
interface IEntity;
|
|
interface IHeaders;
|
|
interface IUrl;
|
|
|
|
//
|
|
// library block
|
|
//
|
|
|
|
[
|
|
uuid(a455dd41-5bae-4539-8b5a-2ad6bea97d9d),
|
|
helpstring("W3Spoof 1.0 Type Library"),
|
|
lcid(0x0000),
|
|
version(1.0)
|
|
]
|
|
library W3Spoof
|
|
{
|
|
import "ocidl.idl";
|
|
importlib("stdole2.tlb");
|
|
|
|
[
|
|
uuid(c75f2c74-75c4-4fac-8c49-0b98e36ac04b),
|
|
appobject,
|
|
helpstring("W3Spoof class.")
|
|
]
|
|
coclass W3Spoof
|
|
{
|
|
[default] interface IW3SpoofClientSupport;
|
|
};
|
|
|
|
[
|
|
uuid(d75ebe11-94f9-401e-898d-e904a0dbc7c6),
|
|
helpstring("Session class.")
|
|
]
|
|
coclass Session
|
|
{
|
|
[default] interface ISession;
|
|
};
|
|
|
|
[
|
|
uuid(d68ab483-5bdb-423c-bd22-6d12cd5e2865),
|
|
helpstring("Socket class.")
|
|
]
|
|
coclass Socket
|
|
{
|
|
[default] interface ISocket;
|
|
};
|
|
|
|
[
|
|
uuid(b77522f4-d78f-47a2-a993-9cf739d0c83d),
|
|
helpstring("Headers class.")
|
|
]
|
|
coclass Headers
|
|
{
|
|
[default] interface IHeaders;
|
|
};
|
|
|
|
[
|
|
uuid(0b427701-2ef8-4d84-a32c-4251d9f0942b),
|
|
helpstring("Entity class.")
|
|
]
|
|
coclass Entity
|
|
{
|
|
[default] interface IEntity;
|
|
};
|
|
|
|
[
|
|
uuid(21a6a4f0-4be9-4479-acc2-95dde32b80cd),
|
|
helpstring("Url class.")
|
|
]
|
|
coclass Url
|
|
{
|
|
[default] interface IUrl;
|
|
};
|
|
|
|
[
|
|
uuid(452bde60-1ba4-4182-b312-c912ff7168a1),
|
|
helpstring("Request class.")
|
|
]
|
|
coclass Request
|
|
{
|
|
[default] interface IRequest;
|
|
};
|
|
|
|
[
|
|
uuid(fc82c331-051f-44c6-bc09-06dd301ee6c9),
|
|
helpstring("Response class.")
|
|
]
|
|
coclass Response
|
|
{
|
|
[default] interface IResponse;
|
|
};
|
|
}
|
|
|
|
//
|
|
// interface definitions
|
|
//
|
|
|
|
//======================== W3SPOOF ========================
|
|
[
|
|
object,
|
|
uuid(d9bfddc0-1b08-4363-befa-cd8bd3fefbcd),
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IW3SpoofClientSupport interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IW3SpoofClientSupport : IDispatch
|
|
{
|
|
[
|
|
id(DISPID_W3SPOOF_REGISTERCLIENT),
|
|
helpstring("Create a client to script mapping.")
|
|
]
|
|
HRESULT RegisterClient(
|
|
[in] BSTR Client,
|
|
[in] BSTR ScriptPath
|
|
);
|
|
|
|
[
|
|
id(DISPID_W3SPOOF_REVOKECLIENT),
|
|
helpstring("Revokes a client to script mapping.")
|
|
]
|
|
HRESULT RevokeClient(
|
|
[in] BSTR Client
|
|
);
|
|
};
|
|
//=========================================================
|
|
|
|
//======================= ISESSION ========================
|
|
[
|
|
object,
|
|
uuid(b1ba6a09-e7f5-4c7a-bef8-b9d8bb0d2253),
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("ISession interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface ISession : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_SESSION_SOCKET),
|
|
helpstring("Accesses the session socket object.")
|
|
]
|
|
HRESULT Socket([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SESSION_REQUEST),
|
|
helpstring("Accesses the session request object.")
|
|
]
|
|
HRESULT Request([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SESSION_RESPONSE),
|
|
helpstring("Accesses the session response object.")
|
|
]
|
|
HRESULT Response([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
id(DISPID_SESSION_GETPROPERTYBAG),
|
|
helpstring("Gets or creates a property bag associated with the current client.")
|
|
]
|
|
HRESULT GetPropertyBag(
|
|
[in, optional] VARIANT Name,
|
|
[out, retval] IDispatch** ppdisp
|
|
);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SESSION_KEEPALIVE),
|
|
helpstring("Gets the keep-alive status of the session.")
|
|
]
|
|
HRESULT KeepAlive(
|
|
[out, retval] VARIANT* IsKA
|
|
);
|
|
};
|
|
//=========================================================
|
|
|
|
//======================== ISocket ========================
|
|
[
|
|
object,
|
|
uuid(5abe466a-fbc7-40fe-9372-cd5c6e901ff8),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("ISocket interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface ISocket : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_PARENT),
|
|
helpstring("Accesses the socket parent object.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
id(DISPID_SOCKET_SEND),
|
|
helpstring("Raw data send method.")
|
|
]
|
|
HRESULT Send([in] VARIANT Data);
|
|
|
|
[
|
|
id(DISPID_SOCKET_RECV),
|
|
helpstring("Raw data receive method.")
|
|
]
|
|
HRESULT Recv([out, retval] VARIANT* Data);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_OPTION),
|
|
helpstring("Gets the value of a send option.")
|
|
]
|
|
HRESULT Option(
|
|
[in] BSTR Option,
|
|
[out, retval] VARIANT* Value
|
|
);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_SOCKET_OPTION),
|
|
helpstring("Sets the value of a send option.")
|
|
]
|
|
HRESULT Option(
|
|
[in] BSTR Option,
|
|
[in] VARIANT Value
|
|
);
|
|
|
|
[
|
|
id(DISPID_SOCKET_CLOSE),
|
|
helpstring("Closes the connection.")
|
|
]
|
|
HRESULT Close([in, optional] VARIANT Method);
|
|
|
|
[
|
|
id(DISPID_SOCKET_RESOLVE),
|
|
helpstring("Resolves a host name to an IP address.")
|
|
]
|
|
HRESULT Resolve(
|
|
[in] BSTR Host,
|
|
[out, retval] BSTR* Address
|
|
);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_LOCALNAME),
|
|
helpstring("Gets the name of the machine running W3Spoof.")
|
|
]
|
|
HRESULT LocalName([out, retval] BSTR* Name);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_LOCALADDRESS),
|
|
helpstring("Gets the address of the machine running W3Spoof.")
|
|
]
|
|
HRESULT LocalAddress([out, retval] BSTR* Address);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_LOCALPORT),
|
|
helpstring("Gets the local port number of the connection.")
|
|
]
|
|
HRESULT LocalPort([out, retval] VARIANT* Port);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_REMOTENAME),
|
|
helpstring("Gets the name of the machine connected to W3Spoof.")
|
|
]
|
|
HRESULT RemoteName([out, retval] BSTR* Name);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_REMOTEADDRESS),
|
|
helpstring("Gets the address of the machine connected to W3Spoof.")
|
|
]
|
|
HRESULT RemoteAddress([out, retval] BSTR* Address);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_SOCKET_REMOTEPORT),
|
|
helpstring("Gets the remote port number of the connection.")
|
|
]
|
|
HRESULT RemotePort([out, retval] VARIANT* Port);
|
|
};
|
|
//=========================================================
|
|
|
|
//======================== IHeaders =======================
|
|
[
|
|
object,
|
|
uuid(ba3a1bb8-b785-4486-8d68-be7ee8cb14dc),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IHeaders interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IHeaders : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_HEADERS_PARENT),
|
|
helpstring("Accesses the headers parent object.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
id(DISPID_HEADERS_GET),
|
|
helpstring("Returns the raw header blob.")
|
|
]
|
|
HRESULT Get([out, retval] BSTR* Headers);
|
|
|
|
[
|
|
id(DISPID_HEADERS_SET),
|
|
helpstring("Sets a raw header blob.")
|
|
]
|
|
HRESULT Set([in, optional] VARIANT* Headers);
|
|
|
|
[
|
|
id(DISPID_HEADERS_GETHEADER),
|
|
helpstring("Gets a specific header value.")
|
|
]
|
|
HRESULT GetHeader(
|
|
[in] BSTR Header,
|
|
[out, retval] VARIANT* Value
|
|
);
|
|
|
|
[
|
|
id(DISPID_HEADERS_SETHEADER),
|
|
helpstring("Sets a specific header value.")
|
|
]
|
|
HRESULT SetHeader(
|
|
[in] BSTR Header,
|
|
[in, optional] VARIANT* Value
|
|
);
|
|
};
|
|
//=========================================================
|
|
|
|
//======================== IEntity ========================
|
|
[
|
|
object,
|
|
uuid(16359321-5182-4cf8-8d98-e90880722a23),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IEntity interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IEntity : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_ENTITY_PARENT),
|
|
helpstring("Accesses the entity parent object.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_ENTITY_LENGTH),
|
|
helpstring("Retrieves the length of the entity body.")
|
|
]
|
|
HRESULT Length([out, retval] VARIANT* Length);
|
|
|
|
[
|
|
id(DISPID_ENTITY_GET),
|
|
helpstring("Gets the entity body data.")
|
|
]
|
|
HRESULT Get([out, retval] VARIANT* Entity);
|
|
|
|
[
|
|
id(DISPID_ENTITY_SET),
|
|
helpstring("Sets the entity body data.")
|
|
]
|
|
HRESULT Set([in] VARIANT Entity);
|
|
|
|
[
|
|
id(DISPID_ENTITY_COMPRESS),
|
|
helpstring("Compresses the entity body.")
|
|
]
|
|
HRESULT Compress([in] BSTR Method);
|
|
|
|
[
|
|
id(DISPID_ENTITY_DECOMPRESS),
|
|
helpstring("Decompresses the entity body.")
|
|
]
|
|
HRESULT Decompress([in, optional] VARIANT Method);
|
|
};
|
|
//=========================================================
|
|
|
|
//========================== IUrl =========================
|
|
[
|
|
object,
|
|
uuid(bec9b392-d24d-4d40-b6bf-4af3dc6d1a74),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IUrl interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IUrl : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_URL_PARENT),
|
|
helpstring("Accesses the url parent object.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_ENCODING),
|
|
helpstring("Gets the url encoding.")
|
|
]
|
|
HRESULT Encoding([out, retval] BSTR* Encoding);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_SCHEME),
|
|
helpstring("Gets the url scheme.")
|
|
]
|
|
HRESULT Scheme([out, retval] BSTR* Scheme);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_SCHEME),
|
|
helpstring("Sets the url scheme.")
|
|
]
|
|
HRESULT Scheme([in] BSTR Scheme);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_SERVER),
|
|
helpstring("Gets the origin server name.")
|
|
]
|
|
HRESULT Server([out, retval] BSTR* Server);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_SERVER),
|
|
helpstring("Sets the origin server name.")
|
|
]
|
|
HRESULT Server([in] BSTR Server);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_PORT),
|
|
helpstring("Gets the origin server port number.")
|
|
]
|
|
HRESULT Port([out, retval] VARIANT* Port);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_PORT),
|
|
helpstring("Sets the origin server port number.")
|
|
]
|
|
HRESULT Port([in] VARIANT Port);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_PATH),
|
|
helpstring("Gets the url path.")
|
|
]
|
|
HRESULT Path([out, retval] BSTR* Path);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_PATH),
|
|
helpstring("Sets the url path.")
|
|
]
|
|
HRESULT Path([in] BSTR Path);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_RESOURCE),
|
|
helpstring("Gets the resource name.")
|
|
]
|
|
HRESULT Resource([out, retval] BSTR* Resource);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_RESOURCE),
|
|
helpstring("Sets the resource name.")
|
|
]
|
|
HRESULT Resource([in] BSTR Resource);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_QUERY),
|
|
helpstring("Gets the query portion of the url.")
|
|
]
|
|
HRESULT Query([out, retval] BSTR* Query);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_QUERY),
|
|
helpstring("Sets the query portion of the url.")
|
|
]
|
|
HRESULT Query([in] BSTR Query);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_URL_FRAGMENT),
|
|
helpstring("Gets the fragment portion of the url.")
|
|
]
|
|
HRESULT Fragment([out, retval] BSTR* Fragment);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_URL_FRAGMENT),
|
|
helpstring("Sets the fragment portion of the url.")
|
|
]
|
|
HRESULT Fragment([in] BSTR Fragment);
|
|
|
|
[
|
|
id(DISPID_URL_ESCAPE),
|
|
helpstring("Returns an escaped version of the url.")
|
|
]
|
|
HRESULT Escape([out, retval] BSTR* Url);
|
|
|
|
[
|
|
id(DISPID_URL_UNESCAPE),
|
|
helpstring("Returns an unescaped version of the url.")
|
|
]
|
|
HRESULT Unescape([out, retval] BSTR* Url);
|
|
|
|
[
|
|
id(DISPID_URL_SET),
|
|
helpstring("Overwrites the url string.")
|
|
]
|
|
HRESULT Set([in] BSTR Url);
|
|
|
|
[
|
|
id(DISPID_URL_GET),
|
|
helpstring("Retrieves the raw url string.")
|
|
]
|
|
HRESULT Get([out, retval] BSTR* Url);
|
|
|
|
};
|
|
//=========================================================
|
|
|
|
//======================== IRequest =======================
|
|
[
|
|
object,
|
|
uuid(94cbb886-d25b-49e3-848b-da5e54967502),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IRequest interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IRequest : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_PARENT),
|
|
helpstring("Accesses the request parent object.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_HEADERS),
|
|
helpstring("Returns the headers object.")
|
|
]
|
|
HRESULT Headers([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_ENTITY),
|
|
helpstring("Returns the entity object.")
|
|
]
|
|
HRESULT Entity([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_URL),
|
|
helpstring("Returns the url object.")
|
|
]
|
|
HRESULT Url([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_VERB),
|
|
helpstring("Returns the request verb.")
|
|
]
|
|
HRESULT Verb([out, retval] BSTR* Verb);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_REQUEST_HTTPVERSION),
|
|
helpstring("Returns the request HTTP version.")
|
|
]
|
|
HRESULT HttpVersion([out, retval] BSTR* HttpVersion);
|
|
};
|
|
//=========================================================
|
|
|
|
//======================= IResponse =======================
|
|
[
|
|
object,
|
|
uuid(2acf58df-8009-4499-b399-0800075a5c8a),
|
|
odl,
|
|
dual,
|
|
oleautomation,
|
|
nonextensible,
|
|
helpstring("IResponse interface"),
|
|
pointer_default(unique)
|
|
]
|
|
interface IResponse : IDispatch
|
|
{
|
|
[
|
|
propget,
|
|
id(DISPID_RESPONSE_PARENT),
|
|
helpstring("Accesses the response object parent.")
|
|
]
|
|
HRESULT Parent([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_RESPONSE_HEADERS),
|
|
helpstring("Gets the headers object.")
|
|
]
|
|
HRESULT Headers([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propputref,
|
|
id(DISPID_RESPONSE_HEADERS),
|
|
helpstring("Sets the headers object.")
|
|
]
|
|
HRESULT Headers([in] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_RESPONSE_ENTITY),
|
|
helpstring("Gets the entity object.")
|
|
]
|
|
HRESULT Entity([out, retval] IDispatch** ppdisp);
|
|
|
|
[
|
|
propputref,
|
|
id(DISPID_RESPONSE_ENTITY),
|
|
helpstring("Sets the entity object.")
|
|
]
|
|
HRESULT Entity([in] IDispatch** ppdisp);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_RESPONSE_STATUSCODE),
|
|
helpstring("Gets the response status code.")
|
|
]
|
|
HRESULT StatusCode([out, retval] VARIANT* Code);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_RESPONSE_STATUSCODE),
|
|
helpstring("Sets the response status code.")
|
|
]
|
|
HRESULT StatusCode([in] VARIANT StatusCode);
|
|
|
|
[
|
|
propget,
|
|
id(DISPID_RESPONSE_STATUSTEXT),
|
|
helpstring("Gets the response status text.")
|
|
]
|
|
HRESULT StatusText([out, retval] BSTR* StatusText);
|
|
|
|
[
|
|
propput,
|
|
id(DISPID_RESPONSE_STATUSTEXT),
|
|
helpstring("Sets the response status text.")
|
|
]
|
|
HRESULT StatusText([in] BSTR StatusText);
|
|
};
|
|
//=========================================================
|