Advertisement
Guest User

ban nubs

a guest
Nov 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. 1) Login using a new incognito window
  2. 2) Open settings page
  3. 3) IP Ban all the spammers currently online (using the sidebar popup)
  4. 4) Right click anywhere on the page, click Inspect
  5. 5) Navigate to the console tab in the newly popped up window.
  6. 6) Paste the below code:
  7. var min_level = 2;
  8. var whitelist = [];
  9. $.getJSON('/all_online_users', function(users) {
  10. $.each(users, function(idx, usr) {
  11. if ((usr.tag === 'initiate') && (usr.level < min_level)){
  12. whitelist.push(usr.username);
  13. }
  14. })
  15. });
  16. console.log(whitelist);
  17.  
  18. function banhammer() {
  19. window.setInterval(function() {
  20. $.getJSON('/all_online_users', function(users) {
  21. $.each(users, function(idx, usr) {
  22. if ((usr.tag === 'initiate') && (usr.level < min_level) && ($.inArray(usr.username, whitelist) == -1)){
  23. console.log('Banning ' + usr.username);
  24. whitelist.push(usr.username);
  25. $.post('/ban_ip', {'username': usr.username, 'comment': 'spam'});
  26. };
  27. })
  28. })
  29. }, 2000)
  30. };
  31. banhammer();
  32. 7) The bot will be active as long as the window is kept open (if you reload or navigate away from the page, you'll have to repeat steps 3-6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement