السـلام عليـكم ورحمه الله وبـركاته
تـم تعديـل الاسكربت والاضـافه لـه :1- تـم الاستغنـاء عن الـ if/else واستبدالها بـ case/when
2-النـاتج النهـائي سيكـون في مجلـد الـ Home علي هيئـه ملف نصي txt
3-سـيكون اسـم الملف هـو L33t.txt
كود PHP:
#!/usr/bin/env ruby
puts "\t\t\tTh1S C0dE WaS WrittEn By"
puts "\t\t\t\tMutati0N"
puts "\t\t\tU N33D 2 l3arN M0r3!!!\n\n"
#l33T Convertor 1S Script thats Convert the English Languages to the l33t languages (Numbers) .
#MorE Informtion About l33t U can Get (http://en.wikipedia.org/wiki/Leet)
puts "\t\t###### Wellcome to the l33t Converter V1.5 ######\n"
require 'jcode'
$__output__= ''
print "Please Enter the Phrase:"
$l33t = gets.chomp.downcase
alphabet = ['4','8','[','|>','3','|=','6','/-/','1','_/','|<','|_','(V)','/V','0','|>','<|','|?','$','7','(_)','\/','vv','}{','`/','2']
$l33t.each_char do |char|
case char
when "a": char = alphabet[0]
when "b": char = alphabet[1]
when "c": char = alphabet[2]
when "d" : char = alphabet[3]
when "e" : char = alphabet[4]
when "f" : char = alphabet[5]
when "g" : char = alphabet[6]
when "h" : char = alphabet[7]
when "i" : char = alphabet[8]
when "j" : char = alphabet[9]
when "k" : char = alphabet[10]
when "l" : char = alphabet[11]
when "m" : char = alphabet[12]
when "n" : char = alphabet[13]
when"o" : char = alphabet[14]
when "p" : char = alphabet[15]
when "q" : char = alphabet[16]
when "r" : char = alphabet[17]
when "s" : char = alphabet[18]
when "t" : char = alphabet[19]
when "u" : char = alphabet[20]
when "v" : char = alphabet[21]
when "w" : char = alphabet[22]
when"x" : char = alphabet[23]
when "y" : char = alphabet[24]
when "z" : char = alphabet[25]
end
$__output__ << char
end
location = (ENV['HOME'] + '/L33t.txt')
new_file = File.new(location ,'w+')
new_file.puts $__output__
new_file.close
##EnD 0F My C0dE!!!

تعليق