这里使用的开发环境是vs2010,不过几乎所有的设置在早期版本的vs中基本是一致的。启动vs之后关闭其他的项目和解决方案,然后按照下面的流程创作工程即可。
- 执行菜单的File->New->Project… (Ctrl-Shift-N)打开新建工程窗口。
- 展开左侧的Visual C++项目模板分支,然后选择右侧的Win32 Project条目,输入工程名称,然后点击确定。
这里使用的开发环境是vs2010,不过几乎所有的设置在早期版本的vs中基本是一致的。启动vs之后关闭其他的项目和解决方案,然后按照下面的流程创作工程即可。
C/C++ 代码:
void ExecutCmd()
{
SECURITY_ATTRIBUTES sa;
HANDLE hRead,hWrite;
wchar_t * lpCommandLine =_T("ping.exe www.h4ck.org.cn ");
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;
TCHAR temp[255] = {0};
_tcscpy(temp,lpCommandLine);
if (!CreatePipe(&hRead,&hWrite,&sa,0)) {
MessageBox(_T("Error On CreatePipe()"));
return;
}
STARTUPINFO si;
PROCESS_INFORMATION pi;
si.cb = sizeof(STARTUPINFO);
GetStartupInfo(&si);
si.hStdError = hWrite;
si.hStdOutput = hWrite;
si.wShowWindow = SW_HIDE;
si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
if (!CreateProcess(NULL,temp
,NULL,NULL,TRUE,NULL,NULL,NULL,&si,&pi)) {
MessageBox(_T("Error on CreateProcess()"));
return;
}
CloseHandle(hWrite);
char buffer[4096] = {0};
DWORD bytesRead;
while (true) {
if (ReadFile(hRead,buffer,0x3FFu,&bytesRead,NULL) == NULL)
break;
outputstr += buffer;//m_outputstr is CString
OutputDebugString(outputstr);
UpdateData(false);
Sleep(200);
}
}
A shadowy freedom fighter known only as “V” uses terrorist tactics to fight against his totalitarian society.
看国外的电影也罢,电视剧也罢。很少能看到使用Windows的电脑,并且往往界面也是以深蓝色或者绿色为主,个人认为这么选择是因为黑客本身对蓝色和绿色更钟情,并且这种颜色可以给人更好的感觉,也跟有科技的意境。
Scylla – x64/x86 Imports Reconstruction
=======================================
ImpREC, CHimpREC, Imports Fixer… this are all great tools to rebuild an import table,
but they all have some major disadvantages, so I decided to create my own tool for this job.
If you’re playing Modern Warfare 3 on PC and have been playing through the campaign, there’s a good chance you encountered the “reliable command buffer overflow” error in the mission Goalpost. It sucks, doesn’t it? Well, one helpful Call of Duty forum member has figured out how to avoid this error. He said this: