-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
621 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
# netscanner | ||
netscanner - TCP/UDP scanner to find open or closed ports | ||
|
||
## Install | ||
to install you have to clone the repository | ||
```shell | ||
$ go get https://github.com/R4yGM/netscanner | ||
``` | ||
# netscanner | ||
netscanner - TCP/UDP scanner to find open or closed ports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version":"0.1", | ||
"owner":"R4yan", | ||
"github":"https://github.com/R4yGM/netscanner", | ||
"help":"\nnetscanner 0.1\n \nUsage: netscanner <command>\n\nCommands:\n\n sp,scanport - scan a singular port: usage sp,scanport <protocol> <hostname> <port> (ex. scanport tcp 127.0.01 80)\n in,initscan - scan the first 1023 ports: usage in,initscan <protocol> <hostname>(ex. initscan tcp 127.0.0.1)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package header | ||
|
||
import ( | ||
"math/rand" | ||
"time" | ||
) | ||
var asciiArt1 = | ||
` | ||
============================================================================= | ||
_ | ||
| | _ | ||
| |__ ___| |_ ___ ___ __ _ _ __ _ __ ___ _ __ | ||
| '_ \ / _ \ __/ __|/ __/ _' | '_ \| '_ \ / _ \ '__| | ||
| | | | __/ |_\__ \ (_| (_| | | | | | | | __/ | | ||
|_| |_|\___|\__|___/\___\__,_|_| |_|_| |_|\___|_| | ||
` | ||
var asciiArt2 = | ||
` | ||
============================================================================= | ||
__ __ ______ ______ ______ ______ ______ __ __ __ __ ______ ______ | ||
/\ "-.\ \ /\ ___\ /\__ _\ /\ ___\ /\ ___\ /\ __ \ /\ "-.\ \ /\ "-.\ \ /\ ___\ /\ == \ | ||
\ \ \-. \ \ \ __\ \/_/\ \/ \ \___ \ \ \ \____ \ \ __ \ \ \ \-. \ \ \ \-. \ \ \ __\ \ \ __< | ||
\ \_\\"\_\ \ \_____\ \ \_\ \/\_____\ \ \_____\ \ \_\ \_\ \ \_\\"\_\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ | ||
\/_/ \/_/ \/_____/ \/_/ \/_____/ \/_____/ \/_/\/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ \/_/ /_/ | ||
` | ||
var asciiArt3 = | ||
` | ||
============================================================================= | ||
+-+-+-+-+-+-+-+-+-+-+ | ||
|n|e|t|s|c|a|n|n|e|r| | ||
+-+-+-+-+-+-+-+-+-+-+ | ||
` | ||
var asciiArt4 = | ||
` | ||
============================================================================= | ||
_____ _____ ____ _____ _____ _____ _____ _____ _____ _____ | ||
/ _ \/ __\/ \/ ___>/ \/ _ \/ _ \/ _ \/ __\/ _ \ | ||
| | || __|\- -/|___ || |--|| _ || | || | || __|| _ < | ||
\__|__/\_____/ |__| <_____/\_____/\__|__/\__|__/\__|__/\_____/\__|\_/ | ||
` | ||
func random(min, max int) int { | ||
rand.Seed(time.Now().Unix()) | ||
return rand.Intn(max - min) + min | ||
} | ||
|
||
func AsciiTitle()(tex string){ | ||
num := random(1, 5) | ||
switch num { | ||
case 1: | ||
return asciiArt1 | ||
case 2: | ||
return asciiArt2 | ||
case 3: | ||
return asciiArt3 | ||
case 4: | ||
return asciiArt4 | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package info | ||
|
||
import ( | ||
"io/ioutil" | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
) | ||
type Info struct { | ||
Version int `json:"version"` | ||
Owner string `json:"owner"` | ||
Github string `json:"github"` | ||
Help string `json:"help"` | ||
} | ||
|
||
func Version()(tex int){ | ||
file, _ := ioutil.ReadFile("info.json") | ||
|
||
data := Info{} | ||
|
||
_ = json.Unmarshal([]byte(file), &data) | ||
tex = data.Version | ||
return tex | ||
} | ||
func Owner()(tex string){ | ||
|
||
file, _ := ioutil.ReadFile("info.json") | ||
|
||
data := Info{} | ||
|
||
_ = json.Unmarshal([]byte(file), &data) | ||
tex = data.Owner | ||
return tex | ||
|
||
} | ||
func Github()(tex string){ | ||
|
||
file, _ := ioutil.ReadFile("./info.json") | ||
|
||
data := Info{} | ||
|
||
_ = json.Unmarshal([]byte(file), &data) | ||
tex = data.Github | ||
return tex | ||
|
||
} | ||
func Helper()(tex string){ | ||
|
||
jsonFile, err := os.Open("data.json") | ||
|
||
if err != nil { | ||
fmt.Println(err) | ||
} | ||
|
||
defer jsonFile.Close() | ||
|
||
var in Info | ||
|
||
|
||
responseData, err := ioutil.ReadAll(jsonFile) | ||
json.Unmarshal(responseData, &in) | ||
fmt.Println(in.Help) | ||
return | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo netscanner initialize | ||
go run ./netscanner help |
Binary file not shown.
Oops, something went wrong.