我见到有些木马才二十几K,却有许多功能,谁能给我示例一下(50分)

  • 主题发起人 主题发起人 for88
  • 开始时间 开始时间
F

for88

Unregistered / Unconfirmed
GUEST, unregistred user!
麻烦教我怎样编写很小的程序,谢谢
 
那可能不是用delphi写的
用VB的程序很小的
 
你,你你。。。。想干嘛?
 
delphi也行。但是不能用通常的方法来实现。。就是不用VCL

要自己用API在PROJECT中实现。。。
registerclass
createwindowex
while(msg=getmessage())
{
case msg.xxx:
case msg.xxx;
dispath(msg);
}
 
谁可以说得详细一些?
 
找本API编程,一般是VC的,你改成pascal语言就可以了。
 
大小为15.0 KB (15,360 字节),但打到手软
program Project1;

uses
windows,messages;

var
hInst:THandle;
hWndMain:HWND;

function MainWndProc(hWn:HWND;message:UINT;wPar:WParam;lPar:LParam):LRESULT;stdcall;
const
s='hello world';
var
hdc1:HDC;
ps:PAINTSTRUCT;
begin
Result:=0;
case (message) of
WM_PAINT:begin
hdc1:=BeginPaint(hwn,ps);
TextOut(hdc1,20,10,PChar(s),Length(s));
EndPaint(hwn,ps);
end;
WM_DESTROY:begin
PostQuitMessage(0);
end;
else begin
Result:=DefWindowProc(hwn,message,wpar,lpar);
end;
end;
end;

function Initapplication(hInstance:THandle):word;
var
wcSimpwin:TWndClass;

begin
with wcSimpwin do
begin
style:=0;
lpfnWndProc:=@MainWndProc;
cbClsExtra:=0;
cbWndExtra:=0;
hInstance:=hInstance;
hIcon:=LoadIcon(0,IDI_APPLICATION);
hCursor:=LoadCursor(0,IDC_ARROW);
hbrBackground:=GetStockObject(WHITE_BRUSH);
lpszMenuName:=0;
lpszClassName:='Simpwin WClass';
end;
result:=RegisterClass(wcSimpwin);
end;

function InitInstance(hInstance:THandle;nCmdShow:integer):boolean;
begin
hInst:=hInstance;
hWndMain:=CreateWindow('simpwin WClass',
'我的窗口',
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,CW_USEDEFAULT,
CW_USEDEFAULT,CW_USEDEFAULT,
0,0,hInstance,0);
if (hWndMain=0) then
begin
result:=false;
exit;
end;
ShowWindow(hWndMain,nCmdShow);
UpdateWindow(hWndMain);
result:=false;
end;

var
msg:TMsg;
begin
InitApplication(hInstance);
InitInstance(hInstance,SW_SHOW );
while GetMessage(msg,0,0,0) do
begin
TranslateMessage(msg);
DispatchMessage(msg);
end;
end.

 
testnet,那开始时是用DELPHI的FORM窗口来编写吗,你是在哪个地方打入源码的,谢谢
 
看来和我一样是菜乌
 
最简单的方法,Project/view source,会见到
program Project1;

uses
Forms,
Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
把这些删除了,就在这里写.上面的代码写了几句多余的,删了还可以减几个字节.
 
源码也不知道写在哪里,你最好先不要研究木马程序.
 
testnet,那要不要FORM窗口啊,不要嫌我哆嗦啊
 
是啊,源码都不知道写哪最好别编写,其实很简单如下:
program Project1;

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

begin
showmessage('abc');
application.Terminate;
end.
在项目里将UNIT全部去掉就行了,这种编法有点像DOS下的呵...一条线下去,不过又和
DOS下编程不同,你可以使用API截取消息,至于窗口也是用CREATEWINDOW 这个API实现,
SOCKET通讯一样,不过你可以动态的创建一个SOCKET类.
 
当你把 Unit1 in 'Unit1.pas' {Form1};删除了的时候,Delphi就不会编译from了,
当然你也可以用Remove按钮完成这个功能.
 
接受答案了.
 
后退
顶部