コード例 #1
0
ファイル: headers.py プロジェクト: security-geeks/commix
def http_response(headers, code):
  info_msg = "The target's HTTP response headers (" + str(code) + "):"
  if settings.VERBOSITY_LEVEL >= 3:
    print settings.print_info_msg(info_msg)
  if menu.options.traffic_file: 
    logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)  
  response_http_headers = str(headers).split("\r\n")
  for header in response_http_headers:
    if len(header) > 1: 
      if settings.VERBOSITY_LEVEL >= 3:
        print settings.print_traffic(header)
      if menu.options.traffic_file:
        logs.log_traffic("\n" + header)
  if menu.options.traffic_file:
    if settings.VERBOSITY_LEVEL <= 3: 
      logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
    else:
      logs.log_traffic("\n\n")    
コード例 #2
0
def http_response(headers, code):
    response_http_headers = str(headers).split("\n")
    for header in response_http_headers:
        if len(header) > 1:
            if settings.VERBOSITY_LEVEL >= 3:
                print(settings.print_traffic(header))
            if menu.options.traffic_file:
                logs.log_traffic("\n" + header)
    if menu.options.traffic_file:
        logs.log_traffic("\n\n")
コード例 #3
0
ファイル: headers.py プロジェクト: Evilk1llah/commix
 def send(self, req):
   headers = req.decode()
   request_http_headers = str(headers).split("\r\n")
   unique_request_http_headers = []
   [unique_request_http_headers.append(item) for item in request_http_headers if item not in unique_request_http_headers]
   request_http_headers = unique_request_http_headers
   for header in request_http_headers:
     if settings.VERBOSITY_LEVEL >= 2:
       print(settings.print_traffic(header))
     if menu.options.traffic_file:
       logs.log_traffic("\n" + header)
   http_client.send(self, req)
コード例 #4
0
        def request(self, method, url, body, headers):
            info_msg = "The provided HTTP request headers: "
            if settings.VERBOSITY_LEVEL >= 2:
                print settings.print_info_msg(info_msg)
            if menu.options.traffic_file:
                logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)
            header = method + " " + url
            if settings.VERBOSITY_LEVEL >= 2:
                print settings.print_traffic(header)
            if menu.options.traffic_file:
                logs.log_traffic("\n" + header)
            for item in headers.items():
                header = item[0] + ": " + item[1]
                if settings.VERBOSITY_LEVEL >= 2:
                    print settings.print_traffic(header)
                if menu.options.traffic_file:
                    logs.log_traffic("\n" + header)
            if body:
                header = body
                if settings.VERBOSITY_LEVEL >= 2:
                    print settings.print_traffic(header)
                if menu.options.traffic_file:
                    logs.log_traffic("\n" + header)
            if menu.options.traffic_file:
                logs.log_traffic("\n\n")

            if settings.PROXY_PROTOCOL == 'https':
                httplib.HTTPSConnection.request(self, method, url, body,
                                                headers)
            else:
                httplib.HTTPConnection.request(self, method, url, body,
                                               headers)
コード例 #5
0
ファイル: headers.py プロジェクト: security-geeks/commix
 def request(self, method, url, body, headers):
   info_msg = "The provided HTTP request headers: "
   if settings.VERBOSITY_LEVEL >= 2:
     print settings.print_info_msg(info_msg)
   if menu.options.traffic_file: 
     logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)
   header = method + " " + url
   if settings.VERBOSITY_LEVEL >= 2:
     print settings.print_traffic(header)
   if menu.options.traffic_file:
     logs.log_traffic("\n" + header)
   for item in headers.items():
     header = item[0] + ": " + item[1]
     if settings.VERBOSITY_LEVEL >= 2:
       print settings.print_traffic(header)
     if menu.options.traffic_file:
       logs.log_traffic("\n" + header)
   if body :
     header = body
     if settings.VERBOSITY_LEVEL >= 2:
       print settings.print_traffic(header)
     if menu.options.traffic_file:
       logs.log_traffic("\n" + header) 
   if menu.options.traffic_file:
     logs.log_traffic("\n\n")
   if settings.SCHEME == 'https':
     httplib.HTTPSConnection.request(self, method, url, body, headers)
   else:
     httplib.HTTPConnection.request(self, method, url, body, headers)
コード例 #6
0
def http_response(headers, code):
    if menu.options.traffic_file:
        logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)
    response_http_headers = str(headers).split("\n")
    for header in response_http_headers:
        if len(header) > 1:
            if settings.VERBOSITY_LEVEL >= 3:
                print(settings.print_traffic(header))
            if menu.options.traffic_file:
                logs.log_traffic("\n" + header)
    if menu.options.traffic_file:
        if settings.VERBOSITY_LEVEL <= 3:
            logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
        else:
            logs.log_traffic("\n\n")
コード例 #7
0
 def send(self, req):
   headers = req.decode()
   if menu.options.traffic_file: 
     logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)  
   request_http_headers = str(headers).split("\r\n")
   for header in request_http_headers:
     if len(header) > 1: 
       if settings.VERBOSITY_LEVEL >= 2:
         print(settings.print_traffic(header))
       if menu.options.traffic_file:
         logs.log_traffic("\n" + header)
   if menu.options.traffic_file:
     if settings.VERBOSITY_LEVEL <= 2: 
       logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
     else:
       logs.log_traffic("\n\n") 
   _http_client.HTTPConnection.send(self, req)
コード例 #8
0
def http_response(headers, code):
    info_msg = "The target's HTTP response headers (" + str(code) + "):"
    if settings.VERBOSITY_LEVEL >= 3:
        print((settings.print_info_msg(info_msg)))
    if menu.options.traffic_file:
        logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)
    response_http_headers = str(headers).split("\r\n")
    for header in response_http_headers:
        if len(header) > 1:
            if settings.VERBOSITY_LEVEL >= 3:
                print((settings.print_traffic(header)))
            if menu.options.traffic_file:
                logs.log_traffic("\n" + header)
    if menu.options.traffic_file:
        if settings.VERBOSITY_LEVEL <= 3:
            logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
        else:
            logs.log_traffic("\n\n")
コード例 #9
0
 def send(self, req):
   headers = req.decode()
   #http_method = headers[:4].strip()
   if menu.options.traffic_file: 
     logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)  
   request_http_headers = str(headers).split("\r\n")
   unique_request_http_headers = []
   [unique_request_http_headers.append(item) for item in request_http_headers if item not in unique_request_http_headers]
   request_http_headers = unique_request_http_headers
   for header in request_http_headers:
     if settings.VERBOSITY_LEVEL >= 2:
       # if http_method == "GET" and len(header) > 1 or http_method == "POST":
       print(settings.print_traffic(header))
     if menu.options.traffic_file:
       logs.log_traffic("\n" + header)
   if menu.options.traffic_file:
     if settings.VERBOSITY_LEVEL > 1: 
       logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
     else:
       logs.log_traffic("\n\n") 
   _http_client.HTTPConnection.send(self, req)
コード例 #10
0
ファイル: headers.py プロジェクト: dark1t/commix
 def send(self, req):
   headers = req.decode()
   info_msg = "The target's request HTTP headers:"
   if settings.VERBOSITY_LEVEL >= 2:
     print(settings.print_info_msg(info_msg))
   if menu.options.traffic_file: 
     logs.log_traffic("-" * 37 + "\n" + info_msg + "\n" + "-" * 37)  
   request_http_headers = str(headers).split("\r\n")
   for header in request_http_headers:
     if len(header) > 1: 
       if settings.VERBOSITY_LEVEL >= 2:
         print(settings.print_traffic(header))
       if menu.options.traffic_file:
         logs.log_traffic("\n" + header)
   if menu.options.traffic_file:
     if settings.VERBOSITY_LEVEL <= 2: 
       logs.log_traffic("\n\n" + "#" * 77 + "\n\n")
     else:
       logs.log_traffic("\n\n") 
   # if settings.SCHEME == 'https':
   #   _http_client.HTTPSConnection.send(self, req)
   # else:
   _http_client.HTTPConnection.send(self, req)