#NEWLINE# def convert_base64_to_plain( self ) : #NEWLINE# #INDENT# 'Converts Base64 traffic to plaintext\n\n            For all issue the traffic will be converted to base64.\n            ' #NEWLINE# for issue in self . issues : #NEWLINE# #INDENT# raw_traffic = issue . xpath ( 'RawTraffic' ) #NEWLINE# request_traffic = issue . xpath ( 'RawData/RawRequest' ) #NEWLINE# response_traffic = issue . xpath ( 'RawData/RawResponse' ) #NEWLINE# if ( len ( request_traffic ) > 0 ) : #NEWLINE# #INDENT# base64_traffic = request_traffic [ 0 ] . text #NEWLINE# traffic = base64 . b64decode ( base64_traffic ) #NEWLINE# request_traffic [ 0 ] . text = etree . CDATA ( traffic . decode ( 'utf-8' ) ) #NEWLINE# #UNINDENT# if ( len ( raw_traffic ) > 0 ) : #NEWLINE# #INDENT# base64_traffic = response_traffic [ 0 ] . text #NEWLINE# traffic = base64 . b64decode ( base64_traffic ) #NEWLINE# if ( len ( traffic ) < 10000 ) : #NEWLINE# #INDENT# response = str ( traffic ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# response = base64_traffic #NEWLINE# #UNINDENT# response_traffic [ 0 ] . text = etree . CDATA ( response ) #NEWLINE# #UNINDENT# raw_traffic [ 0 ] . text = '' . join ( [ request_traffic [ 0 ] . text , str ( response_traffic [ 0 ] . text ) ] ) #NEWLINE# raw_data = issue . xpath ( 'RawData' ) #NEWLINE# issue . remove ( raw_data [ 0 ] )