javascript的加密,解密(压缩、混淆)

kaisenlee BY 2010-09-24 | 分类 PHP0 个评论

 

<script>
a=62;

function encode() {
var code = document.getElementById('code').value;
code = code.replace(/[\r\n]+/g, '');
code = code.replace(/'/g, "\\'");
var tmp = code.match(/\b(\w+)\b/g);
tmp.sort();
var dict = [];
var i, t = '';
for(var i=0; i<tmp.length; i++) {
if(tmp[i] != t) dict.push(t = tmp[i]);
}
var len = dict.length;
var ch;
for(i=0; i<len; i++) {
ch = num(i);
code = code.replace(new RegExp('\\b'+dict[i]+'\\b','g'), ch);
if(ch == dict[i]) dict[i] = '';
}
document.getElementById('code').value = "eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}("
+ "'"+code+"',"+a+","+len+",'"+ dict.join('|')+"'.split('|'),0,{}))";
}

function num(c) {
return(c<a?'':num(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36));
}

function run() {
eval(document.getElementById('code').value);
}

function decode() {
var code = document.getElementById('code').value;
code = code.replace(/^eval/, '');
document.getElementById('code').value = eval(code);
}
</script>


<textarea id=code cols=80 rows=20>

</textarea><br>
<input type=button onclick=encode() value=编码>
<input type=button onclick=run() value=执行>
<input type=button onclick=decode() value=解码>

Base64,escape在线加密解密 迅雷、FlashGet、QQ旋风专用链在线转换 PHP源代码

kaisenlee BY 2010-09-23 | 分类 PHP0 个评论

 

<?php
header('Content-Type: text/html; charset=gb2312');
$txt1 = stripslashes(trim( @$_POST['text1']));
$button = @$_POST['button'];
$down = @trim($_GET['down']);
if ($down==1) {
        header("Content-type: command");
	    header("Content-Disposition: attachment; filename=base64_decode.txt");
	    $contents = file_get_contents(basename($_SERVER['PHP_SELF']));
        echo $contents;
        exit;
        }
function escape($str) {
  preg_match_all("/[\x80-\xff].|[\x01-\x7f]+/",$str,$r);
  $ar = $r[0];
  foreach($ar as $k=>$v) {
    if(ord($v[0]) < 128)
      $ar[$k] = rawurlencode($v);
    else
      $ar[$k] = "%u".bin2hex(iconv("GB2312","UCS-2",$v));
  }
  return join("",$ar);
}

function unescape($str) {
  $str = rawurldecode($str);
  preg_match_all("/(?:%u.{4})|.+/",$str,$r);
  $ar = $r[0];
  foreach($ar as $k=>$v) {
    if(substr($v,0,2) == "%u" && strlen($v) == 6)
      $ar[$k] = iconv("UCS-2","GB2312",pack("H4",substr($v,-4)));
  }
  return join("",$ar);
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="Base64在线加密解密,迅雷、FlashGet、QQ旋风专用链在线转换" name="keywords">
<title>Base64在线加密解密 迅雷、FlashGet、QQ旋风专用链在线转换</title>
<style>
P {  
FONT-SIZE: 9pt;
line-height:150%;
width:50%;
BORDER:#DDDDDD 1px solid;
padding:5px 5px 5px 5px;text-align:justify;
   }   
A {
text-decoration: none;
font-size:9pt;
color:blue
   }
A:hover {
COLOR: red;
TEXT-DECORATION: underline
   }  
h1 {
font-size:12pt;
text-align:center;
margin-top:30px;
font-family: 微软雅黑, msyh, Tahoma, Helvetica, sans-serif;
   }
.bginput, select {
  color:#000000;
  vertical-align:middle;
  padding:2px;
  border:1px solid #BAC0C3;
  background:#F9FBFD;
}
.button {
  vertical-align:middle;
  padding:1px 3px 0px 3px;
  background:#F3F4F5;
  border:1px solid #B7C0C7;
  margin:0px; 
  width:180px;
}
div {
width:100%;
  }
</style>
</head>
  
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr><td height="20" bgcolor="#CCCCCC" align =right style="padding-right:5px;">
</td></tr><tr><td valign="top" align =center>

<form name="form1" method="post" action="">
<h1>Base64,escape在线加密解密 迅雷、FlashGet、QQ旋风专用链在线转换 <a href="?down=1">源码下载</a></h1>
<p>
请输入转换的地址:
  <textarea name="text1" rows="14" class="bginput" style="width:520px;"><?php echo htmlspecialchars($txt1,ENT_QUOTES);?></textarea>  
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;转换输出:
<textarea rows="14" class="bginput" style="width:520px;"><?php
if($button=="escape加密") echo escape($txt1);
if($button=="escape解密") echo unescape($txt1); 
if($button=="BASE64加密") echo base64_encode($txt1);
if($button=="BASE64解密") echo base64_decode($txt1); 
if($button=="普通地址 => 迅雷地址") echo "thunder://".base64_encode("AA".$txt1."ZZ");
if($button=="迅雷地址 => 普通地址"){if(strpos($txt1,"thunder://")){echo substr(base64_decode(str_ireplace("thunder://","",$txt1)),2,-2);}else{echo "迅雷地址必须以thunder://开始";}}
if($button=="普通地址 => 快车地址") echo "flashget://".base64_encode($txt1);
if($button=="快车地址 => 普通地址"){if(strpos($txt1,"flashget://")){echo str_ireplace("[FLASHGET]","",base64_decode(str_ireplace("flashget://","",$txt1)));}else{echo "快车地址必须以flashget://开始";}}
if($button=="普通地址 => 旋风地址") echo "qqdl://".base64_encode($txt1);
if($button=="旋风地址 => 普通地址"){if(strpos($txt1,"qqdl://")){echo base64_decode(str_ireplace("qqdl://","",$txt1));}else{echo "旋风地址必须以qqdl://开始";}}
?>
</textarea>
<br>
</p>
<input type="submit" name="button" class="button" value="escape加密" />
<input type="submit" name="button" class="button" value="escape解密" /><br>
<input type="submit" name="button" class="button" value="BASE64加密" />
<input type="submit" name="button" class="button" value="BASE64解密" /><br>
<input type="submit" name="button" class="button" value="迅雷地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 迅雷地址" /><br>
<input type="submit" name="button" class="button" value="快车地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 快车地址" /><br>
<input type="submit" name="button" class="button" value="旋风地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 旋风地址" /><br>
</form>注:地址加密时必须以http:// ftp://等开头,解码时迅雷必须以thunder://开始,快车必须以Flashget://开始,旋风必须以qqdl://开始,否则其结果不一定正确。
</td></tr>
<tr><td height="10"></td></tr><tr><td height="20" bgcolor="#CCCCCC" align=center></td>
</tr>
</table>
</body>
</html>

美式 常用英語&Common American English(1)

kaisenlee BY 2010-09-22 | 分类 默认分类0 个评论

Pull over!             把車子開到旁邊。
Drop me a line!        寫封信給我。
Give me a ring
= Call me!             來個電話吧!
For here or to go?     堂食或外賣。
Cool:That’s cool!     等於臺灣年輕人常用的囗語“酷!”,表示不賴嘛!用於人
                        或事均可。
What’s up?
= What’s happening?
=What’s new?           見面時隨囗問候的話“最近在忙什麼?有什麼新鮮 事嗎?”
                        一般的回答是“Nothing much!”或“Nothing new!”
Cut it out!
= Knock it out!
= Stop it!              少來這一套!同學之間開玩笑的話。
Don’t give me a hard time! 別跟我過不去好不好!
Get yourself together!  振作點行不行!
Do you have "the" time? 現在幾點鐘?可別誤以為人家要約你出去。
Hang in there.
= Don’t give up.
= Keep trying.          再撐一下。
Give me a break!        你饒了我吧!(開玩笑的話)
Hang on.                請稍候。
Blow it. = Screw up.    搞砸了。
What a big hassle.      真是個麻煩事。
What a crummy day.      多倒楣的一天。
Go for it.              加油
You bet. = Of course.   當然;看我的!
Wishful thinking.       一廂情願的想法。
Don’t be so fussy!     別那麼挑剔好不好。
It’s a long story.     唉!說來話長。
How have you been?
= How are you doing?    你過得如何?近來可好?
Take things for granted.自以為理所當然。
Don’t put on airs.     別擺架子。
Give me a lift!
= Give me a ride!       送我一程吧!
Have a crush on someone.迷戀某人
What’s the catch?      有什麼內幕?
Party animal.           開Party狂的人(喜歡參加舞會的人)
Pain in the neck.
=Pain in the ass.       眼中釘,肉中刺。
Skeleton in the closet. 家醜
Don’t get on my nerve! 別把我惹毛了!
A fat chance.
=A poor chance.         機會很小
I am racking my brains. 我正在絞盡腦
She’s a real drag.     她真有點礙手礙腳
Spacingout = daydreaming. 做白日夢
I am so fed up.         我受夠了!
It doesn’t go with your dress. 跟你的衣服不配。
What’s the point?
= What are you trying to say? 你的重點是什麼?
By all means
= Definitely.           一定是。
Let’s get a bite.
= Let’s go eat.        去吃點東西吧!
I’ll buy you a lunch (a drink; a dinner).
= It’s on me.
= My treat.             我請客
Let’s go Dutch.        各付各的
My stomach is upset.    我的胃不舒服
diarrhea                拉肚子
吃牛排時,waiter會問“How would you like it?”就是問“要幾分熟”的意思,可以選
擇rare, medium或 well-done。
I am under the weather.
=I am not feeling well. 我不太舒服!
May I take a rain check? 可不可改到下次?
                        (例如有人請你吃飯,你不能赴約,只好請他改到下一次。)
I am not myself today. 我今天什麼都不對勁!
Let’s get it straight. 咱們把事情弄清楚!
What’s the rush!       急什麼!
Such a fruitcake! 神經病!
I'll swing by later.
=I’ll stop by later.   待會兒,我會來轉一下。
I got the tip straight from the horse’s mouth. 這個消息是千真萬確的
                                                (tip指消息)!
easy as pie
= very easy
= piece of cake         很容易。
flunk out               被當掉
take French leave       不告而別
I don’t get the picture.
=I don’t understand.   我不明白。
You should give him a piece of your mind.
                        你應該向他表達你的不滿。
hit the road
= take off
= get on one’s way     離開。
Now he is in the driver's seat
=He is in control now.
Keep a low profile (or low key). 採取低姿態。
Kinky
=bizarre
=wacky
=weird                  古怪的。
klutz (=clutz) =idiot   白癡、笨蛋。
know one’s way around  識途老馬。
lion’s share           大部份。
tailgate                尾隨(尤其跟車跟得太近)。
take a back seat.       讓步。
take a hike
=leave me alone
=get lost               滾開。
hit the hay =go to bed  睡覺。
Can you give me a lift?
=Can you give me a ride? 載我一程好嗎?
green hand              生手、沒有經驗的人。
moonshine = mountain dew指私釀的烈酒(威士卡)或走私的酒。
胡說八道也可用moonshine。His story is plain moonshine.
chill out
=calm down
=relax(來自黑人英語)
rip off
=steal:I was ripped off. 我被偷了;
rip off 也常被用為“剝奪”
Myright was ripped off. 權利被剝奪(來自黑人英語)。
我們稱美國大兵為G.I. (Government Issue) or GI Joe,
德國兵或德國佬為 Fritzor  Kraut,
稱英國佬為John Bull,
日本人為Jap.或Nip,猶太人為Jew都是 很不禮貌的稱呼
mess around (with)      瞎混;
Get to work. Don’t mess around. 趕快工作,別瞎攪和。
snob                    勢利眼
sneak in, sneak out     偷偷溜進去,溜出來 sneakers 運動鞋
She is such a brown-nose. 她是個馬屁精。
This is in way over my head. 對我而言這實在太難了。
I am an exam jitter and I always get a cramp in my stomach.
我是個考試緊張大師,一考試胃 就抽筋。
Keep your study (work) on track. 請按進度讀書(工作)。
Did you come up with any ideas? 有沒有想到什?新的意見?
Don’t get uptight! Take it easy. 別緊張,慢慢來!
我是個考試緊張大師,一考試胃 就抽筋。
Keep your study (work) on track. 請按進度讀書(工作)。
Did you come up with any ideas? 有沒有想到什?新的意見?
Don’t get uptight! Take it easy. 別緊張,慢慢來!
Cheese! It tastes like cardboard. 天哪,吃起來味如嚼臘!
Get one’s feet wet. 與中文裏的“涉足”或“下海”,寓意相同,表示初嘗某事。
I am going to try dancing for the very first time. Just to get my feet wet.

300多个英语口语化的短语和句子(聊天特有用) 转

kaisenlee BY 2010-09-20 | 分类 默认分类0 个评论

突然发现我用英语msn时候囧了很多,很多口语化和俚语都不知道。
贴出来学习下:
whats your asl? 你的,年龄,性别,地点? (聊天用的) 
how are you doing (or: how you doiin) 你好。 
whats up 什么事? 或是: 你好 
lol 大笑 = laugh out loud 
so long 一般不用它。。。意思是:再见 
what are you into?(what you into) 你对什么感兴趣? 
Im into you. 我喜欢你 
Im into.... 我喜欢。。。 对。。。赶兴趣 
wanna want to 和 wanted to 的省写 
gonna going to 的省写。 不是 went to 的啊! 
gay 同性恋(男) 有的美国男孩不喜欢与同性的人聊。 
prick , dick , cock 骂人的。意思是,几吧 

阅读全文

迅雷、FlashGet、QQ旋风专用链在线转换 PHP源代码

kaisenlee BY 2010-09-19 | 分类 PHP0 个评论

 

<?php
$txt1=trim($_POST['text1']);
$button=$_POST['button'];
$down=trim($_GET['down']);
if ($down==1) {
        header("Content-type: command");
	    header("Content-Disposition: attachment; filename=code.txt");
	    $contents = file_get_contents(basename($_SERVER['PHP_SELF']));
        echo $contents;
        exit;
        }
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>迅雷、FlashGet、QQ旋风专用链在线转换</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="迅雷,FlashGet,地址转换," name="keywords">
<style>
P {	
FONT-SIZE: 9pt;
line-height:150%;
width:50%;
BORDER:#DDDDDD 1px solid;
padding:5px 5px 5px 5px;text-align:justify;
   } 	
A {
text-decoration: none;
font-size:9pt;
color:blue
   }
A:hover {
COLOR: red;
TEXT-DECORATION: underline
   }  
h1 {
font-size:12pt;
text-align:center;
margin-top:30px;
font-family: 微软雅黑, msyh, Tahoma, Helvetica, sans-serif;
   }
.bginput, select {
	color:#000000;
	vertical-align:middle;
	padding:2px;
	border:1px solid #BAC0C3;
	background:#F9FBFD;
}
.button {
	vertical-align:middle;
	padding:1px 3px 0px 3px;
	background:#F3F4F5;
	border:1px solid #B7C0C7;
	margin:0px; 
	width:180px;
}
div {
width:100%;
  }
</style>
</head>
	
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr><td height="20" bgcolor="#CCCCCC" align =right style="padding-right:5px;">
</td></tr><tr><td valign="top" align =center>

<form name="form1" method="post" action="">
<h1>迅雷、FlashGet、QQ旋风专用链在线转换 <a href="?down=1"> 源码下载</a></h1>
<p>
请输入转换的地址:<input name="text1" value="<?php echo $txt1;?>" type="text" class="bginput" style="width:520px;" /><br>
请选择转换的方式:<input type="text" value="<?php
if($button=="普通地址 => 迅雷地址") echo "thunder://".base64_encode("AA".$txt1."ZZ");
if($button=="迅雷地址 => 普通地址") echo substr(base64_decode(str_ireplace("thunder://","",$txt1)),2,-2);
if($button=="普通地址 => 快车地址") echo "flashget://".base64_encode($txt1);
if($button=="快车地址 => 普通地址") echo str_ireplace("[FLASHGET]","",base64_decode(str_ireplace("flashget://","",$txt1)));
if($button=="普通地址 => 旋风地址") echo "qqdl://".base64_encode($txt1);
if($button=="旋风地址 => 普通地址") echo base64_decode(str_ireplace("qqdl://","",$txt1));
?>" class="bginput" style="width:520px;" /><br>
</p>
<input type="submit" name="button" class="button" value="迅雷地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 迅雷地址" /><br>
<input type="submit" name="button" class="button" value="快车地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 快车地址" /><br>
<input type="submit" name="button" class="button" value="旋风地址 => 普通地址" />
<input type="submit" name="button" class="button" value="普通地址 => 旋风地址" /><br>
</form>
</td></tr>
<tr><td height="10"></td></tr><tr><td height="20" bgcolor="#CCCCCC" align=center></td>
</tr>
</table>
</body>
</html>