コード例 #1
0
ファイル: warequest.py プロジェクト: cereal/whatsploit
    def sendRequest(host, port, path, headers, params, reqType="GET"):

        params = urllib.urlencode(params)

        path = path + "?" + params if reqType == "GET" else path

        WADebug.stdDebug(reqType)
        WADebug.stdDebug(headers)
        WADebug.stdDebug(params)

        WADebug.stdDebug("Opening connection to %s" % host)

        conn = httplib.HTTPSConnection(host, port)

        WADebug.stdDebug("Requesting %s" % path)
        conn.request(reqType, path, params, headers)

        response = conn.getresponse().read()

        #WADebug.stdDebug(response)

        return response
コード例 #2
0
ファイル: warequest.py プロジェクト: SfietKonstantin/yowsup
	def sendRequest(host, port, path, headers, params, reqType="GET"):

		params = urlencode(params);

		
		path = path + "?"+ params if reqType == "GET" and params else path
		
		WADebug.stdDebug(reqType)
		WADebug.stdDebug(headers);
		WADebug.stdDebug(params);

		WADebug.stdDebug("Opening connection to %s" % host);
		
		conn = httplib.HTTPSConnection(host ,port) if port == 443 else httplib.HTTPConnection(host ,port)
		
		WADebug.stdDebug("Requesting %s" % path)
		conn.request(reqType, path, params, headers);

		response = conn.getresponse()
		
		#WADebug.stdDebug(response)

		return response
コード例 #3
0
ファイル: warequest.py プロジェクト: bubuntux/somechat
    def sendRequest(host, port, path, headers, params, reqType="GET"):

        params = urlencode(params)

        path = path + "?" + params if reqType == "GET" and params else path

        if len(headers):
            WADebug.stdDebug(headers)
        if len(params):
            WADebug.stdDebug(params)

        WADebug.stdDebug("Opening connection to %s" % host)

        conn = httplib.HTTPSConnection(
            host, port) if port == 443 else httplib.HTTPConnection(host, port)

        WADebug.stdDebug("Sending %s request to %s" % (reqType, path))
        conn.request(reqType, path, params, headers)

        response = conn.getresponse()

        return response
コード例 #4
0
ファイル: warequest.py プロジェクト: computologo/yowsup
  def sendRequest(host, port, path, headers, params, reqType="GET"):

    params = urlencode(params);


    path = path + "?"+ params if reqType == "GET" and params else path

    if len(headers):
      WADebug.stdDebug(headers)
    if len(params):
      WADebug.stdDebug(params)

    WADebug.stdDebug("Opening connection to %s" % host);

    conn = WARequest.getConn(host, port)
    if conn is None:
      conn = WARequest.getConn(host, port, True)

    WADebug.stdDebug("Sending %s request to %s" % (reqType, path))
    conn.request(reqType, path, params, headers);

    response = conn.getresponse()

    return response