上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 62 下一页
摘要: BOOL Crar2Dlg::FindProcess(CString ProcessName){ HANDLE handle=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); BOOL ret = FALSE; PROCESSENTRY32* info=new PROCESSENTRY32;//声明进程信息变量 info->dwSize=sizeof(PROCESSENTRY32); int i=0; if(Process32First(handle,info)) { if(GetLas... 阅读全文
posted @ 2012-08-26 09:01 瓜蛋 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 时间紧迫,直接上代码:得到电脑的默认打印机 TCHAR szBuffer[1024]={0}; DWORD length = 1024; int ret = ::GetDefaultPrinter(szBuffer,&length); if(ret == FALSE) ret = ::GetLastError(); else { SetDlgItemText(IDC_EDIT1,szBuffer); return; } if (ret == ERROR_INSUFFICIENT_BUFFER) { ... 阅读全文
posted @ 2012-08-24 23:17 瓜蛋 阅读(9624) 评论(0) 推荐(1) 编辑
摘要: 插入列 const int nColumnWidth=80; m_ListPrinter.InsertColumn(0,_T("PrinteName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter.InsertColumn(1,_T("ServerName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter.InsertColumn(2,_T("DriverName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter. 阅读全文
posted @ 2012-08-24 23:11 瓜蛋 阅读(2055) 评论(0) 推荐(0) 编辑
摘要: 本文大部分来自《windows核心编程》。 例1 通过使用终止处理程序可以防止过早的执行return语句。当return语句试图退出try块的时候,编译器会让finally代码在它。即编译器保证finally代码块在出try块的时候return之前执行。 者可以想知道,编译器是如何保证此功能的呢?原 阅读全文
posted @ 2012-08-01 19:56 瓜蛋 阅读(3387) 评论(0) 推荐(0) 编辑
摘要: 有些时候需要用程序检索网络上的数据,比如要取出特定网页上的特定文字等。。二话不说,直接上代码了效果:void __fastcall TFormMain::btn_1Click(TObject *Sender){ OutPutLog("正在获取网页数据...."); TMemoryStream *ms=new TMemoryStream; IdHTTP1->Get(g_Url,ms);//g_Url是网页网址 const int msSize=ms->Size; LPSTR lpBuf=new char[msSize]; ms->Position=0; .. 阅读全文
posted @ 2012-07-22 19:02 瓜蛋 阅读(1081) 评论(2) 推荐(0) 编辑
摘要: 一、 前言 前段学习反调试和vc,写了antidebug-tester,经常会收到message希望交流或索要实现代码,我都没有回复。其实代码已经在编程版提供了1个版本,另其多是vc内嵌asm写的,对cracker而言,只要反下就知道了。我想代码其实意义不是很大,重要的是理解和运用。 做个简单的总结,说明下实现原理和实现方法。也算回复了那些给我发Message的朋友。 部分代码和参考资料来源:1、<<脱壳的艺术>> hawking2、<<windows anti-debugger reference>> Angeljyt3、http://bbs. 阅读全文
posted @ 2012-07-02 16:46 瓜蛋 阅读(1411) 评论(0) 推荐(0) 编辑
摘要: IntroductionArrrgh! So you need to run your console app via a primary application, well ye've come to the right place. This article is intended for those who need to run one of those pesky little console applications without the console window popping up over your main app or worse popping up wh 阅读全文
posted @ 2012-06-29 13:57 瓜蛋 阅读(277) 评论(0) 推荐(0) 编辑
摘要: OverviewCProcessData is a template class that makes it easy to use data allocated in a different process, and is useful when making inter-process SendMessage/PostMessage calls.Example Scenario - 1Imagine that you are sending a DTM_SETSYSTEMTIME message to a Date/Time picker control in a different pr 阅读全文
posted @ 2012-06-29 13:48 瓜蛋 阅读(341) 评论(0) 推荐(0) 编辑
摘要: GAS中每个操作都是有一个字符的后缀,表明操作数的大小。C声明GAS后缀大小(字节)charb1shortw2(unsigned) int / long / char*l4floats4doublel8long doublet10/12注意:GAL使用后缀“l”同时表示4字节整数和8字节双精度浮点数,这不会产生歧义因为浮点数使用的是完全不同的指令和寄存器。操作数格式:格式操作数值名称样例(GAS = C语言)$ImmImm立即数寻址$1 = 1EaR[Ea]寄存器寻址%eax = eaxImmM[Imm]绝对寻址0x104 = *0x104(Ea)M[R[Ea]]间接寻址(%eax)= *ea 阅读全文
posted @ 2012-06-23 06:07 瓜蛋 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 最近一直研究一个对个人而言很有价值的一个LIB库的逆向。在今天下班后突然灵感闪现,这个断断续续逆了接近一周的核心管理类。终于在今天给逆完了。在最后一个函数里,碰到了之前基本没有用过的一条指令。(呵呵,高手见笑了!)当然光看单句的汇编指令,是没有办法看出具体的作用的,而且还很可能会认为原作者本来就是用汇编来实现的!呵呵,先不废话,先贴出反汇编代码一睹为快:mov dword ptr ,64h // int bxor eax,eax cmp dword ptr ,0 setg al sub eax,1 and eax,64h add eax,0C8h mov dword ... 阅读全文
posted @ 2012-06-23 06:03 瓜蛋 阅读(452) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 62 下一页