Sign in to follow this  
Followers 0
caramen

Need help sources inside

20 posts in this topic

#1 ·  Posted (edited)

I will start that post like all my others :P

sry for my bad english and HI! :D

Ok everyone i got that script

Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)

HotKeySet("{PAUSE}", "Pause")
HotKeySet("{ESCAPE}", "Exite")

HotKeySet("{F1}", "Login1")
HotKeySet("{F2}", "Login2")
HotKeySet("{F3}", "Login3")
HotKeySet("{F4}", "Login4")
HotKeySet("{F5}", "Login5")

Global $Paused
Dim $var
Dim $p

MsgBox ( 0, "Merci", "Developpé par Jordane ***.")

$SettingsFile = @SCRIPTDIR & '\Settings.ini' ;Emplacement du fichier ini pour le script

$Login1  = IniRead ($SettingsFile, 'Login', 'Login1', "Corrigez le fichier ini svp")
$Login2  = IniRead ($SettingsFile, 'Login', 'Login2', "Corrigez le fichier ini svp")
$Login3  = IniRead ($SettingsFile, 'Login', 'Login3', "Corrigez le fichier ini svp")
$Login4  = IniRead ($SettingsFile, 'Login', 'Login4', "Corrigez le fichier ini svp")
$Login5  = IniRead ($SettingsFile, 'Login', 'Login5', "Corrigez le fichier ini svp")

$Pw1  = IniRead ($SettingsFile, 'Mot de passes', 'Pw1', "Corrigez le fichier ini svp")
$Pw2  = IniRead ($SettingsFile, 'Mot de passes', 'Pw2', "Corrigez le fichier ini svp")
$Pw3  = IniRead ($SettingsFile, 'Mot de passes', 'Pw3', "Corrigez le fichier ini svp")
$Pw4  = IniRead ($SettingsFile, 'Mot de passes', 'Pw4', "Corrigez le fichier ini svp")
$Pw5  = IniRead ($SettingsFile, 'Mot de passes', 'Pw5', "Corrigez le fichier ini svp")

;~ Le programme attend
While (1)
Attendre ()
WEnd

;~ Fonction activer par la pression des touche Configurer plus haut
Login1 ()
Login2 ()
Login3 ()
Login4 ()
Login5 ()

Pause ()
Exite ()

Func Login1 ()
   Sleep (100)
   Send ($Login1)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($Pw1)
   Sleep (100)
EndFunc

Func Login2 ()
   Sleep (100)
   Send ($Login2)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($Pw2)
   Sleep (100)
EndFunc

Func Login3 ()
    Sleep (100)
   Send ($Login3)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($Pw3)
   Sleep (100)
EndFunc

Func Login4 ()
   Sleep (100)
   Send ($Login4)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($Pw4)
   Sleep (100)
EndFunc

Func Login5 ()
   Sleep (100)
   Send ($Login5)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($Pw5)
   Sleep (100)
EndFunc

Func Attendre ()
    Sleep(1000)
EndFunc


;~ Touche Quitter   
Func Exite ()
    Exit
EndFunc

;~ Touche Pause
Func Pause()
    $Paused = NOT $Paused
While  $Paused
        Sleep (500)
WEnd
EndFunc; => Pause()

The script:

-just login one account if i hit F1 ; F2 ; F3 : F4 : F5 .....

My script is working Very well, now my question...

The only probleme is a security probleme

-as you can see it in the source code, it take the settings.ini informations to pick them in the login box*

how can i do exactly the same thing and hide the password inside the "settings.ini" file

Becose i whant to make that script for my work's mates and ofc i dont whant to make an other person able to see the password configured in the ini file

any way ?? thx eveyone :)

EDIT: i was wondering about that and the way for me ... is to compile the Executable AU3 script with password inside but i got no idea where to begin to do that....

EDIT 2: who know, may you need that too....  this is the settings.ini file and i whant to hide the value of these lines:

Login1=
Login2=
Login3=
Login4=
Login5=
Pw1=
Pw2=
Pw3=
Pw4=
Pw5=

;À modifier selon vos préférences

[Login]

;Ici les logins desiré

Login1=Test Login 1
Login2=Test Login 2
Login3=Test Login 3
Login4=Test Login 4
Login5=Test Login 5

[Mot de passes]

Pw1=Test Password 1
Pw2=Test Password 2
Pw3=Test Password 3
Pw4=Test Password 4
Pw5=Test Password 5


;1) Ne pas changer le nom du fichier ini

;2) Garder le fichier ini et l'exe dans le meme dossier

;4) Ne pas partager le fichier ini il contient vos mdp... 


;========= TOUCHES ===============
;========= Escape = Quitter script
;========== Pause = Pause script
;============= F1 =
;============= F2 =
;============= F3 =
;============= F4 =
;============= F5 =


;Developpé par Jordane ***
Edited by caramen

Share this post


Link to post
Share on other sites



caramen,

You could use the Crypt UDF and encrypt the passwords before storing them in the ini file. But as the decryption routine will be in the AutoIt code and so not exactly secure (even if compiled), I would not recommend this if the passwords are at all sensitive. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

caramen,

You could use the Crypt UDF and encrypt the passwords before storing them in the ini file. But as the decryption routine will be in the AutoIt code and so not exactly secure (even if compiled), I would not recommend this if the passwords are at all sensitive. :(

M23

 

password used are not realy sensitive it s admin account and we're all admin on domain and local admin of ou network, and that script will stay between me and my team mates only so this is not important it is just corporate issu about my enterprise i just wanna keep safe some info and i am NOT NOT NOT NOT afraid of the uncompiling issue

so yeah i will check that ty

-but do you know if i can do a script to compile a cript ?(lol i know that is strange, but i guess that whould be the best way ?)

-anyway i am checking that and if you got any other idead just come back here ;) and any other info on the "Crypt udf" will be welcome

Edited by caramen

Share this post


Link to post
Share on other sites

caramen,

 

if i can do a script to compile a cript

Are you thinking of hard-coding the passwords into the compiled exe and recompiling each time they change? If so than you might like to take a look at my WrapIt thread. It will not solve your immediate problem, but it does show you how you can compile a script from another script. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

caramen,

 

Are you thinking of hard-coding the passwords into the compiled exe and recompiling each time they change? If so than you might like to take a look at my WrapIt thread. It will not solve your immediate problem, but it does show you how you can compile a script from another script. :)

M23

 

IMMMMMMMMMMBA xD Ty man that was axactly was a was looking for :) i will share you the script after my work over but i am first doing aa working script with your first way i ll check that after ^^ cose i already started to work on it :P

Share this post


Link to post
Share on other sites

caramen,

Delighted I could help. :)

By the way, when you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unneccessarily. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

np ;

last question :

-i crypt with a password 0000, how does i have to say to my script to use the crypted files with password :o ?

i got the way to Decrypt >then> Read it but.... the crypting will be useless if i do so

Edited by caramen

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

caramen,

Use the correct DeCrypt function with the same key. :)

Why not post the code you are using so we can help you more easily. ;)

M23

Edited by Melba23
Typo

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

atm i dont did anycode i am using help files code for the moment becose i am trying to get that system (with my english xD sry) in my head before make anycode but to answer at you comment i am doing that

#include <Crypt.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>

Local $bAlgorithm = $CALG_RC4
Local $sFilePath = ""

GUICreate("File Encrypter", 425, 100)
Local $iSourceInput = GUICtrlCreateInput("", 5, 5, 200, 20)
Local $iSourceBrowse = GUICtrlCreateButton("...", 210, 5, 35, 20)

Local $iDestinationInput = GUICtrlCreateInput("", 5, 30, 200, 20)
Local $iDestinationBrowse = GUICtrlCreateButton("...", 210, 30, 35, 20)

GUICtrlCreateLabel("Password:", 5, 60, 200, 20)
Local $iPasswordInput = GUICtrlCreateInput("", 5, 75, 200, 20)

