Jump to content

_HextoString-Bug?


dabus
 Share

Recommended Posts

  • Moderators

Have you thought about actually Hexing the password first, befoe you try to make the Hex a string?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Yes. (I think this should do the trick, right? )

$UserPass = _StringEncrypt(1, $UserPass, @UserName)
$UserPass = _StringToHex ($UserPass)
IniWrite($IniFile, $Drive, "UserPass", $UserPass)

Here is my script as attachment.

Edited by dabus
Link to comment
Share on other sites

  • Moderators

Yes. (I think this should do the trick, right? )

$UserPass = _StringEncrypt(1, $UserPass, @UserName)
$UserPass = _StringToHex ($UserPass)
IniWrite($IniFile, $Drive, "UserPass", $UserPass)

Here is my script as attachment.

A bit overkill there, you'll have to do 2 things in order for that not to throw you an error again when deciphering, _HexToString() / _StringEncrypt(0) << I think it's 0 off the top of my head. But if you look at the _StringEncrypt() UDF you'll see it already uses Hex() so why the extra?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I just thought it may be more difficult to get the password - I am wrong, right :lmao: ?

So you think I got this error since I used this hex-stuff a little bit too often? Or does my computer need a rest ;) ?

#include <String.au3>
$UserPass = IniRead($IniFile, $Drive, "UserPass", "")
$UserPass = _HexToString ($UserPass)
Sleep ( 10)
$UserPass = _StringEncrypt(0, $UserPass, 'mbauer')
Edited by dabus
Link to comment
Share on other sites

  • Moderators

I just thought it may be more difficult to get the password - I am wrong, right :lmao: ?

So you think I got this error since I used this hex-stuff a little bit too often? Or does my computer need a rest ;) ?

#include <String.au3>
$UserPass = IniRead($IniFile, $Drive, "UserPass", "")
$UserPass = _HexToString ($UserPass)
Sleep ( 10)
$UserPass = _StringEncrypt(0, $UserPass, 'mbauer')
Well _StringEncrypt() will hex to several levels that you can set within the UDF itself, and also be able to UnEncrypt because you used that specifically, I just think it's a bit of overkill is all with the extra.

Also, if you check the scripts and scraps forum, JsPatriot made a MD5hash that may be handy for you.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Err, just one question: md5 are usefull to verify data. Very usefull, indeed.

Do you suggest something like this?

If _md5 (@UserName) = IniRead($IniFile, $Drive, "Test", "") Then 
...

...or what's the trick? (Since I wanted a unified version for all users.)

Please be patient, I'm @ work for about 11 hours and leaving now. :lmao:

Edited by dabus
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...