This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathDent.go
74 lines (66 loc) · 2.12 KB
/
Dent.go
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
package main
import (
"Dent/Loader"
"flag"
"fmt"
"log"
)
type FlagOptions struct {
outFile string
URL string
Name string
COM string
filename string
inputFile string
Show bool
}
func options() *FlagOptions {
outFile := flag.String("O", "output.txt", "Name of output file.")
URL := flag.String("U", "", "The base URL where the base64 encoded XLL payload is hosted")
Name := flag.String("N", "", "Name of the XLL or DLL playload when its written to disk.")
COM := flag.String("C", "", "Name of the COM object.")
filename := flag.String("F", "", "Name of the file hosted on the URL.")
inputFile := flag.String("I", "", "")
Show := flag.Bool("show", false, "Display the script in the terminal.")
flag.Parse()
return &FlagOptions{outFile: *outFile, URL: *URL, Name: *Name, COM: *COM, filename: *filename, inputFile: *inputFile, Show: *Show}
}
func main() {
fmt.Println(`
________ __
\______ \ ____ _____/ |_
| | \_/ __ \ / \ __\
| | \ ___/| | \ |
/_______ /\___ >___| /__|
\/ \/ \/
(@Tyl0us)
"Call someone a hero long enough, and they'll believe it. They'll become it.
They have no choice. Let them call you a monster, and you become a monster."
`)
opt := options()
if opt.inputFile == "" && opt.URL == "" {
log.Fatal("Error: Please provide a path to the dll based payload or URL the encoded payload is going be hosted on.")
}
if opt.inputFile != "" && opt.URL != "" {
log.Fatal("Error: Please choose either -I or -URL but not both.")
}
if opt.URL != "" && opt.COM != "" {
log.Fatal("Error: Can't use the -I with the -U option.")
}
if opt.URL != "" && opt.filename == "" {
log.Fatal("Error: Can't use the -U without the -F option.")
}
if opt.Name == "" {
log.Fatal("Error: Please provide the name of the playload")
}
var mode string
var src []string
if opt.URL == "" {
mode = "vbs"
fmt.Println("[*] Fake COM payload selected")
} else {
mode = "macro"
fmt.Println("[*] Remote .XLL payload selected")
}
Loader.CompileLoader(mode, opt.outFile, src, opt.Name, opt.inputFile, opt.URL, opt.COM, opt.filename, opt.Show)
}