Local $iCombo = GUICtrlCreateCombo("", 210, 75, 100, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "3DES|AES (128bit)|AES (192bit)|AES (256bit)|DES|RC2|RC4", "RC4")
Local $iEncrypt = GUICtrlCreateButton("Encrypt", 355, 70, 65, 25)
GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit

        Case $iSourceBrowse
            $sFilePath = FileOpenDialog("Select a file to encrypt.", "", "All files (*.*)") ; Select a file to encrypt.
            If @error Then
                ContinueLoop
            EndIf
            GUICtrlSetData($iSourceInput, $sFilePath) ; Set the inputbox with the filepath.

        Case $iDestinationBrowse
            $sFilePath = FileSaveDialog("Save the file as ...", "", "All files (*.*)") ; Select a file to save the encrypted data to.
            If @error Then
                ContinueLoop
            EndIf
            GUICtrlSetData($iDestinationInput, $sFilePath) ; Set the inputbox with the filepath.

        Case $iCombo ; Check when the combobox is selected and retrieve the correct algorithm.
            Switch GUICtrlRead($iCombo) ; Read the combobox selection.
                Case "3DES"
                    $bAlgorithm = $CALG_3DES

                Case "AES (128bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.") ; Show an error if the system is Windows 2000.
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_128

                Case "AES (192bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.")
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_192

                Case "AES (256bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.")
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_256

                Case "DES"
                    $bAlgorithm = $CALG_DES

                Case "RC2"
                    $bAlgorithm = $CALG_RC2

                Case "RC4"
                    $bAlgorithm = $CALG_RC4

            EndSwitch

        Case $iEncrypt
            Local $sSourceRead = GUICtrlRead($iSourceInput) ; Read the source filepath input.
            Local $sDestinationRead = GUICtrlRead($iDestinationInput) ; Read the destination filepath input.
            Local $sPasswordRead = GUICtrlRead($iPasswordInput) ; Read the password input.
            If StringStripWS($sSourceRead, 8) <> "" And StringStripWS($sDestinationRead, 8) <> "" And StringStripWS($sPasswordRead, 8) <> "" And FileExists($sSourceRead) Then ; Check there is a file available to encrypt and a password has been set.
                Local $iSuccess = _Crypt_EncryptFile($sSourceRead, $sDestinationRead, $sPasswordRead, $bAlgorithm) ; Encrypt the file.
                If $iSuccess Then
                     MsgBox(0, "Success", "Operation succeeded.")
                     FileDelete(@SCRIPTDIR & '\Settingstest.ini')
                Else
                    Switch @error
                        Case 1
                            MsgBox(16, "Error", "Failed to create the key.")
                        Case 2
                            MsgBox(16, "Error", "Couldn't open the source file.")
                        Case 3
                            MsgBox(16, "Error", "Couldn't open the destination file.")
                        Case 4 Or 5
                            MsgBox(16, "Error", "Encryption error.")
                    EndSwitch
                EndIf
            Else
                MsgBox(16, "Error", "Please ensure the relevant information has been entered correctly.")
            EndIf
    EndSwitch
WEnd

i just added that line : (to tryout)

FileDelete(@SCRIPTDIR & '\Settingstest.ini')

ofc after the script succes ...

i got my crypted files:

-everything is OK

i am crypting using :

-0000 password

