2009年4月14日
摘要: #include "stdafx.h"#include <windows.h>#include <string>#include "stdio.h"#include <iostream>using namespace std;#define DEF_BUF_SIZE 1024// 用于存储注入模块DLL的路径全名char szDllPath[DEF_BUF_SIZE] = {0} ;// 使用远程线程向指定ID的进程注入模块BOOL InjectModuleToProcessById ( DWORD dwProcess 阅读全文
posted @ 2009-04-14 11:11 Yincheng 阅读(1283) 评论(0) 推荐(0) 编辑
摘要: 将过去的工程用VS2005打开的时候。你有可能会遇到一大堆的警告:warning C4996。比如:warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.原因是Visual C++ 2005使用了更加安全的run-time library routines。新的Security CRT functions(就是那些带有“_s”后缀 阅读全文
posted @ 2009-04-14 10:59 Yincheng 阅读(221) 评论(0) 推荐(0) 编辑
  2009年4月9日
摘要: #include <afxsock.h>#include<winsock2.h> #pragma comment(lib,"ws2_32.lib") #include <ras.h>#include <raserror.h>#pragma comment(lib, "rasapi32.lib")#include <WinInet.h>#pragma comment(lib, "WinInet.LIB")#include <Dlgs.h>#pragma commen 阅读全文
posted @ 2009-04-09 16:08 Yincheng 阅读(200) 评论(0) 推荐(0) 编辑
  2009年3月29日
摘要: 客户端#include <winsock2.h>#include <stdio.h>#include <stdlib.h> #pragma comment(lib,"ws2_32.lib")char SendMsg[256];/* The IP header */typedef struct iphdr {unsigned int h_len:4; //4位首部长度unsigned int version:4; //IP版本号,4表示IPV4unsigned char tos; //8位服务类型TOSunsigned short tota 阅读全文
posted @ 2009-03-29 18:42 Yincheng 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 发送#include <stdio.h>#include <winsock2.h>#pragma comment(lib, "ws2_32.lib")void main() {// 初始化 WSADATA wsaData; int iResult = WSAStartup( MAKEWORD(2,2), &wsaData ); if ( iResult != NO_ERROR ) printf("Error at WSAStartup()/n"); // 建立socket SOCKET server; server = s 阅读全文
posted @ 2009-03-29 18:40 Yincheng 阅读(326) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <windows.h>int main(int argc,char *argv[]){MessageBox(NULL,"Hello",NULL,MB_OK);char temp[256];memset(temp,0,256);if(argc!=1){int length =strlen(argv[1]);char *ch=(char *)malloc(length);strcpy(ch,argv[1]);for(int i=0;i<length;i++,ch++){if(*ch==' 阅读全文
posted @ 2009-03-29 18:39 Yincheng 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include<windows.h>#include<stdio.h>int main(int argc,char *argv[]){HANDLE hMutex;DWORD dwErr;hMutex=CreateMutex(NULL,//无安全描述FALSE,//没有所有者 "HACK");//对象名if(hMutex==NULL)//hMutex为NULL标示创建失败{MessageBox(NULL,"CreateMutex error!",NULL,MB_OK);}else{dwErr=GetLastError();if(d 阅读全文
posted @ 2009-03-29 18:39 Yincheng 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #include <winsock2.h>#include <Ws2tcpip.h> #include <stdio.h>#pragma comment(lib,"ws2_32.lib")#define SEQ 0x28376839int threadnum,maxthread,port;char *DestIP;//目标IPvoid display(void) // 定义状态提示函数 { static int play=0;// 进度条 char *plays[12]= { " | ", " / " 阅读全文
posted @ 2009-03-29 18:37 Yincheng 阅读(296) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "xpktfilter.h"#include "xpktfilterDlg.h"#include "./xpktfilterdlg.h"#ifdef _DEBUG#define new DEBUG_NEW#endif#pragma comment(lib,"iphlpapi.lib")// CxpktfilterDlg 对话框CxpktfilterDlg::CxpktfilterDlg(CWnd* pParent /*=NULL*/): C 阅读全文
posted @ 2009-03-29 18:35 Yincheng 阅读(1705) 评论(0) 推荐(0) 编辑
摘要: #include <winsock2.h>#include <ws2tcpip.h>#include <stdio.h>#include <time.h>#include "mstcpip.h"#pragma comment(lib,"ws2_32.lib")#define SEQ 0x28376839SOCKET sockRaw = INVALID_SOCKET,sockListen = INVALID_SOCKET;struct sockaddr_in dest;BOOL ScanOK=FALSE;ch 阅读全文
posted @ 2009-03-29 18:33 Yincheng 阅读(368) 评论(0) 推荐(0) 编辑