CyAxe / lotus

:zap: Fast Web Security Scanner written in Rust based on Lua Scripts :waning_gibbous_moon: :crab:
https://lotus.knas.me
GNU General Public License v2.0
75 stars 12 forks source link

Set requests limit #4

Closed MindPatch closed 1 year ago

MindPatch commented 2 years ago

for avoiding server block, we can add --sleep-sec-after to sleep 1-5secs after sending requests number of this option value

$ lotus --sleep-sec-after 100 ..etc...
> sending 100
> sleep 5 sec
> reset the counter to 0

you can start from here https://github.com/rusty-sec/lotus/blob/master/src/core/utils/mod.rs#L34

    pub fn send(&mut self, url: String) -> HashMap<String, RespType> {
        let mut resp_data: HashMap<String, RespType> = HashMap::new();
        match reqwest::blocking::get(url) {
            Ok(resp) => {
                *self.many_sent.lock().unwrap() += 1;
mahmednabil109 commented 1 year ago

Assigne pls

MindPatch commented 1 year ago
$ lotus urls ssti.lua -o out.json --delay 5 --requests-limit 100