-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.go
More file actions
40 lines (33 loc) · 700 Bytes
/
main.go
File metadata and controls
40 lines (33 loc) · 700 Bytes
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
package main
import (
"os"
"path"
)
func PathExists(path string) bool {
_, err := os.Stat(path)
if err == nil {
return true
}
if os.IsNotExist(err) {
return false
}
return false
}
func main() {
pwd, err := os.Getwd()
if err != nil {
os.WriteFile("error.log", []byte(err.Error()), 0666)
return
}
burpsuite_pro_jar := path.Join(pwd, "burpsuite_pro.jar")
if !PathExists(burpsuite_pro_jar) {
os.WriteFile("error.log", []byte("burpsuite_pro.jar not found \n"), 0666)
return
}
default_jdk := path.Join(pwd, "jre", "bin", "java.exe")
jdk := "java"
if PathExists(default_jdk) {
jdk = default_jdk
}
run(jdk, burpsuite_pro_jar)
}