# Path: lightbulb/core/utils/common.py
# def accept_bool(user_input):
#     """
#         Transforms a string into bool
#         Args:
#             user_input (str): The string parameter
#         Retuns:
#             bool: A true or false value
#     """
#     if not isinstance(user_input, basestring):
#         return  user_input
# 
#     if user_input.lower() in ['true', '1', 't', 'y', 'yes']:
#         return True
#     else:
#         return  False


import re
import urllib
import sys
import socket
import base64
import ssl
from lightbulb.core.utils.common import accept_bool

META = {
    'author': 'George Argyros, Ioannis Stais',
    'name': 'RawHTTPHandler',
    'description': 'Performs membership queries in a browser filter',
    'type': 'UTIL',
    'options': [
        ('MESSAGE', "GET / HTTP/1.1", True, 'The HTTP raw request to send. The targetted parameter must me marked as  --LIGHTBULB--REPLACE--HERE--'),
        ('HOST', "127.0.0.1", True, 'The target host'),
        ('PORT', 80, True, 'The target port'),
        ('HTTPS', False, True, 'Whether to use SSL/TLS'),
        ('BLOCK', None, False, 'The response string that indicates that the WAF blocks the request'),
        ('BYPASS', None, False, 'The response string that indicates that the WAF allows the request'),
        ('ECHO', None, False, 'Optional custom debugging message that is printed on each membership request'),
    ],
    'comments': ['Sample comment 1', 'Sample comment 2']

# Path: lightbulb/core/utils/common.py
# def accept_bool(user_input):
#     """
#         Transforms a string into bool
#         Args:
#             user_input (str): The string parameter
#         Retuns:
#             bool: A true or false value
#     """
#     if not isinstance(user_input, basestring):
#         return  user_input
# 
#     if user_input.lower() in ['true', '1', 't', 'y', 'yes']:
#         return True
#     else:
#         return  False


# Path: lightbulb/core/utils/rawhttphandler.py
import re
import urllib
import sys
import socket
import base64
import ssl
from lightbulb.core.utils.common import accept_bool


META = {
    'author': 'George Argyros, Ioannis Stais',
    'name': 'RawHTTPHandler',
    'description': 'Performs membership queries in a browser filter',
    'type': 'UTIL',
    'options': [
        ('MESSAGE', "GET / HTTP/1.1", True, 'The HTTP raw request to send. The targetted parameter must me marked as  --LIGHTBULB--REPLACE--HERE--'),
        ('HOST', "127.0.0.1", True, 'The target host'),
        ('PORT', 80, True, 'The target port'),
        ('HTTPS', False, True, 'Whether to use SSL/TLS'),
        ('BLOCK', None, False, 'The response string that indicates that the WAF blocks the request'),
        ('BYPASS', None, False, 'The response string that indicates that the WAF allows the request'),
        ('ECHO', None, False, 'Optional custom debugging message that is printed on each membership request'),
    ],
    'comments': ['Sample comment 1', 'Sample comment 2']

}