2010年2月25日 星期四

Facebook Login

  1. 先安裝 LWP::UserAgent http://search.cpan.org/~gaas/libwww-perl-5.834/lib/LWP/UserAgent.pm 用於Web 的 Application func,適用於Web Login, URL get, FTP Connect....
  2. 安裝OpenSSL 做網路安全加密的傳輸Lib 安裝教學請參考 http://nxforce.blogspot.com/search/label/SSH%2FSSL
  3. Check Web Login Methods 可檢視Login網頁原始碼 確定傳輸方式,底下可之是用表單來連接.在依序填入表單的欄位 <form method="POST" action="https://login.facebook.com/login.php?login_attempt=1"
  4. sample code $ua->cookie_jar(\%cookies); $response = $ua->post('https://login.facebook.com/login.php', { email => 'xxxxx', # would be the actual email pass => 'xxxxx', # would be the actual password login => 'Login', });
  5. 程式碼下載 http://sites.google.com/site/funningboy/perl_code/facebook.pl?attredirects=0&d=1

ref: http://www.ibm.com/developerworks/linux/library/wa-perlsecure.html http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_23940417.html

沒有留言:

張貼留言