dafthack / DomainPasswordSpray

DomainPasswordSpray is a tool written in PowerShell to perform a password spray attack against users of a domain. By default it will automatically generate the userlist from the domain. BE VERY CAREFUL NOT TO LOCKOUT ACCOUNTS!
MIT License
1.78k stars 377 forks source link

Import-Module DomainPasswordSpray.ps1'. #36

Open Moesamar1985 opened 1 year ago

Moesamar1985 commented 1 year ago

Invoke-DomainPasswordSpray -Password Mesmith99

Moesamar1985 commented 1 year ago
muelli commented 1 year ago
PS C:\> dir DomainPasswordSpray.ps1
dir DomainPasswordSpray.ps1

    Directory: C:\

Mode                 LastWriteTime         Length Name                                                                 
----                 -------------         ------ ----                                                                 
-a----         9/30/2023   6:02 PM          19675 DomainPasswordSpray.ps1                                              

PS C:\> Import-Module DomainPasswordSpray.ps1
Import-Module DomainPasswordSpray.ps1
Import-Module : The specified module 'DomainPasswordSpray.ps1' was not loaded because no valid module file was found 
in any module directory.
At line:1 char:1
+ Import-Module DomainPasswordSpray.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (DomainPasswordSpray.ps1:String) [Import-Module], FileNotFoundExcep 
   tion
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\> 

That does not seem to work :(

muelli commented 1 year ago
PS C:\DevelopmentExecutables> . .\DomainPasswordSpray.ps1
. .\DomainPasswordSpray.ps1
At C:\DevelopmentExecutables\DomainPasswordSpray.ps1:261 char:21
PS C:\DevelopmentExecutables> +         Write-Host "$Message: Waiting for $($Seconds/60) minutes. $($ ...
+                     ~~~~~~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to 
delimit the name.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : InvalidVariableReferenceWithDrive
nwafdes commented 7 months ago

Edit the line 261 to be like this $($Message): Waiting for $($Seconds/60) minutes.[snipits....]