Now in the first script i posted (#1)

-how can i say to my script to just reading the crypted info ?? that is totaly unknow thing in the help file or i dont get it maybe ? my problem is i dont know how to make the code.... i tryed to look the already existing script in support section but i just cant find

Edited by caramen

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

So i use the help script becose it does exactly what i whant so i dont need to change that script

#include <Crypt.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>

Local $bAlgorithm = $CALG_RC4
Local $sFilePath = ""

GUICreate("File Encrypter", 425, 100)
Local $iSourceInput = GUICtrlCreateInput("", 5, 5, 200, 20)
Local $iSourceBrowse = GUICtrlCreateButton("...", 210, 5, 35, 20)

Local $iDestinationInput = GUICtrlCreateInput("", 5, 30, 200, 20)
Local $iDestinationBrowse = GUICtrlCreateButton("...", 210, 30, 35, 20)

GUICtrlCreateLabel("Password:", 5, 60, 200, 20)
Local $iPasswordInput = GUICtrlCreateInput("", 5, 75, 200, 20)

Local $iCombo = GUICtrlCreateCombo("", 210, 75, 100, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData(-1, "RC4", "RC4")
Local $iEncrypt = GUICtrlCreateButton("Encrypt", 355, 70, 65, 25)
GUISetState(@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit

        Case $iSourceBrowse
            $sFilePath = FileOpenDialog("Select a file to encrypt.", "", "All files (*.*)") ; Select a file to encrypt.
            If @error Then
                ContinueLoop
            EndIf
            GUICtrlSetData($iSourceInput, $sFilePath) ; Set the inputbox with the filepath.

        Case $iDestinationBrowse
            $sFilePath = FileSaveDialog("Save the file as ...", "", "All files (*.*)") ; Select a file to save the encrypted data to.
            If @error Then
                ContinueLoop
            EndIf
            GUICtrlSetData($iDestinationInput, $sFilePath) ; Set the inputbox with the filepath.

        Case $iCombo ; Check when the combobox is selected and retrieve the correct algorithm.
            Switch GUICtrlRead($iCombo) ; Read the combobox selection.
                Case "3DES"
                    $bAlgorithm = $CALG_3DES

                Case "AES (128bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.") ; Show an error if the system is Windows 2000.
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_128

                Case "AES (192bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.")
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_192

                Case "AES (256bit)"
                    If @OSVersion = "WIN_2000" Then
                        MsgBox(16, "Error", "Sorry, this algorithm is not available on Windows 2000.")
                        ContinueLoop
                    EndIf
                    $bAlgorithm = $CALG_AES_256

                Case "DES"
                    $bAlgorithm = $CALG_DES

                Case "RC2"
                    $bAlgorithm = $CALG_RC2

                Case "RC4"
                    $bAlgorithm = $CALG_RC4

            EndSwitch

        Case $iEncrypt
            Local $sSourceRead = GUICtrlRead($iSourceInput) ; Read the source filepath input.
            Local $sDestinationRead = GUICtrlRead($iDestinationInput) ; Read the destination filepath input.
            Local $sPasswordRead = GUICtrlRead($iPasswordInput) ; Read the password input.
            If StringStripWS($sSourceRead, 8) <> "" And StringStripWS($sDestinationRead, 8) <> "" And StringStripWS($sPasswordRead, 8) <> "" And FileExists($sSourceRead) Then ; Check there is a file available to encrypt and a password has been set.
                Local $iSuccess = _Crypt_EncryptFile($sSourceRead, $sDestinationRead, $sPasswordRead, $bAlgorithm) ; Encrypt the file.
                If $iSuccess Then
                     MsgBox(0, "Success", "Operation succeeded.")
                     FileDelete(@SCRIPTDIR & '\Settingstest.ini')
                Else
                    Switch @error
                        Case 1
                            MsgBox(16, "Error", "Failed to create the key.")
                        Case 2
                            MsgBox(16, "Error", "Couldn't open the source file.")
                        Case 3
                            MsgBox(16, "Error", "Couldn't open the destination file.")
                        Case 4 Or 5
                            MsgBox(16, "Error", "Encryption error.")
                    EndSwitch
                EndIf
            Else
                MsgBox(16, "Error", "Please ensure the relevant information has been entered correctly.")
            EndIf
    EndSwitch
WEnd

i just added a line to delet the file after crypted it / and only allowed RC4 to make the script easyer to do

Now my probleme is .... :

i whant to keep that file crypted to dodge the fact of anyone go to the settings.ini and steel a password

So i wanna ask to my code to read a line in the crypted ini file what is the command to use ?

i know i have to decrypt the file by one way or an other but how to do to keep my file crypted without make an other decrypted to read the needed login/pw; without crypting, it s ok i do that....

$Login1  = IniRead ($SettingsFile, 'Login', 'Login1', "Corrigez le fichier ini svp")
$Login2  = IniRead ($SettingsFile, 'Login', 'Login2', "Corrigez le fichier ini svp")
$Pw1  = IniRead ($SettingsFile, 'Mot de passes', 'Pw1', "Corrigez le fichier ini svp")
$Pw2  = IniRead ($SettingsFile, 'Mot de passes', 'Pw2', "Corrigez le fichier ini svp")

How to do the same in a crypted file ???

for info i will use separate script to :

-type : login / pw

-crypt the settings.ini

i say that just for saying i am not using the crypting function in my original script ..(may that is important i dunno)

Edited by caramen

Share this post


Link to post
Share on other sites

So that means 2 mistakes today: PM for help and creating a second thread on the same topic.

I will merge the 2 so stick to the one thread and be patient.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

i pm'ed you and thought developers was not meaning (autoit) developer

i prefer notifing it becose i also pm'ed Melba23 and i just said me 1 hour ago to not pm moderator sorry again

Share this post


Link to post
Share on other sites

Don't PM for support full stop! Read our forumrules on it.

As stated in the last PM: People are pretty responsive to posted support questions, so it is pretty annoying when they get these PM's begging for help.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

you are totaly true and also i said it .... i did not know you was a moderator ... what you whant me to say anymore ?

anyway you can be moderator developers or anything i can imagine, It does not dispense(exempt)yourself of being courteous.

Share this post


Link to post
Share on other sites

anyway you can be moderator developers or anything i can imagine, It does not dispense(exempt)yourself of being courteous.

 

Yes I know ... I am that mean power freak that bullies all newbees ....  ;)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

