-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathweb.go
executable file
·66 lines (54 loc) · 1.22 KB
/
web.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
package webcmds
import (
"fmt"
"github.com/ibraimgm/libcmd"
"dfis-utils/pkg/webutils"
)
func GetMails(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
webutils.Getem(url)
return nil
}
func GetKeyword(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
keyword := cmd.GetString("keyword")
return webutils.Keysearch(url, *keyword)
}
func GetHeads(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
return webutils.Heads(url)
}
func SetCookie(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
method := cmd.GetString("method")
key := cmd.GetString("key")
value := cmd.GetString("value")
return webutils.Setcook(url, *key, *value, *method)
}
func GetComments(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
return webutils.Getcoms(url)
}
func GetUnlisted(cmd *libcmd.Cmd) error {
url := cmd.Operand("url")
if url == "" {
fmt.Println("URL is requrired")
}
wordlist := cmd.GetString("wordlist_file")
return webutils.Getunlist(url, *wordlist)
}