-
Notifications
You must be signed in to change notification settings - Fork 0
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
155 additions
and
30 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
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,22 @@ | ||
# CactiveNetwork Licence Version 1.0 | ||
|
||
## Last Updated: | ||
14th November 2020 | ||
|
||
## Licensor Information: | ||
Copyright ©️ 2022 CactiveNetwork [[email protected]](mailto://[email protected]) | ||
|
||
### Definitions | ||
|
||
- **"Software"** (or **"Work"**) shall mean the source code, algorithms, processes or related material used in this work. | ||
- **"Licence"** shall mean the terms of conditions for re-production, use and additional distribution. | ||
- **"Licensor"** shall mean the copyright owner, or other entity authorised by the copyright owner granting this Licence. | ||
- **"You"** (or **"Your"**) shall mean an individual exercising permissions granted by this License. | ||
|
||
### Terms of this licence | ||
|
||
Permission is granted, free of charge, to any person obtaining a copy of this "Software", to the rights to, use, copy, modify, merge, publish, distribute, and/or sell copies of the Software without restriction, this holds true as long as the software is not used to intentionally hurt people, and/or groups or communities mentally or physically. | ||
|
||
Unless required by applicable law or agreed to in writing, the Licensor provides this work on an "as-is" basis without warranties or conditions of any kind. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the "Software" without modification. |
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,53 @@ | ||
### What is this? | ||
This is CAP or Cactive's Assembled Packages. In short, it is a compiled NodeJS script that allows you to use Cactive's products from any coding language or without one at all! | ||
|
||
### How do I set it up? | ||
First, install the cactive-bin.zip file from the most recent release | ||
|
||
Extract that zip file | ||
|
||
Now in the same directory as the cactive-bin extracted folder, open cmd | ||
|
||
Now execute the correct file and add a -h (help) flag. For example, on Windows: | ||
```bash | ||
.\cactive-bin\cactive-bin-win.exe -h | ||
``` | ||
|
||
### cactive.json File | ||
The Cactive JSON file's location is specified using the -f flag and defaults to "./cactive.json" | ||
|
||
The file contains special commands that hold which module, function, and args to pass. For example: | ||
```json | ||
{ | ||
"retrieve": { | ||
"module": "ip", | ||
"func": "retrieve", | ||
"args": "user" | ||
}, | ||
"google": { | ||
"module": "ip", | ||
"func": "retrieve", | ||
"args": { | ||
"ip": "8.8.8.8" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Here we define two commands, "retrieve" and "google". The "module" specifies that we will run a command from Cactive's IP Module. "func" specifies that we will run the "retrieve" function from Cactive's IP Module. Args specifies two different things, it specifies for "retrieve", we will let the user decide the args to be passed. For "google", it specifies | ||
the arguments passed to the function will always be {"ip": "8.8.8.8"}. | ||
|
||
To use this file we can run our cactive-bin program and we can do something like this where the text after ">>> " is stringified JSON | ||
```bash | ||
>>> {"command":"google"} | ||
[output here] | ||
>>> {"command":"retrieve","args":{"ip":"8.8.8.8"}} | ||
``` | ||
|
||
The data after ">>> " is just stringified JSON that matches this style: | ||
```json | ||
{ | ||
"command": "command to execute from cactive.json", | ||
"args?": "args to pass to the function defined in cactive.json" | ||
} | ||
``` |
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
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
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,6 +1,4 @@ | ||
export default interface Arguments { | ||
module: string | ||
func: string | ||
args?: string | ||
file: string | ||
help?: boolean | ||
} |
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,9 @@ | ||
type args = "user"; | ||
|
||
export default interface Cactive { | ||
[k: string]: { | ||
module: string | ||
func: string | ||
args: args | {[k: string]: any} | ||
} | ||
} |
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,4 @@ | ||
export default interface Input { | ||
command: string | ||
args?: {[k: string]: any} | ||
} |
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