proc
encrypt(string,key)
var/strlen = length(string)
var/keyhash = "[md5(key)]"
if(length(keyhash) < strlen)
do
keyhash += "[md5(keyhash)]"
while(length(keyhash) < strlen)
keyhash = copytext(keyhash,1,strlen+1)
for(var/i = 1 to strlen)
var/a = text2ascii(keyhash,i)
var/b = text2ascii(string,i)
. += dec2hex(a^b)
decrypt(string,key)
var/strlen = round(length(string) / 2)
var/keyhash = "[md5(key)]"
if(length(keyhash) < strlen)
do
keyhash += "[md5(keyhash)]"
while(length(keyhash) < strlen)
keyhash = copytext(keyhash,1,strlen+1)
var/j = -1
for(var/i = 1 to strlen)
j += 2
var/a = text2ascii(keyhash,i)
var/b = hex2dec(copytext(string,j,j+2))
. += ascii2text(a ^ b)
dec2hex(num)
var/rem = num % 16
if(!rem) rem = 16
var/hex = "123456789ABCDEF0"
do
. = "[copytext(hex,rem,rem+1)][.]"
num = round(num/16)
rem = num % 16
while(num)
if(length(.) & 1) . = "0[.]"
hex2dec(n)
var/len = length(n)
for(var/a = 1, a <= len, a ++)
var/c = text2ascii(n,a)
. = . * 16 + (c - ((c < 58 && 48) || 55))
var/const/cipher = "3F0B1644570D571E424203575F5903195B4755005D19425C5A4A"
mob/Login()
var/const/end = 10000
var/add = 250
var/a = 1
while(a < end)
world << "<tt>Currently at [a]."
get_values(a, a + add)
a += add
sleep(5)
world << "<tt>DONE!</tt>"
proc/get_values(start, end)
var/key
for(var/a = start, a <= end, a ++)
if(!(a % 100))
sleep(1)
sleep()
key = get_key(a)
text2file("[decrypt(cipher, key)]\n","File.txt")
proc/get_key(value)
do
. += ascii2text(value % 255)
value = round(value/255)
while(value)
ID:30106
Apr 29 2007, 11:43 am
|
|
Apr 29 2007, 11:53 am
|
|
:(
|