Skip to content

Commit 4d5bd5e

Browse files
authored
Create README.md
1 parent 5327561 commit 4d5bd5e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

modules/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Modules Package
2+
3+
Welcome to the `Modules` package. Here you can create your own modules to manipulate the scan result.
4+
5+
* `core.go` - it's the `core` of the package. Here you should import your modules and load them.
6+
* `data` folder - because of some **Golang** limitation I was unable to store the `modules` lists inside the core package. So `data` is just a package for
7+
storing information related to the modules. For example - The map of `<port>:<modules>` is stored in the `data` package
8+
* `smb` - it's just an example module, you can take a look on it for inspiration. your own modules should be subpackages in this folder. So if you create a `http` module
9+
you should create `http` folder and write your module.
10+
11+
# Steps to create a module
12+
13+
1) Create a subfolder with the name of your module and then implement your module inside it
14+
* Your module should contain the following functions -
15+
* `Load` - which will register your module to a particular port number
16+
* And a function which will implement your module's logic. You should keep the signature of - `func module(result *Types.Result) {}`
17+
2) When you done - you need to add an import to the `core.go` file and `Module.Load()` to the `core.go` file's init function.
18+
3) And thats it - when there will be a scan with the port you module is registered to, your module will be executed in the end of nmap probes scan.

0 commit comments

Comments
 (0)