imk0tter

Imk0tter Encoding

Jul 1st, 2023
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.77 KB | None | 0 0
  1. alias Default_Advanced_Encoder {
  2.   return $Advanced_Encoder_Base(93,33,$1-)
  3. }
  4. alias Advanced_Encoder_Base {
  5.   .bigfloat on
  6.   var %base $1
  7.   var %offset $2
  8.   var %text $3-
  9.  
  10.   var %NIGGER INTERNETWENEEDSOLARSYSTEMOFTHESUNPLANETEARTHUNITEDSTATESOFAMERICA
  11.  
  12.   var %NIGGER_CHAR $mid(%NIGGER,$calc(%NIGGER_COUNT_2 % $len(%NIGGER) + 1), 1)
  13.  
  14.   var %current_nigger $TOKEN($TEXT_TO_NUMBER_BASE(256, %NIGGER_CHAR),2,43)
  15.   inc %NIGGER_COUNT_2
  16.  
  17.   var %current_digit $calc((%current_nigger + 1) * $text_to_number_base(256,%text))
  18.   var %encoded_entry_number
  19.   bset -z &data -1
  20.   while %current_digit > 0 {
  21.  
  22.     bset &data -1 $calc(%current_digit % %base + %offset)
  23.     var %current_digit $calc((%current_digit - (%current_digit % %base)) / %base)
  24.   }
  25.   return $calc(%current_nigger + 1) $bvar(&data,1,$bvar(&data,-1)).text
  26. }
  27.  
  28. alias Default_Advanced_Decoder {
  29.   return $Advanced_Decoder_Base(93,33,$1,$2-)
  30. }
  31. alias Advanced_Decoder_Base {
  32.   .bigfloat on
  33.   var %base $1
  34.   var %offset $2
  35.  
  36.   var %nigger $3
  37.  
  38.   var %text $4-
  39.  
  40.   var %number $encoding_to_number_base(%base,%offset,%nigger,%text)
  41.   var %number $calc(%number / %nigger)
  42.   var %seperator $int($logn(256, %number))
  43.   var %first_part $round($calc(%number / (%number / 256 ^ %seperator)),4)
  44.   var %second_part $round($calc((%number - %first_part) * %nigger)),4)
  45.   return $NUMBER_TO_TEXT_BASE(256, %second_part)
  46. }
  47. alias TEXT_TO_BVAR {
  48.   var %x $len($1-)
  49.   var %ret
  50.   while %x {
  51.     var %ret $asc($mid($1-,%x,1)) %ret
  52.     dec %x
  53.   }
  54.   return %ret
  55. }
  56. alias TEXT_TO_NUMBER_BASE {
  57.   .bigfloat on
  58.   bset -z &ttnb
  59.   var %base $1
  60.   bset &ttnb -1 $TEXT_TO_BVAR($2-)
  61.   var %length $bvar(&ttnb,0)
  62.   var %number_max $calc(%base ^ %length), %number 0
  63.  
  64.   var %x %length
  65.  
  66.  
  67.   while %x {
  68.     var %number $calc(%number * %base + $bvar(&ttnb,%x,1))
  69.     dec %x
  70.   }
  71.   return %number_max + %number
  72. }
  73.  
  74. alias NUMBER_TO_TEXT_BASE {
  75.   .bigfloat on
  76.   bset -z &number_to_base
  77.   var %base $1
  78.   var %x $2-
  79.   var %text
  80.   while %x {
  81.     bset &number_to_base -1 $calc(%x % %base)
  82.     var %x $calc((%x - (%x % %base)) / %base)
  83.   }
  84.   return $bvar(&number_to_base,1,$bvar(&number_to_base,0)).text
  85. }
  86.  
  87. alias Encoding_To_number_Base {
  88.   .bigfloat on
  89.   var %base $1
  90.   var %offset $2
  91.   var %nigger $3
  92.   var %text $4-
  93.  
  94.   var %x $len(%text), %number 0
  95.   while %x {
  96.     var %number %number * %base
  97.     var %char $mid(%text,%x,1)
  98.     var %mod $asc(%char) - %offset
  99.     var %number %number + %mod
  100.     dec %x
  101.   }
  102.   return %number
  103. }
  104.  
  105.  
  106. ;;;;;;;;;;;;;;;;;;;;;;;;;;
  107. ;;;;;;;;;;;;;;;;;;;;;;;;;;
  108.  
  109. on 1:input:@CRYPTO: {
  110.   if $left($1,1) != / {
  111.     var %encoded $token($Advanced_Encoder_Base(26,65,$1-),2-,32)
  112.     echo -a < $+ $ME $+ >: $1-
  113.     msg #mopar %encoded
  114.   }
  115. }
  116. on 1:text:*:#mopar: {
  117.   echo @CRYPTO < $+ $nick $+ >: $1-
  118. }
Add Comment
Please, Sign In to add comment