`

php vbs加密还原

    博客分类:
  • PHP
阅读更多
js加密还原

原过程

var pwd = theform.PassWord.value;
var rndNum = 394058;
rndNum = rndNum.toString();
var curPos = 0;
var tmpStr,EnCryptStr = "";
for(Cnt=0;Cnt<pwd.length;Cnt++){
    if(Cnt % rndNum.length == 0 ) curPos = 0;
    tmpStr = pwd.substring(Cnt,Cnt+1);
    EnCryptStr += String.fromCharCode(tmpStr.charCodeAt(0) - Cnt - rndNum.substring(curPos,curPos+1));
    curPos +=1;
}
theform.PassWord.value = EnCryptStr;//Assigned the EncryptPassword value to the PassWord TextFiled
theform.EnRndNum.value = rndNum;


用php还原

$pwd = "";
$rndNum = "394058";
$curPos = 0;
$tmpStr = "";
$EnCryptStr = "";
for($Cnt=0;$Cnt&amp;lt;strlen($pwd);$Cnt++)
        {
            if($Cnt % strlen($rndNum) == 0 ) $curPos = 0;
            $tmpStr = substr($pwd,$Cnt,1);
            $EnCryptStr = $EnCryptStr. fromCharCode(charCodeAt($tmpStr) - $Cnt - substr($rndNum,$curPos,1));
                        $curPos +=1; 
        }
echo $EnCryptStr;
echo ''&amp;lt;br&amp;gt;'';
echo $rndNum;
echo ''&amp;lt;br&amp;gt;'';
echo EncryptString($EnCryptStr);

function fromCharCode($codes) {
   if (is_scalar($codes)) $codes= func_get_args();
   $str= '''';
   foreach ($codes as $code) $str.= chr($code);
   return $str;
}

function charCodeAt($word) {
  if (is_array($word))
    $arr = $word;
  else  
    $arr = str_split($word);
  $bin_str = '''';
  foreach ($arr as $value)
    $bin_str .= decbin(ord($value));
  $bin_str = preg_replace(''/^.{4}(.{4}).{2}(.{6}).{2}(.{6})$/'',''$1$2$3'', $bin_str);
  return bindec($bin_str);
}


vbs加密还原
原函数

Function EncryptString(InputText , ThePassword )''用户口令加密 
    Dim il_bit, il_x, il_y, il_z, il_len, i 
    Dim is_out 
    Password = InputText 
    il_len = Len(Password) 
    il_x = 0 
    il_y = 0 
    is_out = "" 

    For i = 1 To il_len 
        il_bit = AscW(Mid(Password, i, 1)) ''W系列支持unicode 
        il_y = (il_bit * 13 Mod 256) + il_x 
        is_out = is_out &amp; ChrW(Fix(il_y)) ''取整 int和fix区别: fix修正负数 
        il_x = il_bit * 13 / 256 
    Next 

    is_out = is_out &amp; ChrW(Fix(il_x)) 
    Password = is_out 
    il_len = Len(Password) 
    il_x = 0 
    il_y = 0 
    is_out = "" 

    For i = 1 To il_len 
        il_bit = AscW(Mid(Password, i, 1)) ''取前4位值 
        il_y = il_bit / 16 + 64 
        is_out = is_out &amp; ChrW(Fix(il_y)) ''取后4位值 
        il_y = (il_bit Mod 16) + 64 
        is_out = is_out &amp; ChrW(Fix(il_y)) 
    Next 

    EncryptString = is_out 
    End Function 
}

用php还原

function EncryptString($Password){      //密码前端加密部分
    $il_len = strlen($Password);
    $il_x = 0;
    $il_y = 0;
    $is_out = "";

    for($i=0;$i< $il_len;$i++){
        $il_bit = ord(substr($Password, $i, 1));
        $il_y = ($il_bit * 13 % 256) + $il_x;
        $is_out = $is_out. Chr(fix($il_y));
        $il_x = $il_bit * 13 / 256;
    }

    $is_out = $is_out. Chr(fix($il_x));
    $Password = $is_out;
    $il_len = strlen($Password);
    $il_x = 0;
    $il_y = 0;
    $is_out = "";

    for($i=0;$i<$il_len;$i++){
        $il_bit = ord(substr($Password, $i, 1));
        $il_y = $il_bit / 16 + 64; 
        $is_out = $is_out. Chr(fix($il_y));
        $il_y = ($il_bit % 16) + 64; 
        $is_out = $is_out. Chr(fix($il_y));

    }

    return $is_out; 
}

function fix($il_y) {
   if(floor($il_y) < 0){
        return floor($il_y)+1;
   }else{
        return floor($il_y);
   }
}
0
0
分享到:
评论

相关推荐

    VBS加密器VBS加密器VBS加密器

    VBS加密器VBS加密器VBS加密器VBS加密器VBS加密器

    vbs加密软件.vbs

    VBS脚本加密工具

    VBS加密免杀器 下载

    VBS加密免杀器,做vbs的朋友,因各种原因,... 您可能感兴趣的文章:VBS加密解密源码(UserAccounts.CommonDialog) 软件开发网修正版VBS加密与VBE解密实现方法简单的VBS加密实现代码VBS加密14法你会几种 VBS加密免杀浅谈

    VBS加密脚本(防泄密)

    使用VBS脚本将已经编写好的VBS脚本进行加密,防止脚本内容外泄以及被修改。 将编写好的VBS脚本直接拖拽到该脚本上,会自动生成新的加密后的VBS脚本。

    VBS加密/VBE解密

    VBS加密 VBE解密的工具 VBS代码

    VBS加密解密

    强大的VBS加密解密 可用于网页的加密与解密 让别人难以读懂你的代码

    VBS加密解密 绿色多个程序

    VBS加密解密技术是基于Visual Basic Scripting Edition(VBS)脚本语言实现的,它是一种简单的编程语言,通常用于Windows平台上实现自动化任务。由于其脚本的轻量级和易于编写的特点,VBS经常被用于各种程序的快速...

    wincc VBS脚本加密破解

    wincc VBS脚本加密破解

    VBS文件加密工具

    VBS文件加密工具,对VBS代码进行加密后可以运行,杀毒软件可能会报毒,但正常,可以对VBS文件进行加密处理。

    加密vbs文件.vbe

    本vbs脚本用来加密vbs文件,超强三层加密,如有报毒纯属保,如msgbox"hello world!"加密后为:#@~^dQEAAA==a{J{G W&Ay%y1 Z&X R 0+;&*y0 O b2X+!yF2*+%+0y%f*y0 ~ 1fl b+92*+%y1yffl R ,y%2X R 1 8&X+R ,yq&l %y0+%...

    VBS2EXE3_softii.rar_exe_vbs exe_vbs to exe_vbs2exe_vbs加密

    vbs转exe,vbs加密,vbs反编译

    vbs 程式加密工具

    vbs 程式加密工具 vbs tools

    vbe解密器 vbs加密脚本

    针对当前vbe恶搞脚本的泛滥,该工具能够有效解密.

    vbs文件简单加密.exe

    辛辛苦苦写的vbs总被改得乱七八糟,是不是不爽?快来试试加密

    VBS MD5加密

    VBS MD5加密

    VBS加密14法你会几种 VBS加密免杀浅谈

    由于VBS是解释执行的,因此在编写恶意脚本时,加密VBS代码变得尤为重要,以防止被杀毒软件轻易识别和阻止。以下就是14种VBS加密方法的简要概述: 1. **加注释**:在代码中添加不含特征码的无用注释,以混淆反病毒...

    VBS常用代码 加密解密 进程管理

    ### VBS常用代码详解:加密解密与进程管理 #### VBS概述 VBS(Visual Basic Script Edition)是微软开发的一种轻量级脚本语言,主要用于编写自动化脚本任务,如系统维护、文件操作等。它基于Visual Basic,并且可以...

    VBS 文件加密

    给VBS加密,将vbs文件拖动到此文件上即可生成加密的vbs文件

    vbs加密算法

    基于Windows的vbscript加密算法,可以通过这个做一些简单的表白小程序

    VBS脚本关闭系统还原

    用VBS脚本关闭系统还原,已经测试过,需要重新启动计算机

Global site tag (gtag.js) - Google Analytics