This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all the logs | |
tail -f /var/log/nginx/access.log | | |
# Extract IP and Timestamp for example | |
awk '{print $1 " " substr($4, 2, length($4) - 7)}' FPAT='[^ ]*|"[^"]*"|\\[[^]]*\\]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim /etc/nginx/nginx.conf: | |
#add: | |
log_format mycombined '$remote_addr - $remote_user [$time_iso8601] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; | |
access_log /var/log/nginx/access.log mycombined; | |
nginx -s reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyautogui | |
import time | |
import random | |
screenWidth, screenHeight = pyautogui.size() | |
currentMouseX, currentMouseY = pyautogui.position() | |
while True: | |
pyautogui.moveTo(random.randint(1, 1000), random.randint(1, 500)) | |
time.sleep(20) |
NewerOlder