其实这个代码现在网上已经可以随便下载到了,这里只是分享个种子。嘎嘎。
优酷视频地址获取工具 v1.0
User Agent Simulator v3.1
猛击此处下载! v3.1修正:
1.下载速度计算2.临时文件存放目录3.下载文件自动以服务器文件名保存
User Agent Simulator v3.0
InstrumentLab 5.0 For Delphi
Great looking user interfaces! for your DSP and control applications. The following images are a taste of what InstrumentLab has to offer.
Applications include: real time data monitoring, process control, signal analysis, digital signal analysis, video analysis, data visualization, visual instrumentation and more.
User Agent Simulator v2.0
很久之前写过一个浏览器的User Agent模拟工具,但是比较粗糙。没有进度,也没有单独的线程处理下载。在下载大文件的时候就卡死了。今天重新修改了一下,至于模拟User Agent干嘛就不用明说了吧?嘻嘻
VS2010 + IDASDK6.2搭建IDA Plugin开发环境
这里使用的开发环境是vs2010,不过几乎所有的设置在早期版本的vs中基本是一致的。启动vs之后关闭其他的项目和解决方案,然后按照下面的流程创作工程即可。
- 执行菜单的File->New->Project… (Ctrl-Shift-N)打开新建工程窗口。
- 展开左侧的Visual C++项目模板分支,然后选择右侧的Win32 Project条目,输入工程名称,然后点击确定。
C/C++/Delphi 调用命令并且显示执行结果
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);
}
}