Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
knassar702 committed Nov 16, 2022
1 parent 9c00375 commit 2ddbe63
Showing 1 changed file with 8 additions and 116 deletions.
124 changes: 8 additions & 116 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,81 +12,23 @@ https://github.com/rusty-sec/lotus/issues/39
:zap: Fast Web Security Scanner written in Rust based on Lua Scripts :waning_gibbous_moon: :crab:


Currently this project is still under beta version, there are alot of features that are still under developing
it would be better if you make a contribute to this project to make it finish faster, you can check the project [issues page](https://github.com/rusty-sec/lotus/issues) for more,
Don't forget to [Join Us on Discord](https://discord.gg/nBYDPTzjSq)
Here at Lotus, we strive to make this process of automating your own web security module as simple and fast as possible.
There is still a lot of development taking place on this project at the moment, as there are a lot of features that haven't been implemented yet such as (OAST, reading headers, reading raw requests instead of URLs, crawler, custom report script, etc.), so we would appreciate any contributions you may be able to provide to this project so that it can be finalized sooner. If you have any additional questions, please feel free to visit the github repo issues page and join our [Discord Server](https://discord.gg/nBYDPTzjSq)

### Usage
you can build it from source
It can be built from source, but ensure that you install the package `openssl-dev` before running this command

```bash
$ cargo install --git=https://github.com/rusty-sec/lotus/
```
You will then need to download the lua scripts from our [github repository](https://github.com/rusty-sec/lotus-scripts) and run the following command

or download the binary file from [the release page](https://github.com/rusty-sec/lotus/releases)

```bash
echo "http://testphp.vulnweb.com/listproducts.php?cat=1" | lotus --scripts fuzzer/active --workers 30 --output test.json
🔥 RXSS: http://testphp.vulnweb.com/listproducts.php?cat=1%22%3E%3Cimg+src%3Dx+onerror%3Dalert%28%29%3E | "><img src=x onerror=alert()> | img[onerror="alert()"][src="x"]
❯ cat test.json | jq
[
{
"risk": "medium",
"name": "reflected cross site scripting",
"description": "https://owasp.org/www-community/attacks/xss/",
"url": "http://testphp.vulnweb.com/listproducts.php?cat=1%22%3E%3Cimg+src%3Dx+onerror%3Dalert%28%29%3E",
"param": "cat",
"attack": "\"><img src=x onerror=alert()>",
"evidence": "img[src=\"x\"][onerror=\"alert()\"]"
}
]
[
{
"risk": "high",
"name": "SQL Injection",
"description": "https://owasp.org/www-community/attacks/SQL_Injection",
"url": "http://testphp.vulnweb.com/listproducts.php?cat=1%27123",
"param": "cat",
"attack": "'123",
"evidence": "check the manual that (corresponds to|fits) your MySQL server version"
},
{
"risk": "high",
"name": "SQL Injection",
"description": "https://owasp.org/www-community/attacks/SQL_Injection",
"url": "http://testphp.vulnweb.com/listproducts.php?cat=1%27%27123",
"param": "cat",
"attack": "''123",
"evidence": "check the manual that (corresponds to|fits) your MySQL server version"
}
]
```
```bash
Lotus 0.2-beta
Khaled Nassar <knassar702@gmail.com>
Fast Web Security Scanner written in Rust based on Lua Scripts
USAGE:
lotus [OPTIONS] --workers <workers> --scripts <scripts> --output <output> [nolog]
ARGS:
<nolog> no logging
OPTIONS:
-h, --help Print help information
-l, --log <log> Save all lots to custom file
-o, --output <output> Path of the JSON output fiel
-s, --scripts <scripts> Path of scripts dir
-t, --script-threads <script_threads> Workers for lua scripts [default: 5]
-V, --version Print version information
-w, --workers <workers> Number of works of urls [default: 10]
$ echo http://testphp.vulnweb.com/listproducts.php?cat=1 | lotus --scripts lotus-scripts/active --output test_out.json
```

### Lua API
We are working on creating a new document for this list as soon as possible, as it has not been updated for a long time

| Function | About | output type | Example |
|----------|:-------------:|------:| -----:|
Expand All @@ -103,54 +45,4 @@ OPTIONS:
| set_urlvalue | Change custom parameter value in the url| String | `set_urlvalue("http://google.com/?test=1","test","hacker")`|
| urljoin | Join Path to the url | String | `urljoin("http://google.com/","/search")` |
| send_req | send Get http request to the url | Table with ( url , status , body , errors ) | `send_req("https://google.com")` |
#### Enum
To get the value from lua script you can call it with `value:GetEnumTypeOrNil`
- send_req
```rust
pub enum RespType {
NoErrors,
Emtpy,
Str(String),
Int(i32),
Error(String),
}
```
```lua
local resp = send_req("http://google.com")
if resp.errors:GetErrorOrNil() == nil then
-- NO Connection ERRORS
if string.find(resp.body:GetStrOrNil(),"google") then
log_info("FOUND GOOGLE")
end
end
```
- html_parse
```rust
pub enum Location {
AttrValue(String),
AttrName(String),
TagName(String),
Text(String),
Comment(String),
}
```
```lua
local searcher = html_parse("<h1>Hello</h1>","Hello")
for index_key,index_value in ipairs(searcher) do
if index_value:GetTextOrNil() then
println(string.format("FOUND IT IN TEXT %s",index_value:GetTextOrNil()))
end
end
```

0 comments on commit 2ddbe63

Please sign in to comment.