16 lines
398 B
Python
Executable File
16 lines
398 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# converts code signatures found in ida to ones easily usable in c++ code
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) < 2:
|
|
print("Usage: " + sys.argv[0] + " [ida style sig]")
|
|
exit(1)
|
|
|
|
print(
|
|
'"' + ''.join([('\\x' + (byte if byte != '?' else '00')) for byte in sys.argv[1:]]) + '", "' +
|
|
''.join([('x' if byte != '?' else '?') for byte in sys.argv[1:]]) + '"'
|
|
)
|