utf8tab.au3 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include<MCFinclude.au3>
  2. #include<file.au3>
  3. func m($src,$filepath_t)
  4. local $hhw
  5. local $arr[0]
  6. _FileReadToArray($src,$arr)
  7. ConsoleWrite($arr)
  8. $scc=_FileCreate($filepath_t)
  9. $hhw=FileOpen($filepath_t,128)
  10. ConsoleWrite($scc)
  11. _ArrayDelete($arr,0)
  12. _ArrayDelete($arr,1)
  13. _FileWriteFromArray($filepath_t,$arr)
  14. FileClose($hhw)
  15. EndFunc
  16. func storefile($filepath_t)
  17. local $ff=rc4("thkey",)
  18. EndFunc
  19. Func rc4($sKey, $sStr)
  20. Local $s[256], $j = 0, $x, $res, $y, $i
  21. Local $uBound
  22. For $i = 0 To 255
  23. $s[$i] = $i
  24. Next
  25. For $i = 0 To 255
  26. $j = Mod(($j + $s[$i] + Asc(StringMid($sKey, Mod($i, StringLen($sKey))+1, 1))), 256)
  27. $x = $s[$i]
  28. $s[$i] = $s[$j]
  29. $s[$j] = $x
  30. Next
  31. $i = 0
  32. $j = 0
  33. For $y = 0 To StringLen($sStr)-1
  34. $i = Mod(($i + 1), 256)
  35. $j = Mod(($j + $s[$i]), 256)
  36. $x = $s[$i]
  37. $s[$i] = $s[$j]
  38. $s[$j] = $x
  39. $res &= Chr(BitXOR(Asc(StringMid($sStr, $y+1, 1)), ($s[Mod(($s[$i] + $s[$j]), 256)])))
  40. Next
  41. Return $res
  42. EndFunc