Exemplo n.º 1
0
<?php

/**
 * Created by PhpStorm.
 * User: abcdlzy
 * Date: 15/2/14
 * Time: 下午12:09
 */
include_once dirname(__FILE__) . '/../common.php';
include_once dirname(__FILE__) . '/../DBAdopt/_class/BLL/operator.php';
@($getUrl = $_POST["data"]);
@($getGUID = $_POST["GUID"]);
if (!empty($getUrl)) {
    $getModel = SQLAdopt::getOne(new shellModel($getUrl, '', '', '', ''));
}
if (empty($getModel)) {
    $getModel = new shellModel('', '', '', '', '');
}
?>

<input id="inputShellURL" <?php 
echo 'value="' . $getModel->url . '"';
?>
  <?php 
if (!empty($getModel->url)) {
    echo 'readOnly style="background-color: #F0F0F0;"';
}
?>
 type="text" name="name" class="text-short-input comment-text contact-long" placeholder="URL" required="">
<div class="row">
Exemplo n.º 2
0
function doGetCertStep4($data)
{
    //解密
    $decryptData = RSADecrypt($data, $GLOBALS['CAPrivKeyStr']);
    //分割
    $usercert = SQLAdopt::getOne(new certModel($decryptData, '', '', ''));
    if (!empty($usercert)) {
        $keyII = md5(uniqid(mt_rand(), true));
        $ivII = md5(uniqid(mt_rand(), true));
        $_SESSION['AESKEY'] = $keyII;
        $_SESSION['AESIV'] = $ivII;
        save_AESKeyIV($decryptData, $keyII, $ivII, 'in');
        save_AESKeyIV($decryptData, $keyII, $ivII, 'out');
        echo RSAEncrypt($keyII . ',' . $ivII, $usercert->x509);
    } else {
        echo 'noEncrypt';
    }
}
Exemplo n.º 3
0
function response_Pem($GUID)
{
    if (!$GLOBALS['isCA']) {
        return 'This is not look like CA';
    }
    $tryGetPEM = SQLAdopt::getOne(new certModel($GUID, '', '', ''));
    if (empty($tryGetPEM)) {
        return 'look like null';
    }
    return $tryGetPEM->x509;
}