Jump to content

Search the Community

Showing results for tags 'Using MDS-Hash'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I am in need of hashing out my passwords in scripts, but in order to do this I need to understand the code that I use and that it works ok. I have created a couple of test scripts to help me do this, but I am having some issues with these. The first script (works fine), I obtained from the examples and modified it slightly: #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <Crypt.au3> #include <WinAPI.au3> ; Example of realtime RC4 encryption $hWnd=GUICreate("Realtime Encrypting",400,300,-1) $hInputEdit=GUICtrlCreateEdit("",0,0,400,150,$ES_WANTRETURN) $hOutputEdit=GUICtrlCreateEdit("",0,150,400,150,$ES_READONLY) GUIRegisterMsg($WM_COMMAND,"WM_COMMAND") GUISetState(@SW_SHOW) Do $msg=GUIGetMsg() Until $msg=$GUI_EVENT_close Func WM_COMMAND($hWinHandle,$iMsg,$wParam,$lParam) ; If something was changed in the input editbox If _WinAPI_HiWord($wParam)=$EN_CHANGE And _WINAPI_LoWord($wParam)=$hInputEdit Then $bEncrypted = _Crypt_HashData(GUICtrlRead($hInputEdit),$CALG_MD5) GUICtrlSetData($hOutputEdit,$bEncrypted) EndIf EndFunc So with the above script I can get a hashed password, which I then embed in my script. I then used the script below to confirm it is reading a cleartext password and able to convert it to the hash password in my script. This part works. #include <Crypt.au3> ; Example of hashing data and using it to authenticate password ; This is the MD5-hash of the correct password $bPasswordHash="0xE10ADC3949BA59ABBE56E057F20F883E" $bPassword = Binary("0xE10ADC3949BA59ABBE56E057F20F883E") $sPassword=InputBox("Login","Please type the correct password.","","*") $password = _Crypt_HashData($sPassword,$CALG_MD5) If $password = $bPasswordHash Then MsgBox(64,"Access Granted","Password correct!" & @CRLF & BinaryToString($bPassword)) Else MsgBox(16,"Access Denied","You entered the wrong password!") EndIf What I need to do and have tried in the example above is convert my hash password into a cleartext string, so when I send the password with out programs it works. I was hoping the Binary function would work, but I am obviously misunderstanding it. Can someone offer me any help/advice please? Thanks, Jeff
×
×
  • Create New...