aim password roaster
Posted by Parasite-FT-
Thursday, July 22, 2004
Description: paste for people using TOC
;; Function: 'Roasts' a password for use with AIM
;; Usage: $aim_roast(<password>)
;; Comments: Roasting is simply $xor'ing each character of the password with the corresponding
;; character of the roasting string - the roasting string for AIM TOC is 'Tic/Toc'
alias aim_roast {
;::: initialize variables for loop - roasting pass starts with 0x like any hex representation
var %roast = Tic/Toc, %roast_len = 7, %roasted_pass = 0x, %i = 1
;::: loop through each character of the password supplied
while ($asc($mid($1,%i,1))) {
var %char = $ifmatch
;::: grab the ASCII value of the corresponding char from the roasting string
var %roast_char = $asc($mid(%roast,$iif($calc(%i % %roast_len), $ifmatch, %roast_len),1))
;::: XOR the char from the pass from the char from the roasting string
var %xor_char = $xor(%char,%roast_char)
;::: get the hexadecimal value of the XOR'd char
var %hex_char = $base(%xor_char,10,16,2)
;::: concatenate the roasted password
%roasted_pass = %roasted_pass $+ %hex_char
inc %i
}
;::: return the lowercase of the roasted password when completed
return $lower(%roasted_pass)
}