📜 ⬆️ ⬇️

The little joys of admin localhost

Suddenly D_E_N_I_S_K_A composed a simple python script that fired a shot at each page access (reading access.log) and asked me to post it.

  #! / usr / bin / env python
 import popen2, random
 f_in, f_out = popen2.popen2 ("tail -f -n 0 /var/log/lighttpd/access.log")
 while true:
     line = f_in.readline ()
     popen2.popen2 ("aplay bang_% i.wav"% random.randint (1.6)) 


“In my opinion, it’s funny and arouses a certain sense of pride in its local host htp server that looks to the network.”
')
Sounds used by the script , put in the same directory with the script

Source: https://habr.com/ru/post/64456/


All Articles