|
[求助]怎么在自身程序生成其它程序?
把一个程序当成二进制资源导入到主程序中,然后利用 FindResource,SizeofResource,LoadResource,GlobalAlloc,LockResource等函数查找并且给这个二进制数据申请一个内存快,之后CreateFile和WriteFile创建这个程序就OK了。。 楼主所说的是不是木马的生成技术? 这里有篇文章,肯定对你有帮助: http://forum.eviloctal.com/read-htm-tid-26605.html |
|
判断一个文件是否存在用什么API函数?
.386 .model flat,stdcall Option casemap:none include windows.inc include user32.inc include kernel32.inc includelib user32.lib includelib kernel32.lib .data szFile db 'C:\test.exe',0 szCaption db '文件不存在!',0 szTitle db '文件存在!',0 .data? stFindFile WIN32_FIND_DATA <?> .code start: invoke FindFirstFile,addr szFile,addr stFindFile .if eax == INVALID_HANDLE_VALUE invoke MessageBox,NULL,addr szCaption,NULL,MB_OK .elseif invoke MessageBox,NULL,addr szTitle,NULL,MB_OK .endif invoke ExitProcess,eax end start |
|
[讨论]如何编程修改exe内存里的数据,并将结果保存到exe
Originally posted by 北极星2003 其实不用FlushViewOfFile也行吧, 调用MapViewOfFile后,如果可写,系统就自动保存貌似....我参考了一些代码,是这样解决的: CreateFile---CreateFileMapping--MapViewOfFile--然后调用: ModifyFile proc uses ebx esi edi,lpBufferAddress:LPSTR mov edi,lpBufferAddress ;得到内存地址 add edi,0010a0h ;得到要写入的地址 invoke lstrcpy,edi,addr szU ;修改edi地址处的内容为szU所保存的 xor edi,edi ;清空这个edi,免得物理内存地址重复 mov edi,lpBufferAddress ;重新得到内存地址 add edi,001a24h ;得到要另外的地址 invoke lstrcpy,edi,addr szUrl ;修改edi地址处的内容为szUrl所保存的 ret ModifyFile endp 其中的物理内存地址,是先用VC++编辑器查看要修改的字符串的内存地址,这样就可以通过修改szU或者szUrl的值来改变MessageBox里的参数内容了 |
|
[讨论]如何编程修改exe内存里的数据,并将结果保存到exe
顺便在问一下,win32汇编里有RtlZeroMemory,怎么就没有RtlCopyMemory.. 怎么用另外的方法来实现和RtlCopyMemory相同的功能? |
|
[讨论]如何编程修改exe内存里的数据,并将结果保存到exe
Originally posted by llydd 我是懂找到,但是不知道怎么修改 请赐教 |
|
[讨论]如何编程修改exe内存里的数据,并将结果保存到exe
Originally posted by 仙剑太郎 用UE谁不懂丫....主要是编程问题上实现 |
|
|
|
[求助]如何历遍电脑上的磁盘?
啃一下你发的代码,谢谢拉 |
|
求xp下屏蔽Ctrl_Alt_Del的delphi代码
- 如何屏蔽CTRL+ALT+DEL,ALT+TAB+CTRL+ESC这些键? invoke SystemParametersInfo,SPI_SCREENSAVERRUNNING,1,NULL,NULL ; Windows98 only 1 关闭 0 允许 |
|
杀死自己的进程再重新启动自己(delphi语句)
杀死自己,无非就是一个ExitProcess把自己退出去,然后另外一个再启动自己,代码: .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib kernel32.lib includelib user32.lib .data szFileName db '22222222.exe',0 .data? hSnapShot dd ? stProcess PROCESSENTRY32 <?> stStartUp STARTUPINFO <?> stProcInfo PROCESS_INFORMATION <?> hInstance dd ? hWinList dd ? .code ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Snapshot proc invoke RtlZeroMemory,addr stProcess,sizeof stProcess ;清空stProcess,不然进程会重叠 mov stProcess.dwSize,sizeof stProcess invoke CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,addr stProcess ;开始历遍快照 mov hSnapShot,eax ;保存到句柄中 invoke Process32First,hSnapShot,addr stProcess ;历遍第一个进程 .while eax invoke lstrcmp,addr szFileName,addr stProcess.szExeFile ;对比是否发现22222222.exe .if eax == NULL ;如果发现了,就调用_Snapshot1刷新快照 call _Snapshot1 .endif invoke Process32Next,hSnapShot,addr stProcess .endw call _Process ;如果没发现,就执行22222222.exe invoke ExitProcess,NULL ;一定要退出,不然会大量消耗CPU导致死机 _Snapshot endp ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Snapshot1 proc invoke RtlZeroMemory,addr stProcess,sizeof stProcess mov stProcess.dwSize,sizeof stProcess invoke CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,addr stProcess mov hSnapShot,eax invoke Process32First,hSnapShot,addr stProcess .while eax invoke lstrcmp,addr szFileName,addr stProcess.szExeFile ;刷新并开始对比是否发现22222222.exe .if eax == NULL ;如果发现 call _Snapshot ;重新刷新快照重复 .endif invoke Process32Next,hSnapShot,addr stProcess .endw call _Process ;如果没发现,就执行它,执行完毕,退出 invoke ExitProcess,NULL _Snapshot1 endp ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;开始调用CreateProcess创建22222222.exe ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Process proc invoke GetStartupInfo,addr stStartUp invoke CreateProcess,addr szFileName,NULL,NULL,NULL,NULL,\ NORMAL_PRIORITY_CLASS,NULL,NULL,addr stStartUp,addr stProcInfo ret _Process endp start: call _Snapshot ;程序一开始运行就要马上历遍快照 end start ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib kernel32.lib includelib user32.lib .data szFileName db '111111111.exe',0 .data? Pid dd ? hSnapShot dd ? stProcess PROCESSENTRY32 <?> stStartUp STARTUPINFO <?> stProcInfo PROCESS_INFORMATION <?> hInstance dd ? hWinList dd ? .code ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Snapshot proc invoke RtlZeroMemory,addr stProcess,sizeof stProcess mov stProcess.dwSize,sizeof stProcess invoke CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,addr stProcess mov hSnapShot,eax invoke Process32First,hSnapShot,addr stProcess .while eax invoke lstrcmp,addr szFileName,addr stProcess.szExeFile .if eax == NULL call _Snapshot1 .endif invoke Process32Next,hSnapShot,addr stProcess .endw call _Process invoke ExitProcess,NULL _Snapshot endp ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Snapshot1 proc invoke RtlZeroMemory,addr stProcess,sizeof stProcess mov stProcess.dwSize,sizeof stProcess invoke CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,addr stProcess mov hSnapShot,eax invoke Process32First,hSnapShot,addr stProcess .while eax invoke lstrcmp,addr szFileName,addr stProcess.szExeFile .if eax == NULL call _Snapshot .endif invoke Process32Next,hSnapShot,addr stProcess .endw call _Process invoke ExitProcess,NULL _Snapshot1 endp ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> _Process proc invoke GetStartupInfo,addr stStartUp invoke CreateProcess,addr szFileName,NULL,NULL,NULL,NULL,\ NORMAL_PRIORITY_CLASS,NULL,NULL,addr stStartUp,addr stProcInfo ret _Process endp ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start: call _Snapshot end start ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
|
|
|
[求助]如何读取一个文本文件的特定内容?
OK,已经搞定........我已经可以实现了,嘿嘿 |
|
杀死自己的进程再重新启动自己(delphi语句)
这个貌似就是相当于进程守护了 |
|
[求助]如何读取一个文本文件的特定内容?
发来看看...参考参考 |
|
[求助]如何读取一个文本文件的特定内容?
没人指导吗? 我写了一些,调式都头晕了 .386 .model flat,stdcall option casemap:none include windows.inc include kernel32.inc include user32.inc includelib kernel32.lib includelib user32.lib .data FileName db "C:\test.txt",0 lpBuffer db '心魔原来是酒魔',0 sz1 db '成功找到!',0 x_str db 256 dup(0) szjie db '结果是: %d',0 x_strlen DWORD 20 hSize dd ? .code start: _ifile proc local @hFile,@dwFileSize,@hMapFile,@lpMemory invoke CreateFile,addr FileName,GENERIC_READ,\ FILE_SHARE_READ or FILE_SHARE_WRITE,NULL,\ OPEN_EXISTING,FILE_ATTRIBUTE_ARCHIVE,NULL .if eax != INVALID_HANDLE_VALUE mov @hFile,eax invoke GetFileSize,eax,NULL mov @dwFileSize,eax .if eax invoke CreateFileMapping,@hFile,\ NULL,PAGE_READONLY,0,0,NULL .if eax mov @hMapFile,eax invoke MapViewOfFile,eax,\ FILE_MAP_READ,0,0,0 .if eax mov @lpMemory,eax invoke lstrlen,addr FileName mov hSize,eax invoke ReadFile ,@lpMemory, addr x_str ,hSize, addr x_strlen , NULL invoke lstrcmp , addr lpBuffer,addr x_str .if eax != NULL ;这里开始处理找到的 mov eax , FALSE ret .endif invoke UnmapViewOfFile,@lpMemory ;******************************************************************** .endif invoke CloseHandle,@hMapFile .endif invoke CloseHandle,@hFile .endif .endif mov eax , TRUE ret _ifile endp call _ifile invoke ExitProcess,NULL end start |
|
[求助]关于mci命令
项目名称:AVIPlayer播放分析器 源代码 发布时间:2006-09-27 项目作者:dream2fly 联系方式:songbohr@163.com or bosong.cn@hotmail.com 项目类别:AVI播放程序 工作环境:win32 项目版本:0.1 下载地址:http://www.dream2fly.net/projects/aviplayer.rar 更新地址:http://www.dream2fly.net/projects.php 不知道这个源码对你有用不? |
|
新手提问?
http://www.aogosoft.com/masmplus/ |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值