■□■□■ delphi程序如何实现 - - 监控本机所有端口? ■□■□■ 如何用delphi监控本机的所有端口,就象有些软件防火墙一样? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 端口扫描程序 program Project1; {$APPTYPE CONSOLE}uses winsock,sysutils,windows;conststartport=1;stopport=30;vars:tsocket;i,j,error:integer;server:tsockaddrin;wsa:twsadata;beginwriteln('===============================================================================');writeln('== Very Slow Port Scanner==');writeln('== Edit [email protected] ==');writeln('===============================================================================');writeln(' ====');writeln(' ====');writeln('=====================================================================');writeln(' ====');wsastartup(makeword(1,1),wsa);server.sin_family:=AF_INET;server.sin_addr.S_addr:=inet_addr('127.0.0.1');for i:=startport to stopport dobegins:=socket(AF_INET, SOCK_STREAM, 0);server.sin_port:=htons(i);error:=connect(s,server,sizeof(server));if error=0 thenbeginwrite(' == Scan port: '+inttostr(i));for j:=0 to 5-length(inttostr(i)) dowrite(' ');writeln(' [ok] ==');closesocket(s);end;end;writeln(' ====');writeln('=====================================================================');writeln(' ====');writeln(' ====');writeln('============================================================================');writeln('== Thank you for your test! Good luck!==');writeln('== Edit [email protected] ==');writeln('===========================================================================');wsacleanup();readln;end. serversocket 绑定IP 如何提供用户选择打印机的功能??????? 拖动窗体的问题(详细请看问题描述) 关于com+数据更新问题。急! MIS系统中子窗体如何关闭 与OICQ一样的好友菜单是使用什么控件的 关于事务 这是什么原因? 怎样的图书馆管理系统才算完美 关于空格的截取? 难题啊,大侠近来看一看啊!!是D6的Bug吧,破折号的显示问题 怎样令我的窗体显示在前面
program Project1;
{$APPTYPE CONSOLE}uses winsock,sysutils,windows;conststartport=1;stopport=30;vars:tsocket;i,j,error:integer;server:tsockaddrin;wsa:twsadata;beginwriteln('===============================================================================');writeln('== Very Slow Port Scanner==');writeln('== Edit [email protected] ==');writeln('===============================================================================');writeln(' ====');writeln(' ====');writeln('=====================================================================');writeln(' ====');wsastartup(makeword(1,1),wsa);server.sin_family:=AF_INET;server.sin_addr.S_addr:=inet_addr('127.0.0.1');for i:=startport to stopport dobegins:=socket(AF_INET, SOCK_STREAM, 0);server.sin_port:=htons(i);error:=connect(s,server,sizeof(server));if error=0 thenbeginwrite(' == Scan port: '+inttostr(i));for j:=0 to 5-length(inttostr(i)) dowrite(' ');writeln(' [ok] ==');closesocket(s);end;end;writeln(' ====');writeln('=====================================================================');writeln(' ====');writeln(' ====');writeln('============================================================================');writeln('== Thank you for your test! Good luck!==');writeln('== Edit [email protected] ==');writeln('===========================================================================');wsacleanup();readln;end.