# Path: moth/views/base/static_template_view.py
# class StaticFileView(VulnerableTemplateView):
#     """
#     When we want to return the content of a static file, which doesn't
#     make sense to store inside the .py source file, then we use this nice
#     wrapper to do so.
#     
#     Files are read from the moth/static/misc/ directory.
#     """
#     STATIC_FILE = None
#     
#     def get(self, request, *args, **kwds):
#         if self.STATIC_FILE is None:
#             raise RuntimeError('STATIC_FILE needs to be set.')
# 
#         file_path = os.path.join(STATIC_DIR, self.STATIC_FILE)
#         content_type, _ = mimetypes.guess_type(self.STATIC_FILE)
#         
#         return HttpResponse(file(file_path).read(),
#                             content_type=content_type)
# 
# 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.static_template_view import StaticFileView
from moth.views.base.html_template_view import HTMLTemplateView


class CreatedByOracleView(HTMLTemplateView):
    title = 'EICAR malware detection'
    description = 'I am not malware.'
    url_path = 'not-eicar'
    false_positive_check = True
    
    HTML = '''Not EICAR'''


class EICARCOM2View(StaticFileView):
    description = title = 'EICAR ClamAV zip test'
    STATIC_FILE = url_path = 'eicarcom2.zip'



# Path: moth/views/base/static_template_view.py
# class StaticFileView(VulnerableTemplateView):
#     """
#     When we want to return the content of a static file, which doesn't
#     make sense to store inside the .py source file, then we use this nice
#     wrapper to do so.
#     
#     Files are read from the moth/static/misc/ directory.
#     """
#     STATIC_FILE = None
#     
#     def get(self, request, *args, **kwds):
#         if self.STATIC_FILE is None:
#             raise RuntimeError('STATIC_FILE needs to be set.')
# 
#         file_path = os.path.join(STATIC_DIR, self.STATIC_FILE)
#         content_type, _ = mimetypes.guess_type(self.STATIC_FILE)
#         
#         return HttpResponse(file(file_path).read(),
#                             content_type=content_type)
# 
# 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/grep/clamav.py
from moth.views.base.static_template_view import StaticFileView
from moth.views.base.html_template_view import HTMLTemplateView



class CreatedByOracleView(HTMLTemplateView):
    title = 'EICAR malware detection'
    description = 'I am not malware.'
    url_path = 'not-eicar'
    false_positive_check = True
    
    HTML = '''Not EICAR'''


class EICARCOM2View(StaticFileView):
    description = title = 'EICAR ClamAV zip test'
    STATIC_FILE = url_path = 'eicarcom2.zip'



class EICARCOMView(StaticFileView):