uroboros-diversification/src/init.py
def bssHandler(self):
        """
        Generate .bss dump and extract global bss symbols
        """
        with open("sections.info") as f:
            bssinfo = next((l for l in f if '.bss' in l), None)
            size = int(bssinfo.split()[3], 16) if bssinfo is not None else 0
        with open("bss.info", 'w') as f:
            f.write(".byte 0x00\n" * size)
        os.system('readelf -sW ' + self.file + ' | grep OBJECT | awk \'/GLOBAL/ {print $2,$8}\' > globalbss.info')
        os.system('readelf -rW ' + self.file + ' | grep _GLOB_DAT | grep -v __gmon_start__ | awk \'{print $1,$5}\' > gotglobals.info')

        Generate .bss dump and extract global bss symbols
        
Generate .bss dump and extract global bss symbols
Generate . bss dump and extract global bss symbols
def bssHandler(self):
        with open("sections.info") as f:
            bssinfo = next((l for l in f if '.bss' in l), None)
            size = int(bssinfo.split()[3], 16) if bssinfo is not None else 0
        with open("bss.info", 'w') as f:
            f.write(".byte 0x00\n" * size)
        os.system('readelf -sW ' + self.file + ' | grep OBJECT | awk \'/GLOBAL/ {print $2,$8}\' > globalbss.info')
        os.system('readelf -rW ' + self.file + ' | grep _GLOB_DAT | grep -v __gmon_start__ | awk \'{print $1,$5}\' > gotglobals.info')
def bssHandler ( self ) : with open ( "sections.info" ) as f : bssinfo = next ( ( l for l in f if '.bss' in l ) , None ) size = int ( bssinfo . split ( ) [ 3 ] , 16 ) if bssinfo is not None else 0 with open ( "bss.info" , 'w' ) as f : f . write ( ".byte 0x00\n" * size ) os . system ( 'readelf -sW ' + self . file + ' | grep OBJECT | awk \'/GLOBAL/ {print $2,$8}\' > globalbss.info' ) os . system ( 'readelf -rW ' + self . file + ' | grep _GLOB_DAT | grep -v __gmon_start__ | awk \'{print $1,$5}\' > gotglobals.info' )
Generate .bss dump and extract global bss symbols
Generate . bss dump and extract global bss symbols
"""
        Generate .bss dump and extract global bss symbols
        """
self