Advertisement
EzFlow997

Character Encryption Data Generator

Jun 6th, 2024 (edited)
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 3.11 KB | Source Code | 0 0
  1. #NoEnv
  2. #Persistent
  3. #SingleInstance Force
  4. SetBatchLines, -1
  5. SendMode Input
  6.  
  7. Coordmode, Mouse, Screen
  8.  
  9. Hotkey, ^1, Exit
  10. Hotkey, ^2, PauseScript
  11. ;Hotkey, ^3, CreateSample4
  12. Hotkey, ^4, CreateSample5
  13.  
  14.  
  15. PauseScript(){
  16.     Suspend
  17. }
  18.  
  19. ;tempValue := KeysArray[92][2]
  20. ;tempValue := charsList[33]
  21. ;MsgBox, %tempValue%
  22.  
  23. global illegal_characters = [34, 39, 40, 41, 42, 43, 44, 45, 46, 47, 58, 59, 60, 61, 62, 91, 92, 93, 94, 95, 96, 123, 124, 125, 126, 127]
  24.  
  25. global min_characters := 6
  26. global max_characters := 10
  27. global characters := 0
  28.  
  29. CreateSample5(){           ; CREATES DATA MAP FORMAT ( CAN BE USED IN JAVASCRIPT CHECK EXAMPLE https://pastebin.com/rBdHm96K)
  30.     CreateSample4()
  31.     FileDelete, sample5.txt
  32.    
  33.     FileAppend, {, sample5.txt
  34.     Loop, read, %A_ScriptDir%/sample4.txt
  35.     {
  36.         if(A_Index == 1){
  37.             temp = %A_LoopReadLine%
  38.             FileAppend, %temp%`n, sample5.txt
  39.         }
  40.         else if(A_Index > 1 && A_Index < 69){
  41.            temp = ,%A_LoopReadLine%
  42.            FileAppend, %temp%`n, sample5.txt
  43.         }
  44.         else{
  45.            temp = ,%A_LoopReadLine%}
  46.            FileAppend, %temp%`n, sample5.txt
  47.         }
  48.     }
  49.    
  50. }
  51.  
  52. CreateSample4(){
  53.     FileDelete, sample4.txt
  54.     text1 := ""
  55.     i := 33
  56.     Loop, 95 {
  57.         if(!(illegal_characters.IndexOf(i) > 0)){
  58.             FileAppend, %i%:{, sample4.txt
  59.             Loop, 5 {
  60.                 Random, characters, %min_characters%, %max_characters%
  61.                 j := 0
  62.                 text1 := ""
  63.                 Loop, %characters% {
  64.                     temp := 0
  65.                     Random, temp, 33, 128
  66.                     while(illegal_characters.IndexOf(temp) > 0){
  67.                         Random, temp, 33, 128
  68.                         ;MsgBox, %temp%
  69.                     }
  70.                     text7 := chr(temp)
  71.                     if(text7 == "'" || text7 == """" || text7 == "`"){
  72.                         text7 = %text7%%text7%
  73.                     }
  74.                     text1 = %text1%%text7%
  75.                     j++
  76.                 }
  77.                 text3 = "%text1%"
  78.                 text4 := A_Space
  79.                 if(A_Index == 1){
  80.                     text2 = %A_Index%:%text3%,
  81.                 }
  82.                 else if(A_Index < 5 && A_Index != 1){
  83.                     text2 = %A_Index%:%text3%,
  84.                     text2 := " "+text2
  85.                 }
  86.                 else{
  87.                     text2 = %A_Index%:%text3%
  88.                     text2 := " "+text2
  89.                 }
  90.                 FileAppend, %text2%, sample4.txt
  91.             }
  92.             FileAppend, }`n, sample4.txt
  93.         }
  94.         i++
  95.     }
  96. }
  97.  
  98. CreateSample1(){
  99.     FileDelete, sample.txt
  100.     i := 33
  101.     Loop, 95 {
  102.         if(!(illegal_characters.IndexOf(i) > 0)){
  103.             text1 := chr(i)
  104.             text3 = "%text1%"
  105.             text2 = %i%:%text3%,
  106.             text4 := " "
  107.             FileAppend, %text2%%text4%, sample.txt
  108.         }
  109.         i++
  110.     }
  111. }
  112.  
  113. CreateSample2(){
  114.     FileDelete, sample2.txt
  115.     j := 33
  116.     Loop, 96 {
  117.         if(j != 127){
  118.             text6 := charsList[j]
  119.             FileAppend, %j% = %text6%`n, sample2.txt
  120.         }
  121.         j++
  122.     }
  123. }
  124.  
  125. CreateSample3(){
  126.     ;FileDelete, sample3.txt
  127.     Random, characters, %min_characters%, %max_characters%
  128.     Loop, %characters% {
  129.         temp := 0
  130.         Random, temp, 33, 128
  131.         while(temp == 127){
  132.             Random, temp, 33, 128
  133.             MsgBox, %temp%
  134.         }
  135.         text1 := chr(temp)
  136.         FileAppend, %text1%, sample3.txt
  137.     }
  138.     FileAppend, `n, sample3.txt
  139. }
  140.  
  141.  
  142.  
  143. Array(items*)
  144. {
  145.     items.base := ArrayEx
  146.     return items
  147. }
  148.  
  149. class ArrayEx
  150. {
  151.     IsArray[]
  152.     {
  153.         get {
  154.             return true
  155.         }
  156.     }
  157.  
  158.     IndexOf(item, case_sensitive:=false)
  159.     {
  160.         for i, val in this {
  161.             if (case_sensitive ? (val == item) : (val = item))
  162.                 return i
  163.         }
  164.     }
  165. }
  166.  
  167. Exit(){
  168.     ExitApp
  169. }
  170.  
  171.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement