|
发表于 2004-10-22 21:46:17
|
显示全部楼层
呵呵,今天从光盘里翻出以前曾没写完的代码,和这个是同话题就贴上来,代码写得较早,也没写完,错误在所难免,现在懒得去改了,大伙凑合着看吧:)
不好意思,很少上这个论坛,不知道怎么上贴代码:(
##### Name: p_sems.pl
##### Version: 0.0.1.5
##### Author: y6cmE
##### Contact: y6cme@4red.org
##### Licence: The licence of Perl
##### Last Updated: 2002.11.15
use Tk;
use Thread;
use Tk:abFrame;
use Tk:ialogBox;
use Win32::Message;
my @z1=(cursor,'clock',font,'fixed',bg,'violet',fg,'salmon4',text);
my @z2=(cursor,'spider',bg,'gray',fg,'firebrick3',insertbackground,'LavenderBlush');
my @z3=(bg,'black',fg,'red',activebackground,'green',text);
my @z4=(cursor,'gumby',bg,'grey',fg,'aquamarine4',insertbackground,'LightCyan',width,35,height,15);
my @z5=(cursor,'mouse',bg,'coral',fg,'bisque1',insertbackground,'bisque4',width,40,height,15);
my @z6=(cursor,'pencil',bg,'HotPink',fg,'lavender',insertbackground,'LavenderBlush');
my @z7=(cursor,'sailboat',font,'fixed',bg,'sienna4',fg,'coral2',text);
my @z8=(bg,'snow4',fg,'seashell1',activebackground,'gold1',text);
my $mw=tkinit(title,p_sems);
$mw->opup(-popanchor,'center');
$mw->resizable(0,0);
my $a1=$mw->Label(@z1,'冒名:');
my $a2=$mw->Label(@z1,'目标:');
my $b1=$mw->Entry(@z2);
my $b2=$mw->Entry(@z2);
my $c1=$mw->Button(@z3,'关于',cursor,'question_arrow',command,\&about);
my $c2=$mw->Button(@z3,'撤退',cursor,'heart',command,sub{exit});
my $c3=$mw->Button(@z3,'出手',cursor,'pirate',command,\&send);
my $c4=$mw->Button(@z3,'群发',cursor,'star',command,\&array);
my $dd=$mw->Text(@z4);
$a1->grid(-row,0,-column,0);
$b1->grid(-row,0,-column,1);
$c1->grid(-row,0,-column,2);
$c2->grid(-row,0,-column,3);
$a2->grid(-row,1,-column,0);
$b2->grid(-row,1,-column,1);
$c3->grid(-row,1,-column,2);
$c4->grid(-row,1,-column,3);
$dd->grid(-row,2,-column,0,-columnspan,4);
sub send{
my $g1=$b1->get();
my $g2=$b2->get();
my $g3=$dd->get("1.0","end");
if(Win32::Message::Send("",$g2,$g1,$g3)){
my $t1=$mw->DialogBox(title,'p_sems',-buttons,['知道啦']);
$t1->add("Label",text,'已发送,但无法肯定对方是否收到。',font,'fixed')->pack;
$t1->Show;
}
else{
my $t2=$mw->DialogBox(title,'p_sems',-buttons,['去死吧']);
$t2->add("Label",text,'发送失败!原因未知。这个破软件!',font,'fixed')->pack;
$t2->Show;
}
}
sub array{
my $gh=$mw->Toplevel(title,'p_sems——群发');
$gh->resizable(0,0);
$gh->opup(-popanchor,'left');
my $g1=$gh->Label(@z7,'IP段:');
my $g2=$gh->Label(@z7,'冒名:');
my $g3=$gh->Label(@z7,'起始:');
my $g4=$gh->Label(@z7,'终止:');
my $h1=$gh->Entry(@z6,width,15,validate,'key',vcmd,sub{length(shift)>11?0:1;});
my $h2=$gh->Entry(@z6,width,15);
my $h3=$gh->Entry(@z6,width,3,validate,'key',vcmd,sub{length(shift)>3?0:1;});
my $h4=$gh->Entry(@z6,width,3,validate,'key',vcmd,sub{length(shift)>3?0:1;});
my $v1=$gh->Button(@z8,'关 于',cursor,'right_tee',command,\&help);
my $v2=$gh->Button(@z8,'撤 退',cursor,'left_tee',command,sub{$gh->destroy});
my $v3=$gh->Button(@z8,' 出 手',cursor,'circle',command,\&thread);
my $t1=$gh->Text(@z5);
$g1->grid(-row,0,-column,0);
$h1->grid(-row,0,-column,1,-columnspan,3);
$g2->grid(-row,0,-column,4);
$h2->grid(-row,0,-column,5,-columnspan,2);
$g3->grid(-row,1,-column,0);
$h3->grid(-row,1,-column,1);
$g4->grid(-row,1,-column,2);
$h4->grid(-row,1,-column,3);
$v1->grid(-row,1,-column,4);
$v2->grid(-row,1,-column,5);
$v3->grid(-row,1,-column,6);
$t1->grid(-row,2,-column,0,-columnspan,7);
sub thread{
my $y1=$h1->get;
my $y2=$h2->get;
my $y3=$h3->get;
my $y4=$h4->get;
my $s1=$t1->get("1.0","end");
my @jj;
for(my $x=$y3;$x<=$y4;$x++){
my $u1=$y1.".$x";
my $xmm=Thread->new(\&hack);
push(@jj,$xmm);
}
$_->join foreach @jj;
open(FILE,'>>hack.txt');
sub hack{
if(Win32::Message::Send("",$u1,$y2,$s1)){
print FILE "已发送到$u1,但无法肯定对方是否一定收到。\n";
}
else{
print FILE "发送到$u1失败,原因未知。\n";
}
}
}
close FILE;
}
sub help{
my $zz=$mw->Toplevel(title,'p_sems——群发',cursor,'umbrella');
$zz->resizable(0,0);
$zz->transient($zz->arent->toplevel);
my $mm=$zz->LabFrame(-label,'p_sems 群发',-labelside,'acrosstop',-fg,'salmon1',-bg,'green');
my $nn=$mm->Label(width,66,height,17,font,'fixed',anchor,'nw',justify,'left',fg,'purple2',bg,'grey72',cursor,'trek',text,' p_sems的群发使用说明书
★★在IP段里填入要群发网络消息的IP段,应该填入例如“127.0.0”,最
后面不要填写“.”,也就是说不要填为“127.0.0.”之类的,起始.终止
栏里填入要从哪个IP开始及哪个IP结束,也是不用填“.”就直接填入“26
”之类的,不要填写为“26.”。本群发采用多线程,发送给多少个IP,就
打开多少个线程。为顺利发送网络消息,请关闭安全防护程序,如:天网。
★★注意:此程序尚在开发之中,许多功能还不完善,并还存在bug,请勿
将此程序用于商业行为,自担风险吧。由于时间与能力有限,本人暂不提供
技术支持。
_____________________________________________________________________
★★ 作者:y6cmE 联系:y6cme@4red.org
_____________________________________________________________________');
$mm->pack();
$nn->pack();
}
sub about{
my $ab=$mw->Toplevel(title,'About p_sems',cursor,'gobbler');
$ab->resizable(0,0);
my $lf=$ab->LabFrame(-label,'p_sems',-labelside,'acrosstop',-fg,'orangered',-bg,'yellow');
my $la=$lf->Label(width,80,height,17,font,'fixed',anchor,'nw',justify,'left',fg,'blue',bg,'azure',cursor,'heart',text,' p_sems使用说明书
★★这是一个网络消息发送器,是个比较简单的程序,用于向Win32机器发送网络消息。但
是无法保证用户能够收到您所发的消息,请先肯定对方已运行了Messenger或Winpopup。使
用时在冒名栏里填入您想冒充的机器,可以是IP地址或机器名,甚至可以使用任何数据,也
可以不填。目标栏应填入您想发送网络消息给对方,对方的IP地址或计算机名或其它可以接
收消息的地址。在最下面的空白部分写入您的信息,此为对方收到的正文。最后点击“出手
”即可。为顺利发送网络消息,请关闭安全防护程序,例如:天网等。
★★另外,群发功能用于向指定IP段的所有主机发送网络消息,具体请参阅群发里的帮助。
★★注意:此程序尚在开发之中,许多功能还不完善,并还存在bug,请勿将此程序用于商
业行为,自担风险吧。由于时间与能力有限,本人暂不提供技术支持。
____________________________________________________________________________________
★★ 作者:y6cmE 联系:y6cme@4red.org
____________________________________________________________________________________');
$lf->pack();
$la->pack();
}
MainLoop; |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|