-
-
Save piotrflorczyk/8b2e858999cd859ccb807ccc476d9b95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def process(matchobj): | |
line = matchobj.group(1) | |
line = line.lower().replace('&h', '0x') | |
return str(eval(line)) # extremly safe :) | |
data = open('analysis.vbs', 'r').read() | |
result = re.sub('\((&h[^\)]+)\)', process, data) | |
open('result.vbs', 'w').write(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment