Parallel cUrl Requests

Multi-processing the cUrl execute (on windows) can enable a very easy and fast way to roll a small-scale load/traffic test on a resource,
Although there are probably better ways (multi curl lib-python, curl_multi-php), this kind of “all include” one nice solution.

as a bonus, there is some xff (X-Forward-For) header input from text file.

the sample project is attached as rar, its open, free to use (under GPL).

— get a compiled curl (w or w/o libssl32.dll, 32bit or 64bit, it really does not matter)

@echo off

set sUserAgent=”Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1″
set sHOST=%1
set sIP=%2

::.\curl.exe –header “X-Forwarded-For: %sIP%” –user-agent %sUserAgent% –referer %sHOST% –verbose %sHOST%
.\curl.exe –header “X-Forwarded-For: %sIP%” –user-agent %sUserAgent% –referer %sHOST% –silent %sHOST%


@echo off
echo I am the runner

set HOST=__host.txt
set IP=__country_Afghanistan_20.txt

for /f “tokens=* delims= ” %%a in (%HOST%) do (
for /f “tokens=* delims= ” %%b in (%IP%) do (
start /b /min /low “cmd /c “call request.cmd %%a %%b




Leave a reply

Wamp 2.2 (Apache 2.4.2) SSL Support – the new version of wamp

part #1. create a nice fat crt.
(pre: download openssl, install, add to bin/ folder to path, create new folder c:\tmp, cd c:\tmp, exe. commands)

openssl req -new> webserver.csr
openssl rsa -in privkey.pem -out webserver.key
openssl x509 -in webserver.csr -out webserver.cert -req -signkey webserver.key -days 99999

openssl genrsa -out webserver.csr 4096
openssl req -nodes -newkey rsa:4096 -keyout privkey.pem -out webserver.cert
openssl rsa -in privkey.pem -out webserver.key

result is: .rnd, privkey.pem, webserver.cert, webserver.csr, webserver.key

part #2:
new folder C:\wamp\OpenSSL\
inside: new folders: certs, crl, newcerts, private


c:\tmp\webserver.cert -> C:\wamp\OpenSSL\certs\
c:\tmp\webserver.csr -> C:\wamp\OpenSSL\certs\
c:\tmp\webserver.key -> C:\wamp\OpenSSL\certs\

c:\tmp\.rnd -> C:\wamp\OpenSSL\private\
c:\tmp\privkey.pem -> C:\wamp\OpenSSL\private\