Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias Default_Advanced_Encoder {
- return $Advanced_Encoder_Base(93,33,$1-)
- }
- alias Advanced_Encoder_Base {
- .bigfloat on
- var %base $1
- var %offset $2
- var %text $3-
- var %NIGGER INTERNETWENEEDSOLARSYSTEMOFTHESUNPLANETEARTHUNITEDSTATESOFAMERICA
- var %NIGGER_CHAR $mid(%NIGGER,$calc(%NIGGER_COUNT_2 % $len(%NIGGER) + 1), 1)
- var %current_nigger $TOKEN($TEXT_TO_NUMBER_BASE(256, %NIGGER_CHAR),2,43)
- inc %NIGGER_COUNT_2
- var %current_digit $calc((%current_nigger + 1) * $text_to_number_base(256,%text))
- var %encoded_entry_number
- bset -z &data -1
- while %current_digit > 0 {
- bset &data -1 $calc(%current_digit % %base + %offset)
- var %current_digit $calc((%current_digit - (%current_digit % %base)) / %base)
- }
- return $calc(%current_nigger + 1) $bvar(&data,1,$bvar(&data,-1)).text
- }
- alias Default_Advanced_Decoder {
- return $Advanced_Decoder_Base(93,33,$1,$2-)
- }
- alias Advanced_Decoder_Base {
- .bigfloat on
- var %base $1
- var %offset $2
- var %nigger $3
- var %text $4-
- var %number $encoding_to_number_base(%base,%offset,%nigger,%text)
- var %number $calc(%number / %nigger)
- var %seperator $int($logn(256, %number))
- var %first_part $round($calc(%number / (%number / 256 ^ %seperator)),4)
- var %second_part $round($calc((%number - %first_part) * %nigger)),4)
- return $NUMBER_TO_TEXT_BASE(256, %second_part)
- }
- alias TEXT_TO_BVAR {
- var %x $len($1-)
- var %ret
- while %x {
- var %ret $asc($mid($1-,%x,1)) %ret
- dec %x
- }
- return %ret
- }
- alias TEXT_TO_NUMBER_BASE {
- .bigfloat on
- bset -z &ttnb
- var %base $1
- bset &ttnb -1 $TEXT_TO_BVAR($2-)
- var %length $bvar(&ttnb,0)
- var %number_max $calc(%base ^ %length), %number 0
- var %x %length
- while %x {
- var %number $calc(%number * %base + $bvar(&ttnb,%x,1))
- dec %x
- }
- return %number_max + %number
- }
- alias NUMBER_TO_TEXT_BASE {
- .bigfloat on
- bset -z &number_to_base
- var %base $1
- var %x $2-
- var %text
- while %x {
- bset &number_to_base -1 $calc(%x % %base)
- var %x $calc((%x - (%x % %base)) / %base)
- }
- return $bvar(&number_to_base,1,$bvar(&number_to_base,0)).text
- }
- alias Encoding_To_number_Base {
- .bigfloat on
- var %base $1
- var %offset $2
- var %nigger $3
- var %text $4-
- var %x $len(%text), %number 0
- while %x {
- var %number %number * %base
- var %char $mid(%text,%x,1)
- var %mod $asc(%char) - %offset
- var %number %number + %mod
- dec %x
- }
- return %number
- }
- ;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;
- on 1:input:@CRYPTO: {
- if $left($1,1) != / {
- var %encoded $token($Advanced_Encoder_Base(26,65,$1-),2-,32)
- echo -a < $+ $ME $+ >: $1-
- msg #mopar %encoded
- }
- }
- on 1:text:*:#mopar: {
- echo @CRYPTO < $+ $nick $+ >: $1-
- }
Add Comment
Please, Sign In to add comment