Jump to content

Check password complexity


Recommended Posts

I am trying to create a utility that will check a users password complexity. I work at a school district and trying to get the students to understand our password complexity rules is pretty tough. What I have done is create a utility that executes when the user logs in. They are asked to enter their password into the input boxes and then confirm it too. The password is checked to make sure it contains 3 out of the 4 character types:

- Upper case

- Lower case

- Digit

- Special character

The password has to be at least 8 characters and cannot exceed 2 consecutive characters from the username.

Everything seems to be working except the finding of consecutive characters in the username. I have he script store the consecutive characters in an array, but instead of just storing the 1 character that is in the consecutive order in the username, it adds every letter that it matches to the array.

For example:

Username = tech

Password = Ilovetec1

The script see's that tec is in the password and that is also in the username. The problem is, it then uses the other e in the password and stores that in the array. So I end up with an array with the letters "etec".

I know I am coding this wrong, and I am wondering if anyone can help me correct my code or point me in the right direction.

This is the full script:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Array.au3>
#include <AD.au3>
#include <Crypt.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

$lower = 0
$upper = 0
$digit = 0
$special = 0
$pwChange = 0
Global $newPassword, $val
$rUser = @UserName
HotKeySet("{LWIN}","_Windows")
HotKeySet("{RWIN}","_Windows")
#Region ### START Koda GUI section ### Form=
$formBKG = GUICreate("",@DesktopWidth, @DesktopHeight, 0, 0,$WS_POPUP)
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
$formMain = GUICreate("Password Utility", 664, 200, -1,-1)
$lblPassword = GUICtrlCreateLabel("Your Password has expired. Please enter a new password for your account.", 8, 8, 288, 37)
$txtPassword = GUICtrlCreateInput("", 8, 45, 281, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$txtPasswordConfirm = GUICtrlCreateInput("", 8, 75, 281, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$btnPassword = GUICtrlCreateButton("Set Password", 216, 115, 75, 25)
$lblSuggestions = GUICtrlCreateLabel("", 8, 150, 300, 50)
$lblFname = GUICtrlCreateLabel("First Name: ", 420, 8, 237, 17)
$lblLName = GUICtrlCreateLabel("Last Name: ", 420, 37, 237, 17)
$lblUName = GUICtrlCreateLabel("Username: ", 420, 66, 237, 17)
$lblID = GUICtrlCreateLabel("Student ID: ", 420, 95, 237, 17)
$lblPasswordExp = GUICtrlCreateLabel("Password Expiration:", 420, 128, 237, 17)
GUISetState(@SW_SHOW)
;_ArrayDisplay($winPos)
WinSetOnTop("Password Utility","",1)
#EndRegion ### END Koda GUI section ###
_AD_Open()
$objProperties = _AD_GetObjectProperties($rUser)
$objCN = _AD_GetObjectProperties($rUser,"cn")
$objGivenName = _AD_GetObjectProperties($rUser,"givenName")
$objEmployeeID = _AD_GetObjectProperties($rUser,"employeeID")
$objSN = _AD_GetObjectProperties($rUser,"sn")
$objPWExpiration = _AD_GetObjectProperties($rUser,"msDS-UserPasswordExpiryTimeComputed")
$objFQDN = _AD_GetObjectProperties($rUser,"distinguishedName")
If IsArray($objCN) Then
    If $objCN[0][0] <> 0 Then
        $userName = $objCN[1][1]
    Else
        $userNameName = "Unavailable"
    EndIf
EndIf
If IsArray($objSN) Then
    If $objSN[0][0] <> 0 Then
        $lastName = $objSN[1][1]
    Else
        $lastName = "Unavailable"
    EndIf
EndIf
If IsArray($objGivenName) Then
    If $objGivenName[0][0] <> 0 Then
        $firstName = $objGivenName[1][1]
    Else
        $firstName = "Unavailable"
    EndIf
EndIf
If IsArray($objEmployeeID) Then
    If $objEmployeeID[0][0] <> 0 Then
        $employeeID = $objEmployeeID[1][1]
    Else
        $employeeID = "Unavailable"
    EndIf
EndIf
If IsArray($objPWExpiration) Then
    If $objPWExpiration[0][0] <> 0 Then
        $pwExpiration = $objPWExpiration[1][1]
    Else
        $pwExpiration = "Unavailable"
    EndIf
EndIf

;_ArrayDisplay($objProperties)
_AD_Close()
GUICtrlSetData($lblFname,"First Name: " & $firstName)
GUICtrlSetData($lblLName,"Last Name: " & $lastName)
GUICtrlSetData($lblUName,"Username: " & $userName)
GUICtrlSetData($lblID,"Student ID: " & $employeeID)
GUICtrlSetData($lblPasswordExp,"Password Expiration: " & $pwExpiration)
$Pic1 = GUICtrlCreatePic("C:\" & $employeeID & ".jpg", 312, 8, 100, 108)

While 1
    $winPos = WinGetPos("Password Utility")
    _MouseTrap($winPos[0],$winPos[1],$winPos[2],$winPos[3])
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btnPassword
            $lower = 0
            $upper = 0
            $digit = 0
            $special = 0
            If GUICtrlRead($txtPassword) = GUICtrlRead($txtPasswordConfirm) Then
                $stringLen = StringLen(GUICtrlRead($txtPassword))
                $stringUp = StringIsUpper(GUICtrlRead($txtPassword))
                $stringLow = StringIsLower(GUICtrlRead($txtPassword))
                $stringDig = StringIsDigit(GUICtrlRead($txtPassword))
                $arrayString = StringSplit(GUICtrlRead($txtPassword),"")
                $arrayString1 = StringRegExp(GUICtrlRead($txtPassword), "(?i)[" & $rUser & "]", 3)
                $passwordUsername = _ArrayToString($arrayString1,"",0,2)
                ;_ArrayDisplay($arrayString1)
                ;MsgBox(0,"",$passwordUsername )
                If $stringLen < 8 Then
                    GUICtrlSetData($lblSuggestions,"Password not long enough. You used " & $stringLen & " characters and you need to use at least 8.")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringUp = 1 Then
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $val = $i
                            ExitLoop
                        EndIf
                    Next
                    $lowerPassword = StringLower($arrayString[$val])
                    _ArrayDelete($arrayString,$val)
                    $arrayPassword = _ArrayInsert($arrayString,$val,$lowerPassword)
                    $newPassword = _ArrayToString($arrayString,"")
                    $digitPassword = Random(1,99,1)
                    GUICtrlSetData($lblSuggestions,"Password only upper case. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1) & $digitPassword)
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringLow = 1 Then
                    For $i = 1 To $arrayString[0]
                        If StringIsLower($arrayString[$i]) Then
                            $val = $i
                            ExitLoop
                        EndIf
                    Next
                    $upperPassword = StringUpper($arrayString[$val])
                    _ArrayDelete($arrayString,$val)
                    $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                    $newPassword = _ArrayToString($arrayString,"")
                    $digitPassword = Random(1,99,1)
                    GUICtrlSetData($lblSuggestions,"Password only lower case. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1) & $digitPassword)
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringDig = 1 Then
                    GUICtrlSetData($lblSuggestions,"Password only digits. Please add some characters to the password, with at least 1 upper case and 1 lower case letter.")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf StringInStr($rUser,$passwordUsername) And UBound($arrayString1) > 2 Then
                    GUICtrlSetData($lblSuggestions,"Password contains part of the username. There are at least 3 consecutive characters in your name that you have used for your password. The 3 consecutive letters are, " & $passwordUsername & ".")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf StringIsAlNum(GUICtrlRead($txtPassword)) Then
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $upper = 1
                        EndIf
                        If StringIsLower($arrayString[$i]) Then
                            $lower = 1
                        EndIf
                        If StringIsDigit($arrayString[$i]) Then
                            $digit = 1
                        EndIf
                    Next
                    If $upper + $lower + $digit <> 3 Then
                        If $upper = 0 Then
                            For $i = 1 To $arrayString[0]
                                If StringIsLower($arrayString[$i]) Then
                                    $val = $i
                                    ExitLoop
                                EndIf
                            Next
                            $upperPassword = StringUpper($arrayString[$val])
                            _ArrayDelete($arrayString,$val)
                            $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                            $newPassword = _ArrayToString($arrayString,"")
                            GUICtrlSetData($lblSuggestions,"Your password needs an upper case character. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1))
                            GUICtrlSetData($txtPasswordConfirm,"")
                            GUICtrlSetData($txtPassword,"")
                            $pwChange = 1
                        EndIf
                        If $pwChange = 0 Then
                            If $lower = 0 Then
                                For $i = 1 To $arrayString[0]
                                    If StringIsUpper($arrayString[$i]) Then
                                        $val = $i
                                        ExitLoop
                                    EndIf
                                Next
                                $lowerPassword = StringLower($arrayString[$val])
                                _ArrayDelete($arrayString,$val)
                                $arrayPassword = _ArrayInsert($arrayString,$val,$lowerPassword)
                                $newPassword = _ArrayToString($arrayString,"")
                                GUICtrlSetData($lblSuggestions,"Your password needs a lower case character. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                                $pwChange = 1
                            EndIf
                        EndIf
                        If $pwChange = 0 Then
                            If $digit = 0 Then
                                $digitPassword = Random(1,99,1)
                                $newPassword = GUICtrlRead($txtPassword) & $digitPassword
                                GUICtrlSetData($lblSuggestions,"Your password needs a number. You could try this as your new password." & @CR & $newPassword)
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                    Else
                        _AD_Open()
                        $pw = 1
                        If $pw = 1 Then
                            GUICtrlSetData($lblSuggestions,"Your new password has been set.")
                            Sleep(3000)
                            ;Exit
                        ElseIf @error = 1 Then
                            MsgBox(64, "Active Directory", "User '" & $rUser & "' does not exist")
                        Else
                            MsgBox(64, "Active Directory", "Return code '" & @error & "' from Active Directory")
                        EndIf
                        _AD_Close()
                        GUICtrlSetData($txtPasswordConfirm,"")
                        GUICtrlSetData($txtPassword,"")
                    EndIf
                Else
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $upper = 1
                        EndIf
                        If StringIsLower($arrayString[$i]) Then
                            $lower = 1
                        EndIf
                        If StringIsDigit($arrayString[$i]) Then
                            $digit = 1
                        EndIf
                        If StringIsUpper($arrayString[$i]) = 0 And StringIsLower($arrayString[$i]) = 0 And StringIsDigit($arrayString[$i]) = 0 Then
                            $special = 1
                        EndIf
                    Next
                    If $upper + $lower + $digit + $special < 3 Then
                        If $upper = 0 Then
                            For $i = 1 To $arrayString[0]
                                If StringIsLower($arrayString[$i]) Then
                                    $val = $i
                                    ExitLoop
                                EndIf
                            Next
                            $upperPassword = StringUpper($arrayString[$val])
                            _ArrayDelete($arrayString,$val)
                            $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                            $newPassword = _ArrayToString($arrayString,"")
                            $upper = 1
                            GUICtrlSetData($lblSuggestions,"Your password needs an upper case character. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                            GUICtrlSetData($txtPasswordConfirm,"")
                            GUICtrlSetData($txtPassword,"")
                        EndIf
                        If $upper + $lower + $digit + $special < 3 Then
                            If $lower = 0 Then
                                If $newPassword = "" Then
                                    $arrayStringNew = StringSplit(GUICtrlRead($txtPassword),"")
                                Else
                                    $arrayStringNew = StringSplit(StringTrimLeft($newPassword,1),"")
                                EndIf
                                For $i = 1 To $arrayStringNew[0]
                                    If StringIsUpper($arrayStringNew[$i]) Then
                                        $val = $i
                                        ExitLoop
                                    EndIf
                                Next
                                $lowerPassword = StringLower($arrayStringNew[$val])
                                _ArrayDelete($arrayStringNew,$val)
                                $arrayPassword = _ArrayInsert($arrayStringNew,$val,$lowerPassword)
                                $newPassword = _ArrayToString($arrayStringNew,"")
                                $lower = 1
                                GUICtrlSetData($lblSuggestions,"Your password needs a lower case character. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                        If $upper + $lower + $digit + $special < 3 Then
                            If $digit = 0 Then
                                $digitPassword = Random(1,99,1)
                                $newPassword = $newPassword & $digitPassword
                                $digit = 1
                                GUICtrlSetData($lblSuggestions,"Your password needs a number. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                    Else
                        _AD_Open()
                        $pw = 1
                        If $pw = 1 Then
                            GUICtrlSetData($lblSuggestions,"Your new password has been set.")
                            Sleep(3000)
                            ;Exit
                        ElseIf @error = 1 Then
                            MsgBox(64, "Active Directory", "User '" & $rUser & "' does not exist")
                        Else
                            MsgBox(64, "Active Directory", "Return code '" & @error & "' from Active Directory")
                        EndIf
                        _AD_Close()
                        GUICtrlSetData($txtPasswordConfirm,"")
                        GUICtrlSetData($txtPassword,"")
                    EndIf
                EndIf
            Else
                GUICtrlSetData($lblSuggestions,"The passwords you entered do not match. Please enter them again.")
                GUICtrlSetData($txtPasswordConfirm,"")
                GUICtrlSetData($txtPassword,"")
            EndIf
    EndSwitch
WEnd
Func _Windows()
    Sleep(50)
EndFunc

Here are parts of the code that are performing the check and I believe to be wrong. Lines 113 and 155.

$arrayString1 = StringRegExp(GUICtrlRead($txtPassword), "(?i)[" & $rUser & "]", 3)
$passwordUsername = _ArrayToString($arrayString1,"",0,2)

ElseIf StringInStr($rUser,$passwordUsername) And UBound($arrayString1) > 2 Then
    GUICtrlSetData($lblSuggestions,"Password contains part of the username. There are at least 3 consecutive characters in your name that you have used for your password. The 3 consecutive letters are, " & $passwordUsername & ".")
    GUICtrlSetData($txtPasswordConfirm,"")
    GUICtrlSetData($txtPassword,"")

I don't have a great understanding of stringregexp, but it does work for some passwords. I may just need to tweak something with another string function...

ANy help is much appreciated.

Thanks,

Jeff

Link to comment
Share on other sites

See my signature for a password UDF I created.

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

So I saw you posted that in the examples a while ago and I was thinking, that's like my idea but looks much better!

However, I don't see where your code checks for consecutive characters from the username. Can your UDF check for consecutive characters in a password from a username or a given string?

Thanks

Link to comment
Share on other sites

Not yet, but I could do. Would you mind providing an example of what would fail? I'm guessing AAutoIt33

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

you have to give a delimiter for _ArrayToString(Const ByRef $avArray [, $sDelim = "|" [, $iStart = 0 [, $iEnd = 0]]]).

so that the username variants don't get merged ...hte|tech|tce....

.

$passwordUsername = _ArrayToString($arrayString1,"|",0,2)

.

:) E.

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

Thanks for the heads up James.

At the school district I work for they are using Google Docs, and to sync our accounts and passwords with Google requires us to use this complexity, otherwise the sync fails.

I don't know too much about the Google part to be honest, as I don't manage that side of it.

Link to comment
Share on other sites

  • Moderators

By the way, if you store passwords properly, there should be no rules in place for complexity. There is no need for it.

 

I set our complexity rules to be as simple as possible: 42 characters, non-repeating, number, special character, and at least one character from 4 different languages :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Edano,

I am using the _ArrayToString function in my code already.

$arrayString1 = StringRegExp(GUICtrlRead($txtPassword), "(?i)[" & $rUser & "]", 3)
$passwordUsername = _ArrayToString($arrayString1,"",0,2)

The $txtPassword variable is read from an GuiCtrlInput box.

I'm not quite sure what you mean by using a delimeter. I mean I know what they are, but I guess I don't get how else I can use it.

Right now I have it to start at row 0 of the array and finish looking at row 2. The problem is if the array contains more than 3 rows, then that function messes up the rest of the code.

Link to comment
Share on other sites

Edano,

I am using the _ArrayToString function in my code already.

$arrayString1 = StringRegExp(GUICtrlRead($txtPassword), "(?i)[" & $rUser & "]", 3)
$passwordUsername = _ArrayToString($arrayString1,"",0,2)

The $txtPassword variable is read from an GuiCtrlInput box.

I'm not quite sure what you mean by using a delimeter. I mean I know what they are, but I guess I don't get how else I can use it.

Right now I have it to start at row 0 of the array and finish looking at row 2. The problem is if the array contains more than 3 rows, then that function messes up the rest of the code.

.

i cannot try out your script because i don't have the includes :( but you could try it with delimiter ....

.

_ArrayToString($arrayString1,"|",0,2)
Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

Checking for consecutive letters is not the same as checking for multiple inclusion of a given letter.

Your regexp checks for the latter condition and this one will check for the former:

Local $ret = StringRegExp("technician", "(I?c?h?l?o?v?e?t?e?c?h?1?)", 1)  ; changed to test for shorter substring
; then look at the string length of what you get, if any

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

Thanks for the response Edano. Here is what happens when I run that.

Password - Ilovetec1

The return string of _ArrayToString($arrayString1,"|",0,2) is:

e|t|e

If I used it without specifying a delimeter then I get this:

ete

 

What I need to happen is for it to return:

tec

 

It keeps returning the first e that it finds in the string, because is found in the username.

Link to comment
Share on other sites

well this is a dirty workaround, you may prefer a more elegant way, but at least it works:

.

#include <Array.au3>

$user="tech"
$pass="ilovetec1"

$checkstring=""

For $i=1 To StringLen($user)-2
    $checkstring&=StringMid($user,$i,3)&"|"
Next

$checkstring=StringTrimRight($checkstring,1)

MsgBox(0,"",$checkstring)

$checkarray=StringSplit($checkstring,"|")

_ArrayDisplay($checkarray)

For $i=1 To $checkarray[0]
    If StringInStr($pass,$checkarray[$i]) Then MsgBox(0,"","Password contains following String from username: "&$checkarray[$i])
Next

.

E.

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

Thank you, thank you, thank you all!

I used the StringRegExp code that jchd posted and this worked. Here is how that part looked.

If GUICtrlRead($txtPassword) = GUICtrlRead($txtPasswordConfirm) Then
                $stringLen = StringLen(GUICtrlRead($txtPassword))
                $stringUp = StringIsUpper(GUICtrlRead($txtPassword))
                $stringLow = StringIsLower(GUICtrlRead($txtPassword))
                $stringDig = StringIsDigit(GUICtrlRead($txtPassword))
                $arrayString = StringSplit(GUICtrlRead($txtPassword),"")
                ;_ArrayDisplay($arrayString)
                Global $string = ""
                For $i = 1 To $arrayString[0]
                    $string = $string & $arrayString[$i] & "?"
                Next
                ;MsgBox(0,"",$string)
                $arrayString1 = StringRegExp($rUser, "(" & $string & ")", 3)
                $arrayTotal = UBound($arrayString1)
                Global $passwordString
                For $i = 0 To $arrayTotal
                    If $arrayString1[$i] <> ""  and StringLen($arrayString1[$i]) = 3 Then
                        $passwordString = $arrayString1[$i]
                        ExitLoop
                    EndIf
                Next

Here is the full script, which is a little bit different to how it will be, it was just hopefully easier to understand on the forum this way.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Array.au3>
#include <AD.au3>
#include <Crypt.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

$lower = 0
$upper = 0
$digit = 0
$special = 0
$pwChange = 0
Global $newPassword, $val
$rUser = @UserName
HotKeySet("{LWIN}","_Windows")
HotKeySet("{RWIN}","_Windows")
#Region ### START Koda GUI section ### Form=
$formBKG = GUICreate("",@DesktopWidth, @DesktopHeight, 0, 0,$WS_POPUP)
GUISetBkColor(0x000000)
GUISetState(@SW_SHOW)
$formMain = GUICreate("Password Utility", 664, 200, -1,-1)
$lblPassword = GUICtrlCreateLabel("Your Password has expired. Please enter a new password for your account.", 8, 8, 288, 37)
$txtPassword = GUICtrlCreateInput("", 8, 45, 281, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$txtPasswordConfirm = GUICtrlCreateInput("", 8, 75, 281, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$btnPassword = GUICtrlCreateButton("Set Password", 216, 115, 75, 25)
$lblSuggestions = GUICtrlCreateLabel("", 8, 150, 300, 50)
$lblFname = GUICtrlCreateLabel("First Name: ", 420, 8, 237, 17)
$lblLName = GUICtrlCreateLabel("Last Name: ", 420, 37, 237, 17)
$lblUName = GUICtrlCreateLabel("Username: ", 420, 66, 237, 17)
$lblID = GUICtrlCreateLabel("Student ID: ", 420, 95, 237, 17)
$lblPasswordExp = GUICtrlCreateLabel("Password Expiration:", 420, 128, 237, 17)
GUISetState(@SW_SHOW)
;_ArrayDisplay($winPos)
WinSetOnTop("Password Utility","",1)
#EndRegion ### END Koda GUI section ###
_AD_Open()
$objProperties = _AD_GetObjectProperties($rUser)
$objCN = _AD_GetObjectProperties($rUser,"cn")
$objGivenName = _AD_GetObjectProperties($rUser,"givenName")
$objEmployeeID = _AD_GetObjectProperties($rUser,"employeeID")
$objSN = _AD_GetObjectProperties($rUser,"sn")
$objPWExpiration = _AD_GetObjectProperties($rUser,"msDS-UserPasswordExpiryTimeComputed")
$objFQDN = _AD_GetObjectProperties($rUser,"distinguishedName")
If IsArray($objCN) Then
    If $objCN[0][0] <> 0 Then
        $userName = $objCN[1][1]
    Else
        $userNameName = "Unavailable"
    EndIf
EndIf
If IsArray($objSN) Then
    If $objSN[0][0] <> 0 Then
        $lastName = $objSN[1][1]
    Else
        $lastName = "Unavailable"
    EndIf
EndIf
If IsArray($objGivenName) Then
    If $objGivenName[0][0] <> 0 Then
        $firstName = $objGivenName[1][1]
    Else
        $firstName = "Unavailable"
    EndIf
EndIf
If IsArray($objEmployeeID) Then
    If $objEmployeeID[0][0] <> 0 Then
        $employeeID = $objEmployeeID[1][1]
    Else
        $employeeID = "Unavailable"
    EndIf
EndIf
If IsArray($objPWExpiration) Then
    If $objPWExpiration[0][0] <> 0 Then
        $pwExpiration = $objPWExpiration[1][1]
    Else
        $pwExpiration = "Unavailable"
    EndIf
EndIf

;_ArrayDisplay($objProperties)
_AD_Close()
GUICtrlSetData($lblFname,"First Name: " & $firstName)
GUICtrlSetData($lblLName,"Last Name: " & $lastName)
GUICtrlSetData($lblUName,"Username: " & $userName)
GUICtrlSetData($lblID,"Student ID: " & $employeeID)
GUICtrlSetData($lblPasswordExp,"Password Expiration: " & $pwExpiration)
$Pic1 = GUICtrlCreatePic("C:\" & $employeeID & ".jpg", 312, 8, 100, 108)

While 1
    $winPos = WinGetPos("Password Utility")
    _MouseTrap($winPos[0],$winPos[1],$winPos[2],$winPos[3])
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btnPassword
            $lower = 0
            $upper = 0
            $digit = 0
            $special = 0
            If GUICtrlRead($txtPassword) = GUICtrlRead($txtPasswordConfirm) Then
                $stringLen = StringLen(GUICtrlRead($txtPassword))
                $stringUp = StringIsUpper(GUICtrlRead($txtPassword))
                $stringLow = StringIsLower(GUICtrlRead($txtPassword))
                $stringDig = StringIsDigit(GUICtrlRead($txtPassword))
                $arrayString = StringSplit(GUICtrlRead($txtPassword),"")
                ;_ArrayDisplay($arrayString)
                Global $string = ""
                For $i = 1 To $arrayString[0]
                    $string = $string & $arrayString[$i] & "?"
                Next
                ;MsgBox(0,"",$string)
                $arrayString1 = StringRegExp($rUser, "(" & $string & ")", 3)
                ;_ArrayDisplay($arrayString1)
                $arrayTotal = UBound($arrayString1)
                ;MsgBox(0,"",$arrayTotal)
                Global $passwordString = ""
                For $i = 0 To $arrayTotal - 1
                    MsgBox(0,$i,"Content: " & $arrayString1[$i] & @CR & "String Length: " & StringLen($arrayString1[$i]))
                    If StringLen($arrayString1[$i]) = 3 Then
                        $passwordString = $arrayString1[$i]
                        ExitLoop
                    EndIf
                Next
                ;MsgBox(0,"",$passwordString)
                If $stringLen < 8 Then
                    GUICtrlSetData($lblSuggestions,"Password not long enough. You used " & $stringLen & " characters and you need to use at least 8.")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringUp = 1 Then
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $val = $i
                            ExitLoop
                        EndIf
                    Next
                    $lowerPassword = StringLower($arrayString[$val])
                    _ArrayDelete($arrayString,$val)
                    $arrayPassword = _ArrayInsert($arrayString,$val,$lowerPassword)
                    $newPassword = _ArrayToString($arrayString,"")
                    $digitPassword = Random(1,99,1)
                    GUICtrlSetData($lblSuggestions,"Password only upper case. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1) & $digitPassword)
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringLow = 1 Then
                    For $i = 1 To $arrayString[0]
                        If StringIsLower($arrayString[$i]) Then
                            $val = $i
                            ExitLoop
                        EndIf
                    Next
                    $upperPassword = StringUpper($arrayString[$val])
                    _ArrayDelete($arrayString,$val)
                    $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                    $newPassword = _ArrayToString($arrayString,"")
                    $digitPassword = Random(1,99,1)
                    GUICtrlSetData($lblSuggestions,"Password only lower case. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1) & $digitPassword)
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf $stringDig = 1 Then
                    GUICtrlSetData($lblSuggestions,"Password only digits. Please add some characters to the password, with at least 1 upper case and 1 lower case letter.")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf StringInStr($rUser,$passwordString) And StringLen($passwordString) > 2 Then
                    GUICtrlSetData($lblSuggestions,"Password contains part of the username. There are at least 3 consecutive characters in your name that you have used for your password. The 3 consecutive letters are, " & $passwordString & ".")
                    GUICtrlSetData($txtPasswordConfirm,"")
                    GUICtrlSetData($txtPassword,"")
                ElseIf StringIsAlNum(GUICtrlRead($txtPassword)) Then
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $upper = 1
                        EndIf
                        If StringIsLower($arrayString[$i]) Then
                            $lower = 1
                        EndIf
                        If StringIsDigit($arrayString[$i]) Then
                            $digit = 1
                        EndIf
                    Next
                    If $upper + $lower + $digit <> 3 Then
                        If $upper = 0 Then
                            For $i = 1 To $arrayString[0]
                                If StringIsLower($arrayString[$i]) Then
                                    $val = $i
                                    ExitLoop
                                EndIf
                            Next
                            $upperPassword = StringUpper($arrayString[$val])
                            _ArrayDelete($arrayString,$val)
                            $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                            $newPassword = _ArrayToString($arrayString,"")
                            GUICtrlSetData($lblSuggestions,"Your password needs an upper case character. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1))
                            GUICtrlSetData($txtPasswordConfirm,"")
                            GUICtrlSetData($txtPassword,"")
                            $pwChange = 1
                        EndIf
                        If $pwChange = 0 Then
                            If $lower = 0 Then
                                For $i = 1 To $arrayString[0]
                                    If StringIsUpper($arrayString[$i]) Then
                                        $val = $i
                                        ExitLoop
                                    EndIf
                                Next
                                $lowerPassword = StringLower($arrayString[$val])
                                _ArrayDelete($arrayString,$val)
                                $arrayPassword = _ArrayInsert($arrayString,$val,$lowerPassword)
                                $newPassword = _ArrayToString($arrayString,"")
                                GUICtrlSetData($lblSuggestions,"Your password needs a lower case character. You could try this as your new password." & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                                $pwChange = 1
                            EndIf
                        EndIf
                        If $pwChange = 0 Then
                            If $digit = 0 Then
                                $digitPassword = Random(1,99,1)
                                $newPassword = GUICtrlRead($txtPassword) & $digitPassword
                                GUICtrlSetData($lblSuggestions,"Your password needs a number. You could try this as your new password." & @CR & $newPassword)
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                    Else
                        _AD_Open()
                        $pw = 1
                        If $pw = 1 Then
                            GUICtrlSetData($lblSuggestions,"Your new password has been set.")
                            Sleep(3000)
                            ;Exit
                        ElseIf @error = 1 Then
                            MsgBox(64, "Active Directory", "User '" & $rUser & "' does not exist")
                        Else
                            MsgBox(64, "Active Directory", "Return code '" & @error & "' from Active Directory")
                        EndIf
                        _AD_Close()
                        GUICtrlSetData($txtPasswordConfirm,"")
                        GUICtrlSetData($txtPassword,"")
                    EndIf
                Else
                    For $i = 1 To $arrayString[0]
                        If StringIsUpper($arrayString[$i]) Then
                            $upper = 1
                        EndIf
                        If StringIsLower($arrayString[$i]) Then
                            $lower = 1
                        EndIf
                        If StringIsDigit($arrayString[$i]) Then
                            $digit = 1
                        EndIf
                        If StringIsUpper($arrayString[$i]) = 0 And StringIsLower($arrayString[$i]) = 0 And StringIsDigit($arrayString[$i]) = 0 Then
                            $special = 1
                        EndIf
                    Next
                    If $upper + $lower + $digit + $special < 3 Then
                        If $upper = 0 Then
                            For $i = 1 To $arrayString[0]
                                If StringIsLower($arrayString[$i]) Then
                                    $val = $i
                                    ExitLoop
                                EndIf
                            Next
                            $upperPassword = StringUpper($arrayString[$val])
                            _ArrayDelete($arrayString,$val)
                            $arrayPassword = _ArrayInsert($arrayString,$val,$upperPassword)
                            $newPassword = _ArrayToString($arrayString,"")
                            $upper = 1
                            GUICtrlSetData($lblSuggestions,"Your password needs an upper case character. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                            GUICtrlSetData($txtPasswordConfirm,"")
                            GUICtrlSetData($txtPassword,"")
                        EndIf
                        If $upper + $lower + $digit + $special < 3 Then
                            If $lower = 0 Then
                                If $newPassword = "" Then
                                    $arrayStringNew = StringSplit(GUICtrlRead($txtPassword),"")
                                Else
                                    $arrayStringNew = StringSplit(StringTrimLeft($newPassword,1),"")
                                EndIf
                                For $i = 1 To $arrayStringNew[0]
                                    If StringIsUpper($arrayStringNew[$i]) Then
                                        $val = $i
                                        ExitLoop
                                    EndIf
                                Next
                                $lowerPassword = StringLower($arrayStringNew[$val])
                                _ArrayDelete($arrayStringNew,$val)
                                $arrayPassword = _ArrayInsert($arrayStringNew,$val,$lowerPassword)
                                $newPassword = _ArrayToString($arrayStringNew,"")
                                $lower = 1
                                GUICtrlSetData($lblSuggestions,"Your password needs a lower case character. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                        If $upper + $lower + $digit + $special < 3 Then
                            If $digit = 0 Then
                                $digitPassword = Random(1,99,1)
                                $newPassword = $newPassword & $digitPassword
                                $digit = 1
                                GUICtrlSetData($lblSuggestions,"Your password needs a number. You could use this as your password:" & @CR & StringTrimLeft($newPassword,1))
                                GUICtrlSetData($txtPasswordConfirm,"")
                                GUICtrlSetData($txtPassword,"")
                            EndIf
                        EndIf
                    Else
                        _AD_Open()
                        $pw = 1
                        If $pw = 1 Then
                            GUICtrlSetData($lblSuggestions,"Your new password has been set.")
                            Sleep(3000)
                            ;Exit
                        ElseIf @error = 1 Then
                            MsgBox(64, "Active Directory", "User '" & $rUser & "' does not exist")
                        Else
                            MsgBox(64, "Active Directory", "Return code '" & @error & "' from Active Directory")
                        EndIf
                        _AD_Close()
                        GUICtrlSetData($txtPasswordConfirm,"")
                        GUICtrlSetData($txtPassword,"")
                    EndIf
                EndIf
            Else
                GUICtrlSetData($lblSuggestions,"The passwords you entered do not match. Please enter them again.")
                GUICtrlSetData($txtPasswordConfirm,"")
                GUICtrlSetData($txtPassword,"")
            EndIf
    EndSwitch
WEnd
Func _Windows()
    Sleep(50)
EndFunc
Edited by jazzyjeff
Link to comment
Share on other sites

haha :) i see you found your solution.

i'm laughing because i just found a much much smaller version of my upper code:

.

$user="tech"
$pass="ilovetec1"
For $i=1 To StringLen($user)-3
    $checkstring=StringMid($user,$i,3)
    If StringInStr($pass,$checkstring) Then MsgBox(0,"","Password contains following String from username: "&$checkstring)
Next

.

wow. so easy.

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

To determine consecutive characters, try this...

ConsoleWrite(StringRegExp('AnExampleOfTheMoon12', '(.)\1') & @CRLF) ; Returns 1
ConsoleWrite(StringRegExp('AnExampleOfTheMo0n12', '(.)\1') & @CRLF) ; Returns 0

I just update my password UDF with this addition.

UDF List:

 
_AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Ha! This is yet another interpretation: repeating characters.

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

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