Jump to content

Need help sources inside


Recommended Posts

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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

 

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers

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 ....  ;)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

haha :sweating:

.... o:)

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
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)

Link to comment
Share on other sites

nice i do not knew that ty

still stuck..

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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...