# 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.html_template_view import HTMLTemplateView


class DotNetWithEVView(HTMLTemplateView):
    title = '.NET Event validation (secure)'
    description = 'With VIEWSTATE and EVENTVALIDATION'
    url_path = 'event_validation.html'
    false_positive_check = True
    
    HTML = '''
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTMyNjg0MDc1MWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFIGJwJF8kY3RsMDAkXyRicyRfJHdzJF8kU2VhcmNoQm94bxUzDQVBRPB2cN8nnSmNhVZ6WX0=" />
    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKvz4izBwKM54rGBiEhTsyhLU3XkVd490N5C2TbyVCW" />
    '''



# 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/dot_net_event_validation.py
from moth.views.base.html_template_view import HTMLTemplateView



class DotNetWithEVView(HTMLTemplateView):
    title = '.NET Event validation (secure)'
    description = 'With VIEWSTATE and EVENTVALIDATION'
    url_path = 'event_validation.html'
    false_positive_check = True
    
    HTML = '''
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTMyNjg0MDc1MWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFIGJwJF8kY3RsMDAkXyRicyRfJHdzJF8kU2VhcmNoQm94bxUzDQVBRPB2cN8nnSmNhVZ6WX0=" />
    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKvz4izBwKM54rGBiEhTsyhLU3XkVd490N5C2TbyVCW" />
    '''



class DotNetWithoutEVView(HTMLTemplateView):