| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,17 @@ | |||
| 1 | - # source "scripts/verifyBenchmarkPluginAvailable.sh" - Don't have .bat version of this (yet) | ||
| 2 | - CALL mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml | ||
| 3 | - | ||
| 1 | + @echo off | ||
| 2 | + REM source "scripts/verifyBenchmarkPluginAvailable.sh" - Don't have .bat version of this (yet) | ||
| 3 | + set /A args_count=0 | ||
| 4 | + for %%A in (%*) do set /A args_count+=1 | ||
| 5 | + if %args_count% NEQ 0 ( | ||
| 6 | + if %args_count% EQU 2 ( | ||
| 7 | + CALL mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml -DproxyHost="%1" -DproxyPort="%2" | ||
| 8 | + ) else ( | ||
| 9 | + echo Error!! | ||
| 10 | + echo ------- | ||
| 11 | + echo To run the Crawler for localhost, execute runCrawler.bat with no arguments. | ||
| 12 | + echo To run the Crawler for remote host, execute runCrawler.bat with only 2 arguments, proxy-host and proxy-port. | ||
| 13 | + echo Example: runCrawler.bat 192.168.0.1 53452 | ||
| 14 | + ) | ||
| 15 | + ) else ( | ||
| 16 | + CALL mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml | ||
| 17 | + ) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,13 @@ | |||
| 1 | + #!/bin/sh | ||
| 1 | 2 | source "scripts/verifyBenchmarkPluginAvailable.sh" | |
| 2 | - mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml | ||
| 3 | - | ||
| 3 | + if [ $# -eq 2 ]; then | ||
| 4 | + mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml -DproxyHost="$1" -DproxyPort="$2" | ||
| 5 | + elif [ $# -eq 0 ]; then | ||
| 6 | + mvn org.owasp:benchmarkutils-maven-plugin:run-crawler -DcrawlerFile=data/benchmark-crawler-http.xml | ||
| 7 | + else | ||
| 8 | + echo "Error!!" | ||
| 9 | + echo "-------" | ||
| 10 | + echo "To run the Crawler for localhost, execute runCrawler.sh with no arguments." | ||
| 11 | + echo "To run the Crawler for remote host, execute runCrawler.sh with only 2 arguments, proxy-host and proxy-port." | ||
| 12 | + echo "Example: ./runCrawler.sh 192.168.0.1 53452" | ||
| 13 | + fi | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments