Skip to content

Commit

Permalink
banner added
Browse files Browse the repository at this point in the history
  • Loading branch information
cipheras committed Oct 9, 2020
1 parent 2b98b20 commit b26138e
Show file tree
Hide file tree
Showing 42 changed files with 16,904 additions and 18 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
    ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/cipheras/loctrack?style=plastic)
    ![GitHub All Releases](https://img.shields.io/github/downloads/cipheras/loctrack/total?style=plastic)

[Code Quality](https://img.shields.io/badge/dynamic/json?url=https://jsonkeeper.com/b/KNO7&label=code%20quality&query=codequality&style=plastic&labelColor=grey&color=yellowgreen)
![Code Quality](https://img.shields.io/badge/dynamic/json?url=https://jsonkeeper.com/b/KNO7&label=code%20quality&query=codequality&style=plastic&labelColor=grey&color=yellowgreen)
    ![dependencies](https://img.shields.io/badge/dynamic/json?url=https://jsonkeeper.com/b/KNO7&label=dependencies&query=dependencies&style=plastic&labelColor=grey&color=green)
    ![build](https://img.shields.io/badge/dynamic/json?url=https://jsonkeeper.com/b/KNO7&label=build&query=build&style=plastic&labelColor=grey&color=green)
    ![platform](https://img.shields.io/badge/dynamic/json?url=https://jsonkeeper.com/b/KNO7&label=platform&query=platform&style=plastic&labelColor=grey&color=purple)
Expand All @@ -17,11 +17,12 @@ You can either use a *precompiled binary* package for your architecture or you c

Windows | Linux
--------|-------
[ x64]() | [x64]()
[win-x64]() | [linux-x64]()

For other versions or releases go to release page.

***NOTE:** In windows installtion is not needed. You can directly execute the **exe** file.*
***NOTE:** In windows, installtion is not needed. You can directly execute the **exe** file.*
*In cmd write `loctrack.exe -h`*

### Installing precompiled binary in Linux
* In order to install precompiled binary, make sure you have installed **make**.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/cipheras/loctrack

go 1.15

require github.com/cipheras/gohelper v1.2.1
require github.com/cipheras/gohelper v1.3.0
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
github.com/cipheras/gohelper v1.2.1 h1:jrg3r96+gL1XHWQs3q6wsBFKxEuTszHFZyjV5x7pkGA=
github.com/cipheras/gohelper v1.2.1/go.mod h1:lI30pRBLe0eZMDV7CkH+QTinAouDb34tsa11D2pQ59w=
github.com/cipheras/gohelper v1.3.0 h1:Sakks5nQv3vxp4zDtWDKzNXf9PuGZJD2Ei//8FGonlg=
github.com/cipheras/gohelper v1.3.0/go.mod h1:LAdAhKloC2GntpxN9mRKANRL/4eo18cYxEgVgRzq9oQ=
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 h1:bNEHhJCnrwMKNMmOx3yAynp5vs5/gRy+XWFtZFu7NBM=
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
49 changes: 38 additions & 11 deletions loctrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"os/signal"
"reflect"
"regexp"
"runtime"
"strconv"
"syscall"
"time"
Expand All @@ -30,14 +31,19 @@ var (
)
var url string

const (
// VERSION ...
VERSION = "2.4.0"
)

func main() {
flag.Usage = func() {
Cprint(I, "Choose options. By default a tunnel will be created itself")
Cprint(I, "Run your own tunnel by using "+GREEN+"'-manual'"+BLUE+" flag")
Cprint(I, "Manual TLS certificate using "+GREEN+"'-c'"+BLUE+" flag. Keep your own certs in "+GREEN+"'cert'"++" folder")
fmt.Println("\n" + GREEN + "##################################" + BLUE + "LocTrack" + GREEN + "#################################" + RESET)
Cprint(I, "Manual TLS certificate using "+GREEN+"'-c'"+BLUE+" flag. Keep your own certs in "+GREEN+"'cert'"+BLUE+" folder")
fmt.Println("\n" + GREEN + "##################################" + BLUE + "LocTrack" + GREEN + "##################################" + RESET)
flag.PrintDefaults()
fmt.Println(GREEN + "####################################" + BLUE + "LocTrack" + GREEN + "###############################" + RESET)
fmt.Println(GREEN + "##################################" + BLUE + "LocTrack" + GREEN + "##################################\n" + RESET)
}
flag.Parse()
// // Make log file
Expand All @@ -51,7 +57,9 @@ func main() {

interrupt()
banner()
// Cwindows() //for colors on cmd in window
if runtime.GOOS == "windows" {
Cwindows() //for colors on cmd in window
}
Cprint(I, "Try"+GREEN+" loctrack -h "+BLUE+"for help and other options")
if *mantunnel {
Cprint(T, "You have chosen manual mode. Run your own tunnel.")
Expand All @@ -62,7 +70,26 @@ func main() {
}

func banner() {
fmt.Println(CYAN, "Created by:", string(RESET))
bnr := `
██▓ ▒█████ ▄████▄ ▄▄▄█████▓ ██▀███ ▄▄▄ ▄████▄ ██ ▄█▀
▓██▒ ▒██▒ ██▒▒██▀ ▀█ ▓ ██▒ ▓▒▓██ ▒ ██▒▒████▄ ▒██▀ ▀█ ██▄█▒
▒██░ ▒██░ ██▒▒▓█ ▄ ▒ ▓██░ ▒░▓██ ░▄█ ▒▒██ ▀█▄ ▒▓█ ▄ ▓███▄░
▒██░ ▒██ ██░▒▓▓▄ ▄██▒░ ▓██▓ ░ ▒██▀▀█▄ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄
░██████▒░ ████▓▒░▒ ▓███▀ ░ ▒██▒ ░ ░██▓ ▒██▒ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄
░ ▒░▓ ░░ ▒░▒░▒░ ░ ░▒ ▒ ░ ▒ ░░ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▒ ▓▒
░ ░ ▒ ░ ░ ▒ ▒░ ░ ▒ ░ ░▒ ░ ▒░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░
░ ░ ░ ░ ░ ▒ ░ ░ ░░ ░ ░ ▒ ░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░
░ ░
`
crtr := `
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
|C| |i| |p| |h| |e| |r| |a| |s|
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
`
fmt.Printf("/n%s%s%s", GREEN, bnr, RESET)
fmt.Print(CYAN + "Created by:" + GREEN + crtr + RESET)
time.Sleep(1500 * time.Millisecond)
}

func urlCreation() {
Expand All @@ -77,13 +104,13 @@ func urlCreation() {
sResp, err := client.Get("https://serveo.net")
// time.Sleep(1 * time.Second)
if err != nil {
fmt.Println(RED + BGBLACK + BLINK + BOLD + "Offline" + RESET)
fmt.Println(RED + BLINK + BOLD + "Offline" + RESET)
log.Println("Timeout for service 1")
} else {
if sResp.StatusCode == 200 {
log.Println("Service 1 Online")
sResp.Body.Close()
fmt.Println(GREEN + BGBLACK + BLINK + BOLD + "Online" + RESET)
fmt.Println(GREEN + BLINK + BOLD + "Online" + RESET)
if *subdomain == "" {
cmd = exec.Command("ssh", "-T", "-o", "StrictHostKeyChecking=no", "-o", "ServerAliveInterval=60", "-R", "80:localhost:"+strconv.Itoa(*port), "serveo.net")
} else {
Expand Down Expand Up @@ -119,8 +146,8 @@ func urlCreation() {
lrResp, err := client.Get("http://localhost.run")
// time.Sleep(1 * time.Second)
if err != nil {
fmt.Println(RED + BGBLACK + BLINK + BOLD + "Offline" + RESET)
fmt.Println(PURPLE + "Try again later...or report to the creator." + RESET)
fmt.Println(RED + BLINK + BOLD + "Offline" + RESET)
fmt.Println(PURPLE + "Try again later...or report to the creator.\n" + RESET)
log.Println("Timeout for service 2")
os.Exit(0)
}
Expand Down Expand Up @@ -154,7 +181,7 @@ func urlCreation() {
log.Println("failed to generate URL")
os.Exit(0)
}
fmt.Println(RED + BGBLACK + BLINK + BOLD + "Offline" + RESET)
fmt.Println(RED + BLINK + BOLD + "Offline" + RESET)
log.Println("Offline...service 2 is also down")
os.Exit(0)
}
Expand Down Expand Up @@ -220,7 +247,7 @@ func interrupt() {
<-c
fmt.Print("\n" + CYAN + "[" + PURPLE + "*" + CYAN + "] " + PURPLE + "Aborting " + RESET)
for i := 1; i <= 6; i++ {
fmt.Print(PURPLE + BGBLACK + "# " + RESET)
fmt.Print(PURPLE + "# " + RESET)
time.Sleep(time.Millisecond * 200)
}
fmt.Print(CLEAR)
Expand Down
66 changes: 64 additions & 2 deletions vendor/github.com/cipheras/gohelper/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/cipheras/gohelper/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions vendor/github.com/cipheras/gohelper/gohelper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/golang.org/x/sys/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/golang.org/x/sys/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/golang.org/x/sys/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/golang.org/x/sys/PATENTS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/golang.org/x/sys/windows/aliases.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b26138e

Please sign in to comment.