parent
665ee33866
commit
77e55499a4
|
@ -26,7 +26,7 @@ steps:
|
|||
# auto_tag: true
|
||||
mtu: 1000
|
||||
# purge: true
|
||||
repo: hub.kumoly.io/tools/breacher
|
||||
repo: hub.kumoly.io/tools/breach
|
||||
registry: hub.kumoly.io
|
||||
trigger:
|
||||
event: tag
|
|
@ -8,10 +8,10 @@ COPY . .
|
|||
RUN VERSION=$(git describe --tags --abbrev=0) BUILD=$(git rev-parse --short HEAD) && \
|
||||
GOOS=linux GOARCH=amd64 \
|
||||
go build -ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD} -w" \
|
||||
-o /go/bin/breacher
|
||||
-o /go/bin/breach
|
||||
|
||||
FROM alpine:3.14
|
||||
ENV PATH="/go/bin:${PATH}"
|
||||
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
COPY --from=builder /go/bin/breacher /go/bin/breacher
|
||||
ENTRYPOINT ["/go/bin/breacher"]
|
||||
COPY --from=builder /go/bin/breach /go/bin/breach
|
||||
ENTRYPOINT ["/go/bin/breach"]
|
18
README.md
18
README.md
|
@ -1,11 +1,11 @@
|
|||
# Breacher
|
||||
# Breach
|
||||
|
||||
common ways to breach network. Including proxy, port forward, ssh tunnel, and backconnect in a single executable
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
sudo rm -f /usr/local/bin/breacher
|
||||
sudo rm -f /usr/local/bin/breach
|
||||
sudo sh -c "curl -fsSL RELEASE_URL | tar -C /usr/local/bin/ -xz"
|
||||
```
|
||||
|
||||
|
@ -13,31 +13,31 @@ sudo sh -c "curl -fsSL RELEASE_URL | tar -C /usr/local/bin/ -xz"
|
|||
|
||||
```shell
|
||||
Usage:
|
||||
breacher [command]
|
||||
breach [command]
|
||||
|
||||
Available Commands:
|
||||
forward port forwarding for UDP->UDP / TCP->TCP
|
||||
help Help about any command
|
||||
proxy reverse proxy to url
|
||||
tunnel ssh tunneling to access remote services
|
||||
version Print the version number of breacher
|
||||
version Print the version number of breach
|
||||
|
||||
Flags:
|
||||
-h, --help help for breacher
|
||||
-h, --help help for breach
|
||||
-s, --silent silent log output
|
||||
-v, --version version for breacher
|
||||
-v, --version version for breach
|
||||
|
||||
Use "breacher [command] --help" for more information about a command.
|
||||
Use "breach [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
## Systemd
|
||||
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Breacher
|
||||
Description=Breach
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/breacher tunnel :8080 :80 user@example.com -i ~/.ssh/id_rsa
|
||||
ExecStart=/usr/local/bin/breach tunnel :8080 :80 user@example.com -i ~/.ssh/id_rsa
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package breacher
|
||||
package breach
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -10,8 +10,8 @@ import (
|
|||
)
|
||||
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "breacher",
|
||||
Short: "Breacher is a tool to breach network protections",
|
||||
Use: "breach",
|
||||
Short: "breach is a tool to breach network protections",
|
||||
Long: "",
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
if rsilent {
|
||||
|
@ -45,8 +45,8 @@ var (
|
|||
)
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of breacher",
|
||||
Short: "Print the version number of breach",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("breacher version %s - %s\n", Version, Build)
|
||||
fmt.Printf("breach version %s - %s\n", Version, Build)
|
||||
},
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package breacher
|
||||
package breach
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -19,9 +19,9 @@ var forwardCmd = &cobra.Command{
|
|||
Short: "port forwarding for UDP->UDP / TCP->TCP",
|
||||
Long: `port forwarding, defaults to use tcp if no flags given
|
||||
ex.
|
||||
breacher forward :8080 kumoly.io:5080
|
||||
breacher forward :8080 :8000
|
||||
breacher forward --udp :8080 192.168.51.211:53
|
||||
breach forward :8080 kumoly.io:5080
|
||||
breach forward :8080 :8000
|
||||
breach forward --udp :8080 192.168.51.211:53
|
||||
`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
|
@ -1,4 +1,4 @@
|
|||
package breacher
|
||||
package breach
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
@ -14,8 +14,8 @@ var proxyCmd = &cobra.Command{
|
|||
Short: "reverse proxy to url",
|
||||
Long: `reverse proxy,
|
||||
ex.
|
||||
* breacher reverse_proxy :8080 http://vpn.kumoly.io/
|
||||
* breacher reverse_proxy :8080 https://kumoly.io/`,
|
||||
* breach reverse_proxy :8080 http://vpn.kumoly.io/
|
||||
* breach reverse_proxy :8080 https://kumoly.io/`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
targetUrl, err := url.Parse(args[1])
|
|
@ -1,4 +1,4 @@
|
|||
package breacher
|
||||
package breach
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -30,9 +30,9 @@ var sshCmd = &cobra.Command{
|
|||
Short: "ssh tunneling to access remote services",
|
||||
Long: `ssh tunneling to access remote services
|
||||
ex.
|
||||
breacher tunnel :8080 host:80 user@example.com -p paswd
|
||||
breacher tunnel :8080 :80 user@example.com -i ~/.ssh/id_rsa
|
||||
breacher tunnel :8080 kumoly.io:443 user@example.com
|
||||
breach tunnel :8080 host:80 user@example.com -p paswd
|
||||
breach tunnel :8080 :80 user@example.com -i ~/.ssh/id_rsa
|
||||
breach tunnel :8080 kumoly.io:443 user@example.com
|
||||
`,
|
||||
Args: cobra.ExactArgs(3),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module kumoly.io/tools/breacher
|
||||
module kumoly.io/tools/breach
|
||||
|
||||
go 1.17
|
||||
|
||||
|
|
10
main.go
10
main.go
|
@ -1,15 +1,15 @@
|
|||
package main
|
||||
|
||||
import "kumoly.io/tools/breacher/breacher"
|
||||
import "kumoly.io/tools/breach/breach"
|
||||
|
||||
var Version = "v0.0.0"
|
||||
var Build = "alpha"
|
||||
|
||||
func init() {
|
||||
breacher.Version = Version
|
||||
breacher.Build = Build
|
||||
breacher.Cmd.Version = Version
|
||||
breach.Version = Version
|
||||
breach.Build = Build
|
||||
breach.Cmd.Version = Version
|
||||
}
|
||||
func main() {
|
||||
breacher.Execute()
|
||||
breach.Execute()
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ if [ $? -ne 0 ]; then VERSION=$DRONE_TAG; fi
|
|||
BUILD=$(git rev-parse --short HEAD)
|
||||
if [ $? -ne 0 ]; then BUILD=${DRONE_COMMIT:0:7}; fi
|
||||
|
||||
PROJ=breacher
|
||||
PROJ=breach
|
||||
HUB=hub.kumoly.io
|
||||
HUB_PROJECT=tools
|
||||
DIST=dist
|
||||
|
|
Loading…
Reference in New Issue