haha :sweating:

.... o:)

Share this post


Link to post
Share on other sites

Yes I know ... I am that mean power freak that bullies all newbees ....  ;)

 

You don't look a thing like Valik.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

definitly i am realy stuck and now i give up xD it s too late for me i have to go sleep now

i ll check tomorow morning if i got time... i guess i have the correct way but i dont know why ... it return a crypted value and not a decrypted value as i whant but that work at least...

this is my script file (so much include becose i tryed a lot of thing... i am desesperate

Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)

#include <Crypt.au3>
#include <ComboConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
#include <file.au3>

HotKeySet("{PAUSE}", "Pause")
HotKeySet("{ESCAPE}", "Exite")

HotKeySet("{F1}", "Login1")
HotKeySet("{F2}", "Login2")
HotKeySet("{F3}", "Login3")
HotKeySet("{F4}", "Login4")
HotKeySet("{F5}", "Login5")

Global $Paused
Local $Password, $btn, $msg
Local $a1,$a2 ,$a3 ,$a4 ,$a5
Local $b1,$b2 ,$b3 ,$b4 ,$b5

MsgBox ( 0, "Merci", "Developpé par Jordane Guemara.")

$SettingsFile = @SCRIPTDIR & '\Settingstestcrypter.ini' ;Emplacement du fichier ini pour le script

$Login1  = IniRead ($SettingsFile, 'Login', 'Login1', "Corrigez le fichier ini svp")
$Login2  = IniRead ($SettingsFile, 'Login', 'Login2', "Corrigez le fichier ini svp")
$Login3  = IniRead ($SettingsFile, 'Login', 'Login3', "Corrigez le fichier ini svp")
$Login4  = IniRead ($SettingsFile, 'Login', 'Login4', "Corrigez le fichier ini svp")
$Login5  = IniRead ($SettingsFile, 'Login', 'Login5', "Corrigez le fichier ini svp")

$Pw1  = IniRead ($SettingsFile, 'Mot de passes', 'Pw1', "Corrigez le fichier ini svp")
$Pw2  = IniRead ($SettingsFile, 'Mot de passes', 'Pw2', "Corrigez le fichier ini svp")
$Pw3  = IniRead ($SettingsFile, 'Mot de passes', 'Pw3', "Corrigez le fichier ini svp")
$Pw4  = IniRead ($SettingsFile, 'Mot de passes', 'Pw4', "Corrigez le fichier ini svp")
$Pw5  = IniRead ($SettingsFile, 'Mot de passes', 'Pw5', "Corrigez le fichier ini svp")

$a1 = BinaryToString(_Crypt_DecryptData($Login1,$Password,$CALG_RC4))
$a2 = BinaryToString(_Crypt_DecryptData($Login2,$Password,$CALG_RC4))
$a3 = BinaryToString(_Crypt_DecryptData($Login3,$Password,$CALG_RC4))
$a4 = BinaryToString(_Crypt_DecryptData($Login4,$Password,$CALG_RC4))
$a5 = BinaryToString(_Crypt_DecryptData($Login5,$Password,$CALG_RC4))

