WordPress Plugin check
Publicado por Perfil removido (última atualização em 14/10/2013)
[ Hits: 6.767 ]
Esse script gera a lista completa de plugins que existem no WordPress usando o repositório SVN do CMS, e também verifica quais plugins estão instalados em um site.
#!/usr/bin/perl # By MMxM use WWW::Mechanize; use Getopt::Std; use strict; use threads; use threads::shared; use warnings; our(%opts,@aa); my($ini,$fin,@threads,$i,$arq,@a); getopts('lf:p:t:s:o:', \%opts); if($opts{'l'} && $opts{'f'}){ print "\n\n[*] Making plugin list\n[+] Using wordpress svn repository\n\n"; &list; exit(0); } if(!$opts{'s'} || !$opts{'o'} || !$opts{'t'} || !$opts{'p'}){ &help; } open($arq,'<'.$opts{'p'}) || die($!); @a = <$arq>; close($arq); @aa = grep { !/^$/ } @a; my $stop :shared = 0; $ini = 0; $fin = $opts{'t'} - 1; open(our $output,'>>'.$opts{'o'}) || die("failed to save plugins in file => ".$opts{'o'}."\n"); print "\n\n[*] Starting plugin check\n[*] Number of plugins to check => ".scalar(@aa)."\n\t[.K33p C4lm Br0.]\n\n"; while(1){ @threads = (); for($i=$ini;$i<=$fin;$i++){ push(@threads,$i); } foreach(@threads){ $_ = threads->create(\&check); } foreach(@threads){ $_->join(); } print("\n\n [+] 100% complete\n[*] Plugins found are here => ".$opts{'o'}."\n") if $stop; close($output) if $stop; exit(0) if $stop; $ini = $fin + 1; $fin = $fin + $opts{'t'}; } sub help { print ' [*] WP Plugin Checker By MMxM [+] Options: -l => Generate plugin list -f => Output file to save plugin list -p => plugin list to test -t => threads number -s => Site -o => Output file to save found plugins [+] Examples of use: ./wp-check.pl -l -f /tmp/plugins.txt ./wp-check.pl -p /tmp/plugins.txt -s localhost/wp/ -o plugins-founds.txt -t 50 '; exit(1); } sub check { my $id = threads->tid(); $id--; if(defined($aa[$id])){ chomp($aa[$id]); my $mech = WWW::Mechanize->new( autocheck => 0 ); my $site; if($opts{'s'} !~ /^(http|https):\/\//){ $site = 'http://'.$opts{'s'}; } else { $site = $opts{'s'}; } if($site !~ /\/$/){ $site = $site.'/'; } $mech->get($site.$aa[$id]); my $n = $id+1; print "\rNumber of plugins checked => ".$n; if($mech->status() =~ /40[0-9]/){ return; } else { print $output $site.$aa[$id]."\n"; } } else { $stop = 1; return; } } sub list { my $mech = WWW::Mechanize->new(); $mech->get('http://plugins.svn.wordpress.org/'); my @plugins; @plugins = $mech->links; my $del = scalar(@plugins); delete $plugins[$del-1]; open(my $out,'>>'.$opts{'f'}) || die($!); print $out $_->text."\n" foreach(@plugins); close($out); $del--; print '[+] '.$del.' Saved plugins in '.$opts{'f'}."\n"; }
Gmail::SendMail - Enviando emails usando gmail
Obtendo o IP público (Internet) usando o Perl
Nenhum coment�rio foi encontrado.
Aprenda a Gerenciar Permissões de Arquivos no Linux
Como transformar um áudio em vídeo com efeito de forma de onda (wave form)
Como aprovar Pull Requests em seu repositório Github via linha de comando
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Alguém já usou o framework Avalonia para desenvolver interfaces de usu... (4)
Ajuda Pra Melhoria do NFTABLES. (8)
Sinto uma leve lentidão ao arrastar, miniminizar e restauras as janela... (2)
Pastas da raiz foram para a área de trabalho [RESOLVIDO] (7)