Skip to content

Instantly share code, notes, and snippets.

@EikeDehling
Last active March 10, 2017 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EikeDehling/2ac5bf78ea5eb69b725e32ac686bcca4 to your computer and use it in GitHub Desktop.
Save EikeDehling/2ac5bf78ea5eb69b725e32ac686bcca4 to your computer and use it in GitHub Desktop.
Windows batch file for generating a random apache log
@echo off
Setlocal EnableDelayedExpansion
for /L %%n in (1,0,5) do (
SET /A N1=!RANDOM! * 255 / 32768
SET /A N2=!RANDOM! * 255 / 32768
SET /A N3=!RANDOM! * 255 / 32768
SET /A N4=!RANDOM! * 255 / 32768
echo !N1!.!N2!.!N3!.!N4! - - [!date! : !time!] "GET /data.php HTTP/1.1" 200 !RANDOM!
ping 127.0.0.1 -n 6 > nul
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment