uroboros-diversification/src/postprocess/compile_process.py
def main(filepath='', libs=[], debug=False):
    """
    Compile recovered assembler source and fix some errors
    :param filepath: original executable filepath
    :param libs: list of linked libraries
    :param debug: True to compile with debug symbols
    """
    if filepath:
        # Dump linked shared libraries
        os.system('readelf -d ' + filepath + ' | awk \'/Shared/{match($0, /\[([^\]]*)\]/, arr); print arr[1]}\' | grep -i -v "libc\\." > linkedlibs.info')
        print "     Applying adjustments for compilation"
    if ELF_utils.elf_arm():
        i = 0
        while not modifyARM() and i < 10: i += 1
    reassemble(True, libs, debug)
    errors = parse_error()
    modify(errors)

    Compile recovered assembler source and fix some errors
    :param filepath: original executable filepath
    :param libs: list of linked libraries
    :param debug: True to compile with debug symbols
    
Compile recovered assembler source and fix some errors
Compile recovered assembler source and fix some errors
def main(filepath='', libs=[], debug=False):
    if filepath:
        os.system('readelf -d ' + filepath + ' | awk \'/Shared/{match($0, /\[([^\]]*)\]/, arr); print arr[1]}\' | grep -i -v "libc\\." > linkedlibs.info')
        print "     Applying adjustments for compilation"
    if ELF_utils.elf_arm():
        i = 0
        while not modifyARM() and i < 10: i += 1
    reassemble(True, libs, debug)
    errors = parse_error()
    modify(errors)
def main ( filepath = '' , libs = [ ] , debug = False ) : if filepath : os . system ( 'readelf -d ' + filepath + ' | awk \'/Shared/{match($0, /\[([^\]]*)\]/, arr); print arr[1]}\' | grep -i -v "libc\\." > linkedlibs.info' ) print "     Applying adjustments for compilation" if ELF_utils . elf_arm ( ) : i = 0 while not modifyARM ( ) and i < 10 : i += 1 reassemble ( True , libs , debug ) errors = parse_error ( ) modify ( errors )
Compile recovered assembler source and fix some errors
Compile recovered assembler source and fix some errors
"""
    Compile recovered assembler source and fix some errors
    :param filepath: original executable filepath
    :param libs: list of linked libraries
    :param debug: True to compile with debug symbols
    """ # Dump linked shared libraries
filepath
original executable filepath
original executable filepath
libs
list of linked libraries
list of linked libraries
debug
True to compile with debug symbols
True to compile with debug symbols