Tuesday, March 28, 2006

English > L337 Translator (ColdFusion)

Update: A demo is available on my new blog:

Leet Translator.

Apparently I had time to waste writing a L337 hax0r translator in ColdFusion (okay, so it only took about 15 minutes). I figured I might as well pass it on...the output is different every time & it's reasonably badass. I'll try to put it on a publically accessible ColdFusion server or rewrite it in JavaScript within a few days so you can see it in action.

<h1>L337 Translator!!</h1>

<!--- If form submitted with value --->
<cfif isDefined("Form.message") AND len(Form.message)>
   <cfset Variables.alphabet = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z" />
   <cfset Variables.cipher = "4,8,[,),3,ƒ,6,##,1,_|,X,1,|v|,|\|,0,|*,()_,2,5,+,(_),\/,\/\/,×,`/,2" />
   <cfset Variables.output = "" />
  
   <!--- Loop over received text, one character at a time --->
   <cfloop index="i" from="1" to="#len(Form.message)#">
       <!--- Gives 50% odds --->
       <cfif round(rand())>
           <!--- Add leet version of character to output --->
           <cfset Variables.output = Variables.output & replaceList(lCase(mid(Form.message, i, 1)), Variables.alphabet, Variables.cipher) />
       <cfelse>
           <cfif round(rand())>
               <!--- Add uppercase version of character to output --->
               <cfset Variables.output = Variables.output & uCase(mid(Form.message, i, 1)) />
           <cfelse>
               <!--- Add unviolated character to output --->
               <cfset Variables.output = Variables.output & mid(Form.message, i, 1) />
           </cfif>
       </cfif>
   </cfloop>
  
   <cfif round(rand())>
       <cfset Variables.suffixes = "w00t!,d00d!,pwnd!,!!!11!one!,teh l337!,hax0r!,sux0rs!" />
       <!--- Append random suffix from list to output --->
       <cfset Variables.output = Variables.output & " " & listGetAt(Variables.suffixes, int(listLen(Variables.suffixes) * rand()) + 1) />
   </cfif>
  
  
   <h2>Original Text:</h2>
   <div style="background:#d2e2ff; border:2px solid #369; padding:0 10px;">
       <p><cfoutput>#paragraphFormat(Form.message)#</cfoutput></p>
   </div>
  
   <h2>Translation:</h2>
   <div style="color:#0f0; background:#000; border:2px solid #0f0; padding:0 10px;">
       <p><cfoutput>#paragraphFormat(Variables.output)#</cfoutput></p>
   </div>
</cfif>


<form action="<cfoutput>#CGI.SCRIPT_NAME#</cfoutput>" method="post" style="margin-top:20px;">
   <cfparam name="Form.message" default="Enter text to translate" />
   <textarea name="message" style="width:300px; height:75px;"><cfoutput>#Form.message#</cfoutput></textarea>
   <br/><br/>
   <input type="submit"/>
</form>

4 comments:

Ryan Christie said...

Y34|-|, th4+ |\|1c3 N 411, 8Ut U s7iLL != r3pLAC R34L TH1NG. ahahahaha pwNd!!!!!!!!1!11one!1

Anonymous said...

TM产品还都支持网络广州翻译公司,报告昨日公布。比如,译员A刚刚翻译了韩语翻译共享记忆库功能。北京翻译公司也就是入深圳翻译公司说,当多人同时进行翻译时同声传译,可以通过局域网共享一个翻译记忆库"This is a file for demo.",当译员B遇到"This is a demo file."时,系统会给出A的译文"这是个演示用的文件。"翻译公司东莞翻译公司。在线翻译工具。法语翻译。B可以接受,也可以修改,修改后的译文又可供自己或他人重复使用。广州翻译公司,翻译记忆库就在这样的不断补充和完善过程中,发挥着越来越大的作同声传译设备租赁,是会议设备租赁,一项调查显示法语翻译几乎将深圳更多的是通过线翻译同声传译深圳俄语翻译
深圳韩语翻译广州同声传译用。
放大上海翻译公司这将导致人民币兑表决器出租,表决器销售 租赁表决器各种货币 德语翻译,,市场风险偏好升温。商务口译,料就在昨日下午稍晚时间,同传设备已经说明一切。翻译是一门严谨不容践踏的语言文化。同声传译,凡购深圳同声传译翻译部署促进房地产市场健康发展措施出台,深圳翻译.深圳英语翻译 ,无需制作炫丽的界面和复杂的操作功能深圳日语翻译,中国移动后台词库地产的阴霾情绪同声传译设备租赁,是会议设备租赁深圳手机号码,深圳手机靓号,有的用户同传设备出租会议同传系统租赁选择在线翻译会议设备租赁中美利差的一旦金融市场趋于稳定,。同声传译设备租赁存在,。新疆租车,美元汇率明年什么时候开始由强转弱, 广州翻译公司,用户的体验不能停留同声传译一扫而光”

Anonymous said...

Making gw gold is the old question : Honestly there is no fast way to make lots of GuildWars Gold . Sadly enough a lot of the people that all of a sudden come to with millions of Guild Wars Gold almost overnight probably duped . Although there are a lot of ways to make lots of GuildWars moneyhere I will tell you all of the ways that I know and what I do to make cheap gw gold.

As a new player , you may need some game guides or information to enhance yourself.
habbo credits is one of the hardest theme for every class at the beginning . You must have a good way to manage yourhabbo gold.If yor are a lucky guy ,you can earn so many habbo coins by yourself . But if you are a not , I just find a nice way to get buy habbo gold. If you need , you can buycheap habbo credits at our website . Go to the related page and check the detailed information . Once you have any question , you can connect our customer service at any time .

Anonymous said...

網頁設計,情趣用品店,情趣用品專賣網

A片下載,成人影片下載
威而柔,自慰套,自慰套,SM,充氣娃娃,充氣娃娃,潤滑液,飛機杯,按摩棒,跳蛋,性感睡衣,威而柔,自慰套,自慰套,SM,充氣娃娃,充氣娃娃,潤滑液,飛機杯,按摩棒,跳蛋,性感睡衣
情惑用品性易購


免費視訊聊天室,aio交友愛情館,愛情公寓,一葉情貼圖片區,情色貼圖,情色文學,色情聊天室,情色小說,情色電影,情色論壇,成人論壇,辣妹視訊,視訊聊天室,情色視訊,免費視訊,免費視訊聊天,視訊交友網,視訊聊天室,視訊美女,視訊交友,視訊交友90739,AV,AV女優


A片,色情A片,免費A片,成人影片,色情影片,a片免費看,情色貼圖,情色文學,情色小說,色情小說


影音視訊聊天室