03 2016 档案
摘要:import tkinter from tkinter import ttk root = tkinter.Tk() tree = ttk.Treeview(root, show="headings", columns=('col1','col2','col3')) tree.heading('col1', text='第一列') tree.heading('col2', text='...
阅读全文
摘要:import urllib.request import re url = 'http://stock.sohu.com/news/' html = urllib.request.urlopen(url).read() html = html.decode('GBK') pattern = re.compile("(.*?)",re.S) items = re.findall(pa...
阅读全文
摘要:// Win32.cpp : 定义应用程序的入口点。 // #include "stdafx.h" #include "Win32.h" void TRACE(LPCTSTR lpszFmt, ...);//调试信息 LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);//消息处理函...
阅读全文
摘要:void TRACE(LPCTSTR lpszFmt, ...) { va_list args; va_start(args, lpszFmt); int len = _vsctprintf(lpszFmt, args) + 1; TCHAR *lpszBuf = (TCHAR*)_alloca(len*sizeof(TCHAR));//栈中分配, 不需要释放 ...
阅读全文
摘要:/************************************************************************/ /* 功能:虚拟内存相对地址和文件偏移的转换 参数:stRVA: 虚拟内存相对偏移地址 lpFileBuf: 文件起始地址 返回:转换后的文件偏移地址 */ /*****************************************...
阅读全文
摘要:printf("数据目录信息:\n"); PIMAGE_DATA_DIRECTORY MyDataDir; MyDataDir = PIMAGE_DATA_DIRECTORY((&MyOptionalHeader->NumberOfRvaAndSizes + 1));//定位目录位置 for (int i = 0; i VirtualAddress); printf("%08x\...
阅读全文
摘要:在PE中,新增节,添加代码 一、先判断节表后是否有空闲位置,添加节表信息,必须多出两个节表位置,最后以零结尾。 二、新增节后,需要修改以下信息 1、添加一个新节,可以复制一份,最好是拥有可执行属性的节,如.text。 2、在节表区,新增节的后面,填充一个节,用零填充。 3、修改标准PE头中节的数量。
阅读全文
摘要:// mem.cpp : 定义控制台应用程序的入口点。 //PE文件从文件加载到内存,再从内存读取,然后存盘到文件 #include "stdafx.h" #include #include //#define PATH "C:\\Windows\\System32\\notepad.exe" #define PATH "C:\\Users\\Administrator\\Deskt...
阅读全文
摘要:// mem.cpp : 定义控制台应用程序的入口点。 //PE文件从文件加载到内存,再从内存读取,然后存盘到文件 #include "stdafx.h" #include #include #define PATH "C:\\Users\\Administrator\\Desktop\\MSG.exe" int Filelength(FILE *fp); int _tmain(int...
阅读全文
摘要:// PE.cpp : 定义控制台应用程序的入口点。 //DOS版PE工具制作 #include "stdafx.h" #include #include int filelength(FILE *fp); int _tmain(int argc, _TCHAR* argv[]) { FILE *Fp; int FpSize = 0; short e_lfanew = 0; f...
阅读全文
摘要://从一个文件中读取数据到内存,然后再把内存中的数据写入另外一个文件 #include "stdafx.h" #include int filelength(FILE *fp); int _tmain(int argc, _TCHAR* argv[]) { FILE *fp = NULL; FILE *fp2 = NULL; int FpSize = 0; fopen_s(&fp,...
阅读全文

浙公网安备 33010602011771号