MCPcopy Create free account
hub / github.com/KingOfBugbounty/enumrust / execute_parallel

Method execute_parallel

src/parallel_executor.rs:152–377  ·  view source on GitHub ↗

Execute Nuclei scan with parallel batching

(
        &self,
        targets: Vec<String>,
        output_dir: &Path,
        severities: &str,
    )

Source from the content-addressed store, hash-verified

150
151 /// Execute Nuclei scan with parallel batching
152 pub async fn execute_parallel(
153 &self,
154 targets: Vec<String>,
155 output_dir: &Path,
156 severities: &str,
157 ) -> Result<usize> {
158 if targets.is_empty() {
159 return Ok(0);
160 }
161
162 let total_targets = targets.len();
163 self.total.store(total_targets, Ordering::SeqCst);
164
165 let mode_indicator = if self.config.turbo_mode {
166 "🔥 TURBO MODE".red().bold().to_string()
167 } else if self.config.rate_limit == 0 {
168 "⚡ AGGRESSIVE".yellow().bold().to_string()
169 } else {
170 "🎯 STANDARD".cyan().to_string()
171 };
172
173 println!("{}", format!(
174 "┌───────────────────────────────────────────────────────────────────────────────┐"
175 ).cyan().bold());
176 if self.config.turbo_mode {
177 println!("{}", format!(
178 "│ 🔥 PARALLEL NUCLEI EXECUTOR - TURBO MODE │"
179 ).red().bold());
180 } else {
181 println!("{}", format!(
182 "│ 🚀 PARALLEL NUCLEI EXECUTOR │"
183 ).cyan().bold());
184 }
185 println!("{}", format!(
186 "├───────────────────────────────────────────────────────────────────────────────┤"
187 ).cyan());
188 println!("{}", format!(
189 "│ 📊 Total targets: {:<58}│", total_targets
190 ).cyan());
191 println!("{}", format!(
192 "│ 👷 Workers: {:<64}│", self.config.nuclei_workers
193 ).cyan());
194 println!("{}", format!(
195 "│ 📦 Batch size: {:<61}│", self.config.nuclei_batch_size
196 ).cyan());
197 println!("{}", format!(
198 "│ ⚡ Concurrency per worker: {:<50}│", self.config.nuclei_concurrency
199 ).cyan());
200 println!("{}", format!(
201 "│ 📤 Bulk size: {:<62}│", self.config.nuclei_bulk_size
202 ).cyan());
203 println!("{}", format!(
204 "│ 🎚️ Rate limit: {}/s{:<53}│",
205 if self.config.rate_limit == 0 { "UNLIMITED".to_string() } else { self.config.rate_limit.to_string() },
206 ""
207 ).cyan());
208 println!("{}", format!(
209 "│ ⏱️ Timeout: {}s | Retries: {} | Max errors: {}{:<30}│",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected