Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.80 KB | None | 0 0
  1. #include <crypt.au3>
  2.  
  3. ;SPEICHERN
  4. $handle = FileOpen(@ScriptDir & '\Hall2o08453.jpg', 16)
  5. $sContent = FileRead($handle)
  6. FileClose($handle)
  7.  
  8. $sOriginalHash = StringTrimLeft(_Crypt_HashData($sContent, $CALG_MD5), 2)
  9.  
  10. FileDelete(@ScriptDir & '\test.jpg')
  11. $handle = FileOpen(@ScriptDir & '\test.jpg', 17)
  12. FileWrite($handle, $sContent & $sOriginalHash)
  13. FileClose($handle)
  14.  
  15.  
  16. ;LADEN
  17. $handle = FileOpen(@ScriptDir & '\test.jpg', 16)
  18. $sContent = FileRead($handle)
  19. FileClose($handle)
  20.  
  21. $sFileHash = StringRight($sContent, 32)
  22. $sContent = StringTrimRight($sContent, 32)
  23.  
  24. $sNeuerDateiHash = StringTrimLeft(_Crypt_HashData($sContent, $CALG_MD5), 2)
  25.  
  26. MsgBox(0,"","Hash vor Editierung: " & $sOriginalHash & @CRLF & _
  27.             "Hash in der Datei: " & $sFileHash & @CRLF & _
  28.             "Hash nach Editierung: " & $sNeuerDateiHash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement