Postando mensagem no Facebook com Perl
Publicado por Perfil removido (última atualização em 11/08/2014)
[ Hits: 6.427 ]
Caso ocorra algum problema, tente logar no Facebook para celular, e desative a mensagem que pede para colocar número de celular. Se mesmo assim continuar dando problema, aí já não sei o que fazer, haha.
Usando o script:
$ perl fb.pl [email] [senha]
#!/usr/bin/perl -w # Coder: MMxM # hc0der.blogspot.com # Post facebook message with perl use strict; use LWP; use HTTP::Cookies; use URI::Escape; die("\n[+] $0 <fb-email> <fb-password>\n\n") if(@ARGV!=2); my($email,$pw) = @ARGV; print "[*] Logging... (Wait)\n"; my $browser = LWP::UserAgent->new; $browser->cookie_jar( {} ); $browser->agent('Mozilla/5.0 (Windows NT 6.2; rv:31.0) Gecko/20100101 Firefox/31.0'); my $body = $browser->get('https://m.facebook.com/')->content; my %attr; my @elements = ($body =~ /(?<=<input type="hidden" name=").*?(?<=" value=").*?(?=["])/g); my $uri_login; ($body =~ /<form method="post" class="v w" id="login_form" novalidate="1" action="(.*?)">/) &&($uri_login=$1) || die("Error to get login URL\n"); foreach my $hidden(@elements){ my @tmp = split(/" value="/,$hidden); $attr{$tmp[0]} = uri_escape($tmp[1]); } $attr{'email'} = $email; $attr{'pass'} = $pw; my $header = $browser->post( $uri_login , \%attr )->as_string; my $location; if($header =~ /Location: (.*)/){ $location = $1; } else { die("[-] Unexpected Error\n"); } if($location =~ /^https:\/\/m.facebook.com\/login.php/){ die("[-] Failed to login\n"); } print "[+] Sucessfull Login\n"; print "[*] GETing URL to post message... (Wait)\n"; $browser->get($location); $browser->get('https://m.facebook.com/phoneacqwrite/?s=1&source=m_mobile_mirror_interstitial'); $body = $browser->get('https://m.facebook.com/home.php?_rdr')->content; my %attr2; my @ele2 = ($body =~ /(?<=<input type="hidden" name=").*?(?<=" value=").*?(?=["])/g); ($body =~ /<form method="post" action="\/composer\/(.*?)">/) && ($location = 'https://m.facebook.com/composer/'.$1) || die("Error to get URL\n"); $location =~ s/&/&/g; for(0..12){ my @tmp = split (/" value="/ ,$ele2[$_]); next if($tmp[0] eq 'search' || $tmp[0] eq 'search_source'); $attr2{$tmp[0]} = uri_escape($tmp[1]); } $attr2{'xc_message'} = ''; $attr2{'rst_icv'} = ''; $header = $browser->post($location, \%attr2)->as_string; if($header =~ /Location: (.*)/){ $location = $1; } else { die("Error to get URL\n"); } ($location !~ /$attr2{'csid'}/) && die("Unexpected Error\n"); print "[+] OK\n"; print "[*] Acessing url ...(Wait)\n"; $body = $browser->get($location)->content; my %attr3; my @h = ($body =~ /(?<=<input type="hidden" name=").*?(?<=" value=").*?(?=["])/g); if($body =~ /<form method="post" action="\/composer\/mbasic\/(.*?)" enctype="multipart\/form-data">/){ $location='https://m.facebook.com/composer/mbasic/'.$1; } for(0..scalar(@h)-1){ my @tmp = split(/" value="/,$h[$_]); if($_ == 6){ $attr3{'target'} = $tmp[1]; next; } if($_ == 12){ $attr3{'waterfall_source'} = $tmp[1]; next; } $attr3{$tmp[0]} = $tmp[1]; } print "[*] Write your message:\n\n"; my $xms = <stdin>; $attr3{'xc_message'} = $xms; $attr3{'users_with'} = ''; $attr3{'album_id'} = ''; $attr3{'view_post'} = ''; $attr3{'file1'} = ''; $attr3{'file2'} = ''; $attr3{'file3'} = ''; my $x = $browser->post($location, Content_Type => 'multipart/form-data', Content => [ %attr3 ]); if($x->as_string =~ /Location: https:\/\/m.facebook.com\/home.php/){ print "\n[+] Message posted successfully\n"; } else { print "\n[-] Possible error\n"; } #__EOF__
Baixar o Diário Oficial da União e salvar como um único PDF completo
Burlando o "Protetor de links" INVERTIDO para download grátis
Nenhum comentário foi encontrado.
Agora temos uma assistente virtual no fórum!!! (247)
Manutenção de sistemas Linux Debian e derivados com apt-get, apt, aptitude e dpkg
Melhorando o tempo de boot do Fedora e outras distribuições
Como instalar as extensões Dash To Dock e Hide Top Bar no Gnome 45/46
Como Atualizar Fedora 39 para 40
Instalar Google Chrome no Debian e derivados
Consertando o erro do Sushi e Wayland no Opensuse Leap 15
Instalar a última versão do PostgreSQL no Lunix mantendo atualizado
Flathub na sua distribuição Linux e comandos básicos de gerenciamento
Reset do linux sem perder dual boot (4)
erro ao clonar repo github (10)
iso de sistema 32 bit em atividade (16)
Impressora Canon Ip 1800 (Drivers) 64 bit (3)
Como transfiro os pokemons do fire red para o emulador mupen64? (1)