Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
IPchkExt.h
Package: warftpd.zip [view]
Upload User: surprise9
Upload Date: 2007-01-04
Package Size: 426k
Code Size: 2k
Category:
Ftp Client
Development Platform:
Visual C++
- // IPchkExt.h
- class CIPchkExt;
- // List of connections to watch over
- class CIPConnList
- {
- private:
- CIPConnList(LPCSTR Name);
- public:
- ~CIPConnList();
- static BOOL VerifyConnection(CSock *pSock, CIPConnList **ppConn);
- static CIPConnList *Find(LPCSTR Name);
- static CIPConnList *Find(CSock *pSock, CString& Name);
- static void KillAll(CIPchkExt *pExt);
- BOOL IsBanned(USER User, CSock *pSock);
- CString m_Name; // IP name as 127.0.0.1
- int m_BadPwdCnt; // Bad password count
- CWarTimer m_Expiry; // Time to forget this node
- DWORD m_ExpiryVal;
- CWarTimer m_Suspend; // Suspended until...
- DWORD m_SuspendVal;
- BOOL m_IsHacker; // Marked as hacker!
- };
- class CIPchkSock : public CSocketAPI
- {
- public:
- int OnConnect(int Event, WPARAM wParam, LPARAM lParam);
- int OnVerifyIPAddress(int Event, WPARAM wParam, LPARAM lParam);
- int OnBadPassword(int Event, WPARAM wParam, LPARAM lParam);
- int OnHasLoggedOn(int Event, WPARAM wParam, LPARAM lParam);
- int OnVerifyLogin(int Event, WPARAM wParam, LPARAM lParam);
- int m_SessionBadPwdCnt; // Bad password count this session
- };
- class CIPchkExt : public CDaemonAPI
- {
- public:
- CIPchkExt();
- ~CIPchkExt();
- void LogMsg(int flag, LPCSTR Format, ...);
- virtual void InitializeCOptions(); // Required function
- int OnVerifyIPAddress(int Event = 0, WPARAM wParam = 0, LPARAM lParam = 0);
- // COptions variables
- int m_ConnectionDelay; // Delay in minutes before a user can connect again
- int m_MaxPasswdRetries; // Max passord retries before kick
- int m_PasswdRetryDelay; // Delay in minutes before new connection after n bad passwords
- int m_MaxPasswdHacks; // Max bad passwords before we consider thsi a hacking attempt
- int m_HackDely; // Delay (in hours) before a IP is opened after a hack attempt
- CLinkedList m_History; // CIPConnList
- };
- BOOL IPVerifyRule(LPCSTR Rule,int **IPmask);
- BOOL IPGenericIsIpInList(LPCSTR IPaddess,CString &cList);
- void TranslateList(CString &Val);