SHARE
TWEET

Untitled

a guest Jul 19th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10.0.0.3 - - [08/Jul/2019:10:26:41 +0000] "GET /hello.html HTTP/1.1" 404 444 "-" "curl/7.52.1"
  2. 10.0.0.3 - - [08/Jul/2019:10:26:41 +0000] "GET /hello.html HTTP/1.1" 404 444 "-" "curl/7.52.1"
  3. 10.0.0.3 - - [08/Jul/2019:10:26:41 +0000] "GET /secret.html HTTP/1.1" 200 282 "-" "curl/7.52.1"
  4.      
  5. File.open("access.log").each do |line|
  6. m = /(d{1,3}.d{1,3}.d{1,3}.d{1,3})(.+/)([a-zA-Z0-9]+.html)/.match(line)
  7. puts m
  8. end
  9.      
  10. 10.0.0.3 - - [08/Jul/2019:10:26:41 +0000] "GET /hello.html
  11.      
  12. 1.rb:25:in block in <main>': undefined method []' for nil:NilClass (NoMethodError)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top