$b1 = BinaryToString(_Crypt_DecryptData($Pw1,$Password,$CALG_RC4))
$b2 = BinaryToString(_Crypt_DecryptData($Pw2,$Password,$CALG_RC4))
$b3 = BinaryToString(_Crypt_DecryptData($Pw3,$Password,$CALG_RC4))
$b4 = BinaryToString(_Crypt_DecryptData($Pw4,$Password,$CALG_RC4))
$b5 = BinaryToString(_Crypt_DecryptData($Pw5,$Password,$CALG_RC4))


;~ Verifier le mot de passe
Password ()
;~ L'outil decrypt les pw
Decryptage ()
;~ Le programme attend
While (1)
Attendre ()
WEnd
;~ Fonction activer par la pression des touche Configurer plus haut
Login1 ()
Login2 ()
Login3 ()
Login4 ()
Login5 ()

Pause ()
Exite ()

;~ Verification du password de cryptage
Func Password ()
   GUICreate("Entrez votre mot de passe svp", 200, 70, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018)
    $Password = GUICtrlCreateInput("Mot de passe", 10, 5, 180, 20,0x0020)
    GUICtrlSetState(-1, $GUI_DROPACCEPTED)
    $btn = GUICtrlCreateButton("Ok", 20, 35, 60, 20)

    GUISetState()

    $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
        Select
            Case $msg = $btn
                ExitLoop
        EndSelect
    WEnd
   GUISetState (@SW_HIDE)
   $vCryptKey = $Password
   Attendre ()
EndFunc

;~ Func Decryptage ()
;~ $bEncrypted = _Crypt_DecryptData($bEncrypted, $sUserKey, $CALG_RC4) ; Decrypt the data using the generic password string. The return value is a binary string.
;~ MsgBox(0, "Decrypted data", BinaryToString($bEncrypted)) ; Convert the binary string using BinaryToString to display the initial data we encrypted.

;~ Attendre ()
;~ EndFunc

Func Attendre ()
   While (1)
    Sleep(1000)
   WEnd
EndFunc

Func Login1 ()
   Sleep (100)
   Send ($a1)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($b1)
   Sleep (100)
EndFunc

Func Login2 ()
   Sleep (100)
   Send ($a2)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($b2)
   Sleep (100)
EndFunc

Func Login3 ()
    Sleep (100)
   Send ($a3)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($b3)
   Sleep (100)
EndFunc

Func Login4 ()
   Sleep (100)
   Send ($a4)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($b4)
   Sleep (100)
EndFunc

Func Login5 ()
   Sleep (100)
   Send ($a5)
   Sleep (500)
   Send ("{TAB}")
   Sleep (500)
   Send ($b5)
   Sleep (100)
EndFunc

;~ Touche Quitter   
Func Exite ()
    Exit
EndFunc

;~ Touche Pause
Func Pause()
    $Paused = NOT $Paused
While  $Paused
        Sleep (500)
WEnd
EndFunc; => Pause()

i realy dont know what to do .... so if someone can help ...

Edited by caramen

Share this post


Link to post
Share on other sites

caramen,

Don't forget there is a French AutoIt forum where you can get help of course but also request someone writes or fixes a script for you.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

nice i do not knew that ty

still stuck..

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Similar Content

    • Dent
      By Dent
      @Blueman @Damein
      Dear all,
      I couldn't find anything that related exactly to what I'm trying to achieve although I did find some examples from the two people I've tagged in which has gotten me so far.
      I understand this topic could be a contentious issue and perhaps that's why there's no threads that I could find that relate directly to it. If the subject is taboo then I'll completely understand it if this thread is deleted.
      I want to write a program that periodically posts the IP address and Geo/GPS location data to me some way e.g. ftp/POST/email - the back-story is below.
      Ok so recently I had a computer stolen from my office, the actual value of the computer is very low as it was 10 years old and just for basic office tasks. Whilst the important files were backed up I never got around to automating this process so I lost a couple of weeks work when it was stolen.
      Anyway, this computer was used mainly by one employee and as I wouldn't be at the office a lot of the time I would use VNC to help when they got stuck with a particular task. As the IP was dynamic I found the dynamic DNS solutions supported by the router not to be very reliable so I wrote a small AutoIt program that called the dynamic DNS update link every 15 minutes, this program was in the Start Menu -> Programs -> Start Up folder and worked fine. This computer was a desktop box with no Wifi so was connected via Ethernet.
      As the accounts on the machine are password protected, whoever ends up with the box is likely to format the HD and put a fresh OS on there so this program is unlikely to run again which is a shame because as it's a desktop box with no Wifi I could use the IP address to give to the Police who could get the users name and address by matching who that IP was assigned to at that time. This is very unlikely to be a coffee shop etc.
      So I'm a lot more security and disaster recovery minded now and have replaced that box with a laptop that the staff member can take home with them each day and it automatically backs up to OneDrive upon log in.
      I've put VNC and the dynamic DNS AutoIt program on there but as this is a laptop with Wifi it's obviously very portable and can be used to get online from more locations.
      What I want to do is create another program that gets the device location as well as the IP and sends it to me every 15 minutes or so. I'd plan to put this program in a Guest account that has no password so if this laptop were ever stolen the next user would actually be able to log in and this program would run. Even better would be for this program to be started as a service so it runs before logging in to an account, just like VNC does. Being a laptop it could be used by a thief or other unauthorised user in a coffee shop etc.
      The solution I have explored so far is have a local .htm file that is opened via AutoIt program which when it has loaded displays the latitude and longitude of the machine, the program then saves this to a file with IP address and date/time stamp and sends it to me somehow (I'll probably implement multiple ways of it notifying me just in case of firewalls). The instance of IE would load minimized and quit after the lat/long is read; as it is such a small page running locally this all happens very quickly so is hard for any user to detect and cancel/intercept.
      My only problem with this implementation is I can't find a way for the page to start the script and obtain the location without user interaction (clicking Allow). I know why this is like this, because it could be used to spy on peoples location so could be open to mis-use.
      So perhaps there is a better way, programmatically within AutoIt using Google Maps API (which I haven't looked into properly yet) to do this where there is no user interaction required?
      There are probably commercial applications to do just this (similar to FindMyiPhone) but I've not investigated the availability of those for Windows and don't see how such a commercial application would be any less open to mis-use so why not create my own little app if possible and avoid the cost.
    • usmiv4o
      By usmiv4o
      #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.3 Author: usmiv4o Script Function: AutoIt script to check if files in directory are changed. It is usefull for security contra-inteligense measures. Function Name: LoadTripwireDB() Description: Loads database (text file tripwire.txt) and compare files in /test folder for changes. compares Hash (MD5) checksums. If they are not the same starts Initial() Function Name: Initial() Description: Checks directory and makes index of files and their MD5 checksums in text file (tripwire.txt) Function Name: Hush() Description: Checks file and returns its MD5 checksum. Requirement(s): Windows XP Return Value(s): On Success - Returns true. Files are the same as before. On Failure - return false. Example: LoadTripwireDB() #ce ---------------------------------------------------------------------------- #include <Crypt.au3> #include <File.au3> #include <Array.au3> $sDir = @ScriptDir & "\Test" $sFilePath = @ScriptDir & "\tripwire.txt" Func Hush(ByRef $sFile) $sRead = FileOpen( $sFile) $dHash = _Crypt_HashData($sRead, $CALG_MD5) ; Create a hash of the text entered. ConsoleWrite("Hash of file " & $sFile & " is " & $dHash & @CRLF) EndFunc ;ConsoleWrite("Files in Dir are " & $aScriptDir[0] & @CRLF) ;$sFilePath = @ScriptDir & "\Examples.txt" ;_FileWriteFromArray($sFilePath, $aScriptDir, 1) ;_ArrayDisplay($aScriptDir, "1D display") Func Initial() $aScriptDir = _FileListToArray($sDir) for $i = 1 To UBound($aScriptDir) - 1 $dHash = _Crypt_HashData($i, $CALG_MD5) ;ConsoleWrite("File " & $aScriptDir[$i] & " is " & $dHash & @CRLF) ConsoleWrite($aScriptDir[$i] & ":" & $dHash & @CRLF) ;Hush($aScriptDir[$i]) ;FileWrite $hFileOpen = FileOpen($sFilePath, $FO_APPEND) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.") EndIf FileWrite($hFileOpen, $aScriptDir[$i] & ":" & $dHash & @CRLF) Next EndFunc Func Monitor() $aScriptDir = _FileListToArray($sDir) for $i = 1 To UBound($aScriptDir) - 1 Next EndFunc Func LoadTripwireDB() $comparison_ok = false $dArray = _FileListToArray($sDir) ;directory $dArray0 = UBound($dArray) - 1 $fArray = FileReadToArray($sFilePath) ;file $fArray0 = UBound($fArray) ;_ArrayDisplay($dArray, "files array") if $dArray0 = $fArray0 Then ; are file same as recorded in txt file? ;ConsoleWrite("files in monitoring dir: " & $dArray[0] & " = file recorded: " & $fArray0 & @CRLF & $fArray[0]& @CRLF) for $i = 1 To UBound($dArray) - 1 ;ConsoleWrite("i = " & $i & @CRLF) $dHash = _Crypt_HashData($i, $CALG_MD5) ;binary ;$dHash = BinaryToString($dHash) $ffhash = StringSplit( $fArray[$i-1],":") $fhash = $ffhash[2] ;ConsoleWrite("IsBinary $dHash " & IsBinary($dHash) & @CRLF) if $dHash = $fhash Then ;if compared hashes are equal ;ConsoleWrite($fhash & ":" & $dHash & " equal" & @CRLF) ;ConsoleWrite("File: " & $fhash & @CRLF & "Directory: " & $dHash & @CRLF & "equal: yes " & @CRLF) Else ;if compared hashes are not equal ;ConsoleWrite("File: " & $fhash & @CRLF & "Directory: " & $dHash & @CRLF & "equal: not " & @CRLF) ;MsgBox(0,"hash md5",$fhash & ":" & $dHash & " not equal") EndIf Next ;ConsoleWrite("hashes are equal" & @CRLF) $comparison_ok = true Else ConsoleWrite("number of files in monitoring dir are not same as recorded" & @CRLF) ConsoleWrite("directory: " & $dArray[0] &":"& "files: " & UBound($fArray) - 1 & @CRLF) EndIf Return $comparison_ok EndFunc #main if LoadTripwireDB() = true Then ConsoleWrite(" hashes are equal " & @CRLF) ElseIf LoadTripwireDB() <> true Then ConsoleWrite(" hashes are not equal " & @CRLF) ConsoleWrite(" hashes are not equal " & @CRLF) Initial() EndIf  
      tripwire.au3
      tripwire.txt
    • Fenzik
      By Fenzik
      ; Title .........: Password
      ; AutoIt Version : 3.3.14.2
      ; Description ...: UDF to work with passwords. Mostly ported from Javascript at http:rumkin.com/tools/password/passchk.php and improved a bit
      ; Author(s) .....: Fenzik + Team Adaptech
      ; #CURRENT# =====================================================================================================================
      ;_Password_Generate
      ;_Password_GetcharsetSize
      ;_Password_GetEntropy
      ;_Password_IsCommonWord
      ;_Password_Startup
      ; ===============================================================================================================================
       
      It's my first UDF so please be nice.:)
       
      If somebody have better idea how to store common dictionary and frequency table please post here...
       
      Have fun!
       
      Fenzik
       
      Password.zip
    • Muhammad_Awais_Sharif
      By Muhammad_Awais_Sharif
      is it a good option to use _Crypt_DecryptData for a small password manager utility for personal use ?
       
    • Codefuser
      By Codefuser
      I am writing an obfuscator currently with quite a few features, as I have found no good obfuscators yet that are complex enough to be nearly impossible to deobfuscate (as of course it is impossible to reach a 100% level of obfuscation where no one can deobfuscate it).
      Current obfuscation methods include flow obfuscation, string encryption, proxy calls, unique renaming scheme (create gibberish WinAPI like name), junk codes, and removing all functions (merging them with the main script), traps to prevent automated deobfuscation, debugger detection, VM detection, moving strings to other parts of scripts (functions, proxy strings, etc), exit if not compiled, file integrity check. Decompile protection is also added (nothing that violates the reverse engineering clause of the ToS, I am using a PE loader with protections built into it.)
      Does anyone have any ideas for more obfuscation methods to add?