Jump to content

Logon verification (against Active Directory) and encrypted Password storage for later use


triodz
 Share

Recommended Posts

First example script. Yay for me! So apologies if there is a certain way i need to do this.

It is probably more accurate to state that this is code from different people put into a instantly usable script.

First, credits go to:

  • For the encrypt\decrypt code:
  • For the Verification against AD code:

I have added commentary in the scripts that will hopefully help the newbie factor out a bit. I've been there and its nice to have helpful comments.

In case you need to compare your situation with mine:

  • I work on a helpdesk. I log on with a standard signon and use a different signon for administrative tasks. I am using this to run other scripts as an administrator.

In "CredCheck.au3", it will check the username and password given against Active Directory. If it fails, it will let you know. If it succeeds, it will run the given program or script as administrator. It also writes the password to an ini file and encrypts it, and also writes the username - unencrypted.

In "Unencrypt Test.au3" it will unencrypt the password which will allow it to be injected into password fields of remote pc's if needed. In my case, I did need this.

CredCheck.au3

unencrypt test.au3

Good luck and any criticism welcome!

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

×
×
  • Create New...