Skip to content
Snippets Groups Projects
Commit 8051bd57 authored by Marius Raes's avatar Marius Raes
Browse files

15 min sleep

parent 20230e47
No related branches found
No related tags found
No related merge requests found
#ps1_sysnative
Start-Sleep -s 1800
echo custom-script
if( !(Test-Path -Path "C:\flag.txt")) {
New-Item -Path "C:\flag.txt"
......@@ -22,7 +23,7 @@ if( !(Test-Path -Path "C:\flag.txt")) {
$usr = "$dc\Administrator"
$creds = New-Object System.Management.Automation.PSCredential($usr,$pw)
$added = $true
$joined = $true
$i = 0;
do {
try {
......@@ -36,9 +37,13 @@ if( !(Test-Path -Path "C:\flag.txt")) {
echo "`n`n DOMAIN JOIN FAILED RETRYING IN 1 MINUTE `n`n"
Start-Sleep -s 60
}
} while ((-Not $joined) -And ($i -lt 25))
} while ((-Not $joined) -And ($i -lt 25))
}else {
Start-Sleep -s 600
<RDPMembers> # Adds users to the rdp member group
$i = 0
do {
<RDPMembers> # Adds users to the rdp member group
$i = $i+1
} while($i -lt 10)
}
......@@ -22,13 +22,12 @@ if( !(Test-Path -Path "C:\flag.txt")) {
exit 1003
}else {
echo "else"
New-Item -Path "C:\log.txt"
New-ADUser -Name "bojack" -Accountpassword (ConvertTo-SecureString "HorsemanPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "diane" -Accountpassword (ConvertTo-SecureString "NguyenPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "todd" -Accountpassword (ConvertTo-SecureString "ChavezPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "sarah" -Accountpassword (ConvertTo-SecureString "LynnPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "hollyhock" -Accountpassword (ConvertTo-SecureString "ManheimPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "wanda" -Accountpassword (ConvertTo-SecureString "PiercePass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "pinky" -Accountpassword (ConvertTo-SecureString "PenguinPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt
New-ADUser -Name "bojack" -Accountpassword (ConvertTo-SecureString "HorsemanPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "diane" -Accountpassword (ConvertTo-SecureString "NguyenPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "todd" -Accountpassword (ConvertTo-SecureString "ChavezPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "sarah" -Accountpassword (ConvertTo-SecureString "LynnPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "hollyhock" -Accountpassword (ConvertTo-SecureString "ManheimPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "wanda" -Accountpassword (ConvertTo-SecureString "PiercePass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "pinky" -Accountpassword (ConvertTo-SecureString "PenguinPass1" -AsPlainText -Force ) -Enabled $true
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment