找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2934|回复: 0

Freephoneline的破解

[复制链接]
发表于 2011-8-15 22:50:52 | 显示全部楼层 |阅读模式
将以下代码存为文件ffd.php, 找个支持php的网站放上去,浏览器里面运行,即可破解得到SIP的设置,节省50刀。
  1. <?php

  2. //This file is called ffd.php

  3. $Output = 'Nothing interesting to show here Capt\'n';

  4. function new_freephoneline_crypto_context($Key) {
  5.     $Key = substr(md5($Key), 0, 16);
  6.     $IV = 'fedcba9876543210';
  7.     if ($CryptoModule = mcrypt_module_open('rijndael-128', '', 'cbc', '')) {
  8.         mcrypt_generic_init($CryptoModule, $Key, $IV);
  9.         return $CryptoModule;
  10.     } else {
  11.         die('Initializing mcrypt failed!');
  12.     }
  13. }

  14. function delete_freephoneline_crypto_context($CryptoModule) {
  15.     mcrypt_generic_deinit($CryptoModule);
  16.     mcrypt_module_close($CryptoModule);
  17. }

  18. if (isset($_REQUEST['u']) && isset($_REQUEST['p'])) {

  19.     $WebUsername = $_REQUEST['u']; $WebPassword = $_REQUEST['p'];

  20.     $Context = new_freephoneline_crypto_context($WebUsername);
  21.     $EncryptedWebPassword = mcrypt_generic($Context, $WebPassword);
  22.     delete_freephoneline_crypto_context($Context);

  23.     if ($CURLHandle = curl_init('http://www.freephoneline.ca/services/init')) {
  24.         curl_setopt($CURLHandle, CURLOPT_RETURNTRANSFER, true);
  25.         curl_setopt($CURLHandle, CURLOPT_HEADER, false);
  26.         curl_setopt($CURLHandle, CURLOPT_POST, true);
  27.         curl_setopt($CURLHandle, CURLOPT_POSTFIELDS, ''
  28.             .'web_username='.urlencode($WebUsername).'&'
  29.             .'web_password='.urlencode(base64_encode($EncryptedWebPassword)).'&'
  30.             .'key='
  31.         );

  32.         $Data = array();
  33.         foreach(explode("\r\n", curl_exec($CURLHandle)) as $Line)
  34.             if (false !== $Target = strpos($Line, '='))
  35.                 $Data[trim(substr($Line,0,$Target))] = trim(substr($Line, $Target+1));
  36.         curl_close($CURLHandle);

  37.         if (!isset($Data['sip_username']) || !isset($Data['sip_password'])) {
  38.             $Output = 'Error getting credentials; perhaps wrong username or password?)';
  39.         } else {
  40.             $SIPUsername = $Data['sip_username'];
  41.             $EncryptedSIPPassword = base64_decode($Data['sip_password']);

  42.             $Context = new_freephoneline_crypto_context($SIPUsername);
  43.             $DecryptedPassword = mdecrypt_generic($Context, $EncryptedSIPPassword);
  44.             delete_freephoneline_crypto_context($Context);

  45.             $Output = 'Username is: '.$SIPUsername.', and password is: '.$DecryptedPassword;
  46.         }
  47.     } else {
  48.         die('Initializing CURL failed!');
  49.     }
  50. }
  51. ?><html>
  52.     <head>
  53.         <title>Freephoneline SIP Credentials Decryptor</title>
  54.     </head>
  55.     <body>
  56.         <form method="post" action="ffd.php">
  57.             <fieldset>
  58.                 <legend>FreePhoneLine Login Information</legend>
  59.                 <div>
  60.                     <label>Username:</label>
  61.                     <input style="width: 200px;" type="text" name="u" placeholder="username" value="<?php echo isset($_REQUEST['u']) ? $_REQUEST['u'] : '' ; ?>"/>
  62.                 </div>
  63.                 <div>
  64.                     <label>Password:</label>
  65.                     <input style="width: 200px;" type="password" name="p" placeholder="password" value="<?php echo isset($_REQUEST['p']) ? $_REQUEST['p'] : ''; ?>"/>
  66.                 </div>
  67.             </div>
  68.             <div><input type="submit" value="Get My SIP Info"/></div>
  69.         </form>
  70.         <hr/> <?php echo $Output; ?>
  71.     </body>
  72. </html>
复制代码



您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )

GMT-8, 2026-4-9 20:59 , Processed in 0.031404 second(s), 16 queries .

Supported by Weloment Group X3.5

© 2008-2026 Best Deal Online

快速回复 返回顶部 返回列表