コード例 #1
0
ファイル: kv_container.py プロジェクト: everping/w3af
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the KeyValueContainer instance.
        """
        return urlencode(self, encoding=self.encoding)
コード例 #2
0
ファイル: nr_kv_container.py プロジェクト: andresriancho/w3af
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the DataContainer Object.
        """
        return urlencode(self, encoding=self.encoding)
コード例 #3
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the KeyValueContainer instance.
        """
        return urlencode(self, encoding=self.encoding)
コード例 #4
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the DataContainer Object.
        """
        return urlencode(self, encoding=self.encoding)
コード例 #5
0
ファイル: urlencoded_form.py プロジェクト: 0x554simon/w3af
    def __str__(self):
        """
        This method returns a string representation of the Form object.

        Please note that if the form has radio/select/checkboxes the
        first value will be put into the string representation and the
        others will be lost.

        :see: Unittest in test_form.py
        :return: string representation of the Form object.
        """
        d = dict()
        d.update(self.items())

        for key in d:
            key_type = self.get_parameter_type(key, default=None)
            if key_type in self.AVOID_STR_DUPLICATES:
                d[key] = d[key][:1]

        return urlencode(d, encoding=self.encoding, safe='')
コード例 #6
0
    def __str__(self):
        """
        This method returns a string representation of the Form object.

        Please note that if the form has radio/select/checkboxes the
        first value will be put into the string representation and the
        others will be lost.

        :see: Unittest in test_form.py
        :return: string representation of the Form object.
        """
        d = dict()
        d.update(self.items())

        for key in d:
            key_type = self.get_parameter_type(key, default=None)
            if key_type in self.AVOID_STR_DUPLICATES:
                d[key] = d[key][:1]

        return urlencode(d, encoding=self.encoding, safe='')
コード例 #7
0
 def __str__(self):
     """
     :return: string representation of the QueryString object.
     """
     return enc_dec.urlencode(self, encoding=self.encoding, safe='')
コード例 #8
0
ファイル: test_encode_decode.py プロジェクト: 5l1v3r1/Vulcan
 def test_tilde_case01(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'latin1'),
                      'a=%E1&a=2')
コード例 #9
0
ファイル: test_encode_decode.py プロジェクト: 5l1v3r1/Vulcan
 def test_simple(self):
     self.assertEqual(urlencode(parse_qs(u'a=1&a=c'), 'latin1'), 'a=1&a=c')
コード例 #10
0
ファイル: test_encode_decode.py プロジェクト: 5l1v3r1/Vulcan
 def test_tilde_case02(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'utf-8'),
                      'a=%C3%A1&a=2')
コード例 #11
0
ファイル: test_encode_decode.py プロジェクト: 0x554simon/w3af
 def test_simple(self):
     self.assertEqual(urlencode(parse_qs(u'a=1&a=c'), 'latin1'), 'a=1&a=c')
コード例 #12
0
ファイル: test_encode_decode.py プロジェクト: 0x554simon/w3af
 def test_tilde_case02(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'utf-8'), 'a=%C3%A1&a=2')
コード例 #13
0
ファイル: test_encode_decode.py プロジェクト: 0x554simon/w3af
 def test_tilde_case01(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'latin1'), 'a=%E1&a=2')
コード例 #14
0
ファイル: query_string.py プロジェクト: 0x554simon/w3af
 def __str__(self):
     """
     :return: string representation of the QueryString object.
     """
     return enc_dec.urlencode(self, encoding=self.encoding, safe='')