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
Function.h
Package: FireWall.rar [view]
Upload User: apgaozhao
Upload Date: 2022-04-17
Package Size: 69k
Code Size: 1k
Category:
Firewall-Security
Development Platform:
Visual C++
- #pragma once
- #include "stdafx.h"
- class CFunction
- {
- private:
- typedef struct _tagIpList
- {
- char Ip[20];
- string AllowPath;
- string DenyPath;
- }tagIpList;
- int SqlInjectKeyTimes;//提交的SQL关键字数超过此值拦截
- vector<tagIpList> IpList;
- HANDLE hLogFile;
- string Sql;
- HMODULE hModule;
- bool GetFilePath(char *Path,DWORD len);
- bool GetField(const string Text,const char *Field,int start,int end,string &value);
- bool InitIpList(const string text);
- bool IsUrlIn(string Path,const char *Url);//Path=...|...|... Url是否是Path中的其中一项
- bool CompareStr(const char *str1,const char *str2,int len);
- public:
- CFunction(HMODULE h);
- ~CFunction(void);
- bool IsAllowIpPath(const char *Ip,const char *Url);
- bool IsSqlInject(const char *QueryStr,OUT string &SqlStr);//true表示注入 SqlStr返回过滤的字符
- bool IsBaoKu(const char *Url);
- bool WriteLog(const char *Ip,const char *Text);
- };