![]() |
CSpoofSocket | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: SpoofSocket.h |
Copyright (c) 2000 Barak Weichselbaum <barak@komodia.com> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Contact info: Site: http://www.komodia.com Email: barak@komodia.com
![]() |
sockaddr_in | m_ConnectedTo | Remote address we are conencted to |
![]() |
CIPOptions * | m_IPOptions | Our options |
![]() |
BOOL | m_Options | Do we have options |
![]() |
unsigned char | m_Protocol | The protocol |
![]() |
BOOL | m_Raw | Are we raw ? |
![]() |
LPCSTR | m_SourceAddress | Our source address |
![]() |
SOCKET | m_SpoofSocket | The actual socket handle |
![]() |
unsigned char | m_TTL | Time to live |
![]() |
CSpoofSocket( SOCKET sok ) |
Attach to a socket by constructor | |
![]() |
ctor and dtor |
![]() |
virtual |
![]() |
void | AssignSocket( SOCKET sok, unsigned char ucProtocol=IPPROTO_TCP ) |
Attach to a socket |
![]() |
virtual BOOL | Bind( LPCSTR lpSourceAddress, int iPort=0 ) |
Bind to a specific address |
![]() |
unsigned short | CalculateChecksum( unsigned short* usBuf, int iSize ) |
Calculate the data checksum |
![]() |
unsigned short | CalculatePseudoChecksum( char *buf, int BufLength, LPCSTR lpDestinationAddress, int iPacketLength ) |
Calculate the checksum for TCP and UDP |
![]() |
BOOL | Check this socket is valid | |
![]() |
virtual BOOL | Close() |
Close the socket |
![]() |
virtual LPIpHeader | ConstructIPHeader( unsigned char ucProtocol, unsigned short usFragmentationFlags, unsigned char ucTTL, unsigned short usIdentification, unsigned char ucHeaderLength ) |
Create an IP header |
![]() |
static LPIpHeader | ConstructStaticIPHeader( unsigned char ucProtocol, unsigned short usFragmentationFlags, unsigned char ucTTL, unsigned short usIdentification, unsigned char ucHeaderLength ) |
Create an IP header |
![]() |
BOOL | Create( int iProtocol ) |
Create a socket |
![]() |
virtual void | FinalIPHeader( LPIpHeader lpHead ) |
Last stop before sending the header |
![]() |
SOCKET | Get the socket handle | |
![]() |
CIPOptions * | Get the IP options | |
![]() |
long | Get the address of the remote connected system | |
![]() |
unsigned short | Get the port if the remote connected system | |
![]() |
virtual void | initialize all the private memebers | |
![]() |
BOOL | isRaw() |
Indication if we are a raw socket |
![]() |
sockaddr_in | pResolveDNS( LPCSTR lpAddress ) |
Reseolve DNS |
![]() |
virtual int | Receive( char* buf, int bufLen ) |
Recieve data from remote socket |
![]() |
long | ResolveDNS( LPCSTR lpAddress ) |
Resolve a DNS entry |
![]() |
virtual BOOL | Send( LPCSTR lpDestinationAddress, char* buf, int bufLength, unsigned short usDestinationPort=0 ) |
Send data to a socket |
![]() |
virtual void | SetIPHeaderAddress( LPIpHeader lpHead, LPCSTR lpSourceAddress, LPCSTR lpDestinationAddress ) |
Set the address in the IP header |
![]() |
void | SetOptions( BOOL bOptions ) |
Do we allow options on this socket ? |
![]() |
void | SetProtocol( int iProtocol ) |
Set the protocol we are working on |
![]() |
void | SetRaw( BOOL bRaw ) |
Are we a raw socket ? |
![]() |
void | SetSourceAddress( LPCSTR lpSourceAddress ) |
Set source address for spoofing |
![]() |
void | SetTTL( unsigned char ucTTL ) |
Set the packet Time to live |
![]() |
BOOL | Shutdown( SocketShutdown eHow ) |
Close one way of the socket (receive,send,both) |
![]() |
virtual BOOL | Sniff( BOOL bSniff ) |
Turn to be a sniffer socket |
![]() |
BOOL | ValidAddress( LPCSTR lpAddress ) |
Check if an address is valid |
![]() |
BOOL | Is our socket valid ? |
SpoofBase.h |
stdafx.h | for precompiled header directive |
SpoofSocket.h |
![]() |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 24 Apr 2001. |