working on resolving 0-width strings
This commit is contained in:
		
							parent
							
								
									3630a61186
								
							
						
					
					
						commit
						b5682c7303
					
				
							
								
								
									
										12
									
								
								crypttool.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										12
									
								
								crypttool.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -157,16 +157,18 @@ def resolveZeroWidthString(inputstring): | |||||||
|     charfound = False |     charfound = False | ||||||
|     binarystring = '' |     binarystring = '' | ||||||
|     resultstring = '' |     resultstring = '' | ||||||
|     inputstring = inputstring.decode('unicode-escape') |     #inputstring = inputstring.decode('unicode-escape') | ||||||
|  |     inputstring = inputstring.decode('utf-8') | ||||||
|     for char in inputstring: |     for char in inputstring: | ||||||
|         print char |  | ||||||
|         if char == u'\u200b': |         if char == u'\u200b': | ||||||
|             binarystring += '1' |             binarystring += '1' | ||||||
|         elif char == u'\u200d': |         elif char == u'\u200d': | ||||||
|             binarystring += '0' |             binarystring += '0' | ||||||
|     for byte in binarystring[::8]: |     print('Binary:') | ||||||
|         resultstring += translate(byte, 1, 5) |     print binarystring | ||||||
|     print resultstring |     #for byte in binarystring[::8]: | ||||||
|  |     #    resultstring += translate(byte, 1, 5) | ||||||
|  |     #print resultstring | ||||||
|      |      | ||||||
| def vignere(plain, key): | def vignere(plain, key): | ||||||
|     i = 0 |     i = 0 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user