Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Joaquin Alzola Newsgroups: comp.lang.python Subject: Remote Rsponse Socket Connection Date: Fri, 11 Mar 2016 09:02:20 +0000 Lines: 20 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de AsVcOKlwyvyDuf61Sgc3BgDAU2AjnCIshRzGgXBT9t3A== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'data:': 0.07; 'socket': 0.07; 'python': 0.10; 'decode': 0.16; 'hexadecimal': 0.16; 'privilege.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:b 190': 0.16; 'string': 0.17; 'byte': 0.18; 'to:name:python- list@python.org': 0.20; 'function': 0.28; 'values': 0.28; 'message.': 0.33; 'but': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.36; 'received:10': 0.37; 'url:rec-html40': 0.37; 'charset :us-ascii': 0.37; 'guys': 0.38; 'data': 0.39; 'to:addr:python.org': 0.40; 'url:schemas': 0.40; 'some': 0.40; 'url:office': 0.40; 'contact': 0.66; 'reply': 0.68; 'subject': 0.70; 'disclose': 0.71; 'connection.': 0.76; 'à': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lebara.onmicrosoft.com; s=selector1-lebara-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QUILLoO+td1Q0kkIs0swrvfMri4wIdrTZohwFQ0O+nM=; b=jrQvXknBIZZAIIvZ9T5GXxgsaqNn0OS4L3u4cSGC2TavvDXIFKtMnQzCHQUZUpMp5/tPAWYBEYwSHws+fyTMeQwLAua/TJs65C/6BJrWohfUHBqc7i+cZVUf7F4pK5iauEsZsl3nfg4v+17dUpG0mzcapdQzx4t5UvSn8d7G/ZM= Thread-Topic: Remote Rsponse Socket Connection Thread-Index: AdF7K1NqKA7P0NouRA6MNYCimKm4eA== Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: python.org; dkim=none (message not signed) header.d=none;python.org; dmarc=none action=none header.from=lebara.com; x-originating-ip: [165.225.80.109] x-ms-office365-filtering-correlation-id: 89846896-6624-4ddb-45f8-08d3498bdab6 x-microsoft-exchange-diagnostics: 1; DB5PR07MB1493; 5:3Z/szaR/HBjgPJKVpK8PPPr2e8wrg1yEJIeki5zok+8SQLNmx7zql+JMAuJhMNrzIsicXbnB8Tp7G+MKpn3be2urmSCnMrkuBg//88DqEs7kn+ZaznI4DnBhO+H7PyUDI67+Lskgx40NR/6t6Kqr8A==; 24:BvenFH6zTSlZzsw/psPOFrbBDIKCHoVJZxkra3xOow3sCOUkGB2WGNbPTA1PIyvUIJa2dP20m8WUucLdDmipb/xwwONKq9lAHFspIZCDU7Y= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR07MB1493; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:DB5PR07MB1493; BCL:0; PCL:0; RULEID:; SRVR:DB5PR07MB1493; x-forefront-prvs: 087894CD3C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(2501003)(19580395003)(102836003)(5640700001)(5630700001)(2351001)(2906002)(5003600100002)(6116002)(66066001)(790700001)(229853001)(77096005)(76576001)(3846002)(189998001)(15975445007)(74316001)(19300405004)(110136002)(5002640100001)(5008740100001)(19625215002)(11100500001)(107886002)(33656002)(3480700003)(10400500002)(586003)(54356999)(450100001)(50986999)(1096002)(2900100001)(16236675004)(1220700001)(3660700001)(3280700002)(575784001)(5004730100002)(81166005)(87936001)(122556002)(92566002)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB5PR07MB1493; H:DB5PR07MB1496.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM X-OriginatorOrg: lebara.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2016 09:02:20.6938 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d7093539-83cd-4991-b1b3-aacef74cf097 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR07MB1493 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104595 HI Guys I received this from a socket connection. This is the received data: >From python function --> data =3D s.recv(2048) b'\x01\x00\x00D\x00\x00\x01\x18\x00\x00\x00\x00p2E\xe1+\xe8xG\x00\x00\x01\x= 08@\x00\x00\x0bmmm\x00\x00\x00\x01(@\x00\x00\x16mmm.xxxxxx.com\x00\x00\x00\= x00\x01\x0c@\x00\x00\x0c\x00\x00\x07\xd1' I received a byte string with hexadecimal values and some extra junk like \= x0bmmm (mmm). But that junk needs to be on the message. How is the best way to decode such reply from server? BR Joaquin This email is confidential and may be subject to privilege. If you are not = the intended recipient, please do not copy or disclose its content but cont= act the sender immediately upon receipt.