Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
2,992
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None
  1. The purpose of this task is to find bots inside huge log file.
  2.  
  3. Lots of bots logged in to our service. They all do same thing very quickly: they log in, change password and log off; all of these actions are establishing within one second. Our task is to find them in log file.
  4.  
  5. Bash is strongly preferred
  6. If you cannot do it in bash, try Python.
  7.  
  8. Please write command in Bash/Python that will show all profiles meeting following criteria:
  9. - user logged in, user changed password, user logged off within same second (all 3 actions have to be done within 1 second);
  10. - those actions (log in, change password, log off) happened one after another with no other entires in between.
  11.  
  12. fxsciaqulmlk - is typical profile name from the log file
  13.  
  14. small part of the log file:
  15.  
  16. [a lot of data]
  17. Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged in| -
  18. Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user changed password| -
  19. Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged off| -
  20. Mon, 22 Aug 2016 13:15:42 +0200|178.57.66.225|faaaaaa11111| - |user logged in| -
  21. Mon, 22 Aug 2016 13:15:40 +0200|178.57.66.215|terdsfsdfsdf| - |user logged in| -
  22. Mon, 22 Aug 2016 13:15:49 +0200|178.57.66.215|terdsfsdfsdf| - |user changed password| -
  23. Mon, 22 Aug 2016 13:15:49 +0200|178.57.66.215|terdsfsdfsdf| - |user logged off| -
  24. Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -
  25. Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -
  26. Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user changed password| -
  27. Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged off| -
  28. Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged in| -
  29. Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user changed password| -
  30. Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user changed profile| -
  31. Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged off| -
  32. Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged in| -
  33. Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user changed password| -
  34. Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged off| -
  35. Mon, 22 Aug 2016 13:20:42 +0200|178.57.67.225|faaaa0a11111| - |user logged in| -
  36. [a lot of data]
Advertisement
RAW Paste Data Copied
Advertisement