reporter.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-"
  3. # vim: set expandtab tabstop=4 shiftwidth=4:
  4. """
  5. $Id$
  6. This file is part of the xsser project, http://xsser.03c8.net
  7. Copyright (c) 2011/2016 psy <epsylon@riseup.net>
  8. xsser is free software; you can redistribute it and/or modify it under
  9. the terms of the GNU General Public License as published by the Free
  10. Software Foundation version 3 of the License.
  11. xsser is distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  14. details.
  15. You should have received a copy of the GNU General Public License along
  16. with xsser; if not, write to the Free Software Foundation, Inc., 51
  17. Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  18. """
  19. class XSSerReporter(object):
  20. """
  21. Base class for objects wanting to receive report information from XSSer.
  22. It implements all callbacks so you will be safe ;)
  23. """
  24. def start_attack(self):
  25. pass
  26. def end_attack(self):
  27. pass
  28. def mosquito_crashed(self, dest_url, reason="unknown"):
  29. pass
  30. def report_state(self, state):
  31. pass
  32. def add_link(self, orig_url, dest_url):
  33. pass
  34. def report_error(self, error_msg):
  35. pass
  36. def start_token_check(self, dest_url):
  37. pass
  38. def start_crawl(self, dest_url):
  39. pass
  40. def post(self, msg):
  41. pass
  42. def token_arrived(self, token):
  43. pass
  44. def add_checked(self, dest_url):
  45. pass
  46. def add_success(self, dest_url):
  47. pass
  48. def add_failure(self, dest_url):
  49. pass