# Path: moth/views/base/raw_path_view.py
# class RawPathTemplateView(HTMLTemplateView):
#     """
#     A view that has a raw URL path and has fixed HTML body.
#     """
#     HTML = None
# 
#     def get_url_path(self):
#         '''
#         We can locate this view in any directory. Other views that don't inherit
#         from RawPathTemplateView will get located in a well structured location
#         '''
#         path = urlparse.urlparse(self.url_path).path
#         return unicode('%s' % path)
# 
#     # FIXME: Add support for encoding
#     get_unicode_url_path = get_url_path
# 
# Path: moth/views/base/html_template_view.py
# class HTMLTemplateView(VulnerableTemplateView):
#     '''
#     All vulnerabilities inherit from this template, which will render the data
#     returned by the subclasses, disable anti-CSRF, etc.
#     '''
#     # If the subclass just wants to return static HTML, we give him a shortcut
#     # where he doesn't define the get method, just sets HTML and we'll do the
#     # rest
#     HTML = None
# 
#     def get(self, request, *args, **kwds):
#         if self.HTML is None:
#             raise RuntimeError('HTML needs to be set.')
#         
#         context = self.get_context_data()
#         context['html'] = self.HTML
# 
#         response = render(request, self.template_name, context)
# 
#         for key, value in self.extra_headers.iteritems():
#             response[key] = value
# 
#         return response


from moth.views.base.raw_path_view import RawPathTemplateView
from moth.views.base.html_template_view import HTMLTemplateView


class IAmHiddenView(RawPathTemplateView):
    title = 'A hidden file in the webroot'
    description = 'Simple unlinked file at /iamhidden.txt'
    url_path = 'iamhidden.txt'
    linked = False
    
    HTML = '''
    Please find me dir_bruter!
    '''


class HiddenDirectoryView(HTMLTemplateView):
    title = 'A hidden directory'
    description = 'Simple unlinked directory'
    url_path = 'spameggs/'
    linked = False

    HTML = '''
    I am a hidden directory!
    '''



# Path: moth/views/base/raw_path_view.py
# class RawPathTemplateView(HTMLTemplateView):
#     """
#     A view that has a raw URL path and has fixed HTML body.
#     """
#     HTML = None
# 
#     def get_url_path(self):
#         '''
#         We can locate this view in any directory. Other views that don't inherit
#         from RawPathTemplateView will get located in a well structured location
#         '''
#         path = urlparse.urlparse(self.url_path).path
#         return unicode('%s' % path)
# 
#     # FIXME: Add support for encoding
#     get_unicode_url_path = get_url_path
# 
# Path: moth/views/base/html_template_view.py
# class HTMLTemplateView(VulnerableTemplateView):
#     '''
#     All vulnerabilities inherit from this template, which will render the data
#     returned by the subclasses, disable anti-CSRF, etc.
#     '''
#     # If the subclass just wants to return static HTML, we give him a shortcut
#     # where he doesn't define the get method, just sets HTML and we'll do the
#     # rest
#     HTML = None
# 
#     def get(self, request, *args, **kwds):
#         if self.HTML is None:
#             raise RuntimeError('HTML needs to be set.')
#         
#         context = self.get_context_data()
#         context['html'] = self.HTML
# 
#         response = render(request, self.template_name, context)
# 
#         for key, value in self.extra_headers.iteritems():
#             response[key] = value
# 
#         return response


# Path: moth/views/vulnerabilities/crawl/dir_bruter.py
from moth.views.base.raw_path_view import RawPathTemplateView
from moth.views.base.html_template_view import HTMLTemplateView



class IAmHiddenView(RawPathTemplateView):
    title = 'A hidden file in the webroot'
    description = 'Simple unlinked file at /iamhidden.txt'
    url_path = 'iamhidden.txt'
    linked = False
    
    HTML = '''
    Please find me dir_bruter!
    '''


class HiddenDirectoryView(HTMLTemplateView):
    title = 'A hidden directory'
    description = 'Simple unlinked directory'
    url_path = 'spameggs/'
    linked = False

    HTML = '''
    I am a hidden directory!
    '''



class HiddenDirectoryInsideDirectoryView(HTMLTemplateView):