{"action":"created","issue":{"url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/43","labels_url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/43/comments","events_url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/43/events","html_url":"https://github.com/tintinweb/scapy-ssl_tls/issues/43","id":96060524,"number":43,"title":"Problem with ServerNameIndication in the limit length permitted ","user":{"login":"lespla","id":4354214,"avatar_url":"https://avatars.githubusercontent.com/u/4354214?v=3","gravatar_id":"","url":"https://api.github.com/users/lespla","html_url":"https://github.com/lespla","followers_url":"https://api.github.com/users/lespla/followers","following_url":"https://api.github.com/users/lespla/following{/other_user}","gists_url":"https://api.github.com/users/lespla/gists{/gist_id}","starred_url":"https://api.github.com/users/lespla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lespla/subscriptions","organizations_url":"https://api.github.com/users/lespla/orgs","repos_url":"https://api.github.com/users/lespla/repos","events_url":"https://api.github.com/users/lespla/events{/privacy}","received_events_url":"https://api.github.com/users/lespla/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-20T13:11:08Z","updated_at":"2015-07-20T16:26:48Z","closed_at":null,"body":"Hello\r\nIn the RFC(6066), the maximum length permitted for ServerNameIdication is 2^16-1, but when I try to assign a value with this length (capture[3][TLSServerName].data=\"a\" * 65535) and then save this capture, I get this error:\r\nTraceback (most recent call last):\r\n  File \"change_packet.py\", line 475, in <module>\r\n    main()\r\n  File \"change_packet.py\", line 467, in main\r\n    capture_obj.extra_repair_capture()\r\n  File \"change_packet.py\", line 256, in extra_repair_capture\r\n    execfile(\"./extra_funcionality.py\",variables)\r\n  File \"./extra_funcionality.py\", line 335, in <module>\r\n    change_sni(capture[3],\"b\" * 65535)\r\n  File \"./extra_funcionality.py\", line 174, in change_sni\r\n    extensions_length += len(tls_extension)\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 297, in __len__\r\n    return len(self.__str__())\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 268, in __str__\r\n    return self.build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 330, in build\r\n    p = self.do_build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 319, in do_build\r\n    pkt = self.self_build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 310, in self_build\r\n    p = f.addfield(self, p, val)\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/fields.py\", line 70, in addfield\r\n    return s+struct.pack(self.fmt, self.i2m(pkt,val))\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/fields.py\", line 613, in i2m\r\n    x = len(pkt.payload)\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 297, in __len__\r\n    return len(self.__str__())\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 268, in __str__\r\n    return self.build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 330, in build\r\n    p = self.do_build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 319, in do_build\r\n    pkt = self.self_build()\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/packet.py\", line 310, in self_build\r\n    p = f.addfield(self, p, val)\r\n  File \"/usr/local/lib/python2.7/dist-packages/scapy/fields.py\", line 70, in addfield\r\n    return s+struct.pack(self.fmt, self.i2m(pkt,val))\r\nstruct.error: 'H' format requires 0 <= number <= 65535\r\n"},"comment":{"url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/comments/122939951","html_url":"https://github.com/tintinweb/scapy-ssl_tls/issues/43#issuecomment-122939951","issue_url":"https://api.github.com/repos/tintinweb/scapy-ssl_tls/issues/43","id":122939951,"user":{"login":"alexmgr","id":8157569,"avatar_url":"https://avatars.githubusercontent.com/u/8157569?v=3","gravatar_id":"","url":"https://api.github.com/users/alexmgr","html_url":"https://github.com/alexmgr","followers_url":"https://api.github.com/users/alexmgr/followers","following_url":"https://api.github.com/users/alexmgr/following{/other_user}","gists_url":"https://api.github.com/users/alexmgr/gists{/gist_id}","starred_url":"https://api.github.com/users/alexmgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexmgr/subscriptions","organizations_url":"https://api.github.com/users/alexmgr/orgs","repos_url":"https://api.github.com/users/alexmgr/repos","events_url":"https://api.github.com/users/alexmgr/events{/privacy}","received_events_url":"https://api.github.com/users/alexmgr/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T16:26:48Z","updated_at":"2015-07-20T16:26:48Z","body":"Hi lespla,\r\n\r\nThanks for the report.\r\nWe currently don't have any logic to fragment TLS Records. For now, you'll have to perform fragmentation manually. Will be a little bit of work, but shouldn't be too bad for the scenario you're trying to cover.\r\nThis feature is on my todo list, since it's code I'd like to exercise in implementations also."}}