2018-05-16 08:24:35 +00:00
|
|
|
anal_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'6502',
|
|
|
|
'8051',
|
|
|
|
'arc',
|
|
|
|
'arm_cs',
|
2018-03-24 12:23:57 +00:00
|
|
|
'arm_gnu',
|
2018-05-16 08:24:35 +00:00
|
|
|
'avr',
|
2018-02-20 08:33:19 +00:00
|
|
|
'bf',
|
2018-05-16 08:24:35 +00:00
|
|
|
'chip8',
|
2018-02-20 08:33:19 +00:00
|
|
|
'cr16',
|
|
|
|
'cris',
|
|
|
|
'dalvik',
|
2018-03-11 08:11:18 +00:00
|
|
|
'ebc',
|
2018-05-16 08:24:35 +00:00
|
|
|
'gb',
|
|
|
|
'h8300',
|
|
|
|
'hexagon',
|
2018-02-20 08:33:19 +00:00
|
|
|
'i4004',
|
|
|
|
'i8080',
|
2018-03-11 08:11:18 +00:00
|
|
|
'java',
|
2018-02-20 08:33:19 +00:00
|
|
|
'm68k_cs',
|
|
|
|
'malbolge',
|
|
|
|
'mips_cs',
|
|
|
|
'mips_gnu',
|
|
|
|
'msp430',
|
|
|
|
'nios2',
|
|
|
|
'null',
|
|
|
|
'pic',
|
|
|
|
'ppc_cs',
|
|
|
|
'ppc_gnu',
|
2018-03-11 08:11:18 +00:00
|
|
|
'propeller',
|
2018-02-20 08:33:19 +00:00
|
|
|
'riscv',
|
2018-05-16 08:24:35 +00:00
|
|
|
'rsp',
|
2018-02-20 08:33:19 +00:00
|
|
|
'sh',
|
|
|
|
'snes',
|
|
|
|
'sparc_cs',
|
|
|
|
'sparc_gnu',
|
|
|
|
'sysz',
|
|
|
|
'tms320',
|
2018-05-16 08:24:35 +00:00
|
|
|
#'tms320c64x',
|
2018-02-20 08:33:19 +00:00
|
|
|
'v810',
|
|
|
|
'v850',
|
2018-05-16 08:24:35 +00:00
|
|
|
'vax',
|
|
|
|
'wasm',
|
2018-02-20 08:33:19 +00:00
|
|
|
'ws',
|
|
|
|
'x86_cs',
|
|
|
|
'xap',
|
|
|
|
'xcore_cs',
|
2018-03-15 13:07:05 +00:00
|
|
|
'xtensa',
|
2018-02-20 08:33:19 +00:00
|
|
|
'z80',
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
2018-02-20 08:33:19 +00:00
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
asm_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'6502',
|
|
|
|
'8051',
|
|
|
|
'arc',
|
|
|
|
'arm_as',
|
|
|
|
'arm_cs',
|
2018-03-24 12:23:57 +00:00
|
|
|
'arm_gnu',
|
2018-02-20 08:33:19 +00:00
|
|
|
'arm_winedbg',
|
2018-05-16 08:24:35 +00:00
|
|
|
'avr',
|
2018-02-20 08:33:19 +00:00
|
|
|
'bf',
|
2018-05-16 08:24:35 +00:00
|
|
|
'chip8',
|
2018-02-20 08:33:19 +00:00
|
|
|
'cr16',
|
|
|
|
'cris_gnu',
|
|
|
|
'dalvik',
|
|
|
|
'dcpu16',
|
2018-03-11 08:11:18 +00:00
|
|
|
'ebc',
|
2018-05-16 08:24:35 +00:00
|
|
|
'gb',
|
2018-02-20 08:33:19 +00:00
|
|
|
'h8300',
|
2018-05-16 08:24:35 +00:00
|
|
|
'hexagon',
|
|
|
|
#'hexagon_gnu',
|
2018-02-20 08:33:19 +00:00
|
|
|
'hppa_gnu',
|
|
|
|
'i4004',
|
|
|
|
'i8080',
|
2018-03-11 08:11:18 +00:00
|
|
|
'java',
|
2018-02-20 08:33:19 +00:00
|
|
|
'lanai_gnu',
|
|
|
|
'lh5801',
|
|
|
|
'lm32',
|
|
|
|
'm68k_cs',
|
|
|
|
'malbolge',
|
|
|
|
'mcs96',
|
|
|
|
'mips_cs',
|
|
|
|
'mips_gnu',
|
|
|
|
'msp430',
|
|
|
|
'nios2',
|
|
|
|
'pic',
|
|
|
|
'ppc_cs',
|
|
|
|
'ppc_gnu',
|
2018-03-11 08:11:18 +00:00
|
|
|
'propeller',
|
2018-02-20 08:33:19 +00:00
|
|
|
'riscv',
|
2018-05-16 08:24:35 +00:00
|
|
|
'rsp',
|
2018-02-20 08:33:19 +00:00
|
|
|
'sh',
|
|
|
|
'snes',
|
|
|
|
'sparc_cs',
|
|
|
|
'sparc_gnu',
|
|
|
|
'spc700',
|
|
|
|
'sysz',
|
|
|
|
'tms320',
|
2018-07-13 16:19:56 +00:00
|
|
|
'tms320c64x',
|
2018-02-20 08:33:19 +00:00
|
|
|
'tricore',
|
|
|
|
'v810',
|
|
|
|
'v850',
|
|
|
|
'vax',
|
|
|
|
'wasm',
|
|
|
|
'ws',
|
|
|
|
'x86_as',
|
|
|
|
'x86_cs',
|
|
|
|
'x86_nasm',
|
|
|
|
'x86_nz',
|
|
|
|
'xap',
|
|
|
|
'xcore_cs',
|
2018-03-15 13:07:05 +00:00
|
|
|
'xtensa',
|
2018-02-20 08:33:19 +00:00
|
|
|
'z80',
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
bin_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'any',
|
|
|
|
'art',
|
2018-07-13 16:19:56 +00:00
|
|
|
'avr',
|
2018-02-20 08:33:19 +00:00
|
|
|
'bf',
|
|
|
|
'bflt',
|
|
|
|
'bios',
|
|
|
|
'bootimg',
|
|
|
|
'cgc',
|
|
|
|
'coff',
|
|
|
|
'dex',
|
|
|
|
'dol',
|
|
|
|
'dyldcache',
|
|
|
|
'elf',
|
|
|
|
'elf64',
|
|
|
|
'fs',
|
2018-03-11 08:11:18 +00:00
|
|
|
'java',
|
2018-02-20 08:33:19 +00:00
|
|
|
'mach0',
|
|
|
|
'mach064',
|
|
|
|
'mbn',
|
|
|
|
'mdmp',
|
|
|
|
'menuet',
|
|
|
|
'mz',
|
|
|
|
'nes',
|
|
|
|
'nin3ds',
|
|
|
|
'ninds',
|
|
|
|
'ningb',
|
|
|
|
'ningba',
|
|
|
|
'nro',
|
2018-05-16 08:24:35 +00:00
|
|
|
'nso',
|
2018-02-20 08:33:19 +00:00
|
|
|
'omf',
|
|
|
|
'p9',
|
|
|
|
'pe',
|
|
|
|
'pe64',
|
|
|
|
'pebble',
|
|
|
|
'psxexe',
|
|
|
|
'sfc',
|
|
|
|
'smd',
|
|
|
|
'sms',
|
|
|
|
'spc700',
|
|
|
|
'te',
|
|
|
|
'vsf',
|
|
|
|
'wasm',
|
|
|
|
'xbe',
|
|
|
|
'z64',
|
2018-05-16 08:24:35 +00:00
|
|
|
'zimg',
|
|
|
|
]
|
|
|
|
|
|
|
|
bin_ldr_plugins = [
|
|
|
|
'ldr_linux',
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
bin_xtr_plugins = [
|
|
|
|
'xtr_dyldcache',
|
|
|
|
'xtr_fatmach0',
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
bp_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'arm',
|
|
|
|
'bf',
|
|
|
|
'mips',
|
|
|
|
'ppc',
|
2018-05-16 08:24:35 +00:00
|
|
|
'sh',
|
2018-02-20 08:33:19 +00:00
|
|
|
'x86'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
core_plugins = [
|
2018-08-01 07:28:03 +00:00
|
|
|
'a2f',
|
2018-05-16 08:24:35 +00:00
|
|
|
'java'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
crypto_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'aes',
|
|
|
|
'aes_cbc',
|
|
|
|
'base64',
|
|
|
|
'base91',
|
|
|
|
'blowfish',
|
|
|
|
'cps2',
|
|
|
|
'des',
|
|
|
|
'punycode',
|
|
|
|
'rc2',
|
|
|
|
'rc4',
|
|
|
|
'rc6',
|
|
|
|
'rol',
|
|
|
|
'ror',
|
|
|
|
'rot',
|
2018-05-16 08:24:35 +00:00
|
|
|
'serpent',
|
2018-02-20 08:33:19 +00:00
|
|
|
'xor',
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
debug_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'bf',
|
2018-05-16 08:24:35 +00:00
|
|
|
'bochs',
|
2018-02-20 08:33:19 +00:00
|
|
|
'esil',
|
2018-05-16 08:24:35 +00:00
|
|
|
'gdb',
|
2018-02-20 08:33:19 +00:00
|
|
|
'io',
|
|
|
|
'native',
|
2018-05-16 08:24:35 +00:00
|
|
|
'null',
|
|
|
|
'qnx',
|
2018-02-20 08:33:19 +00:00
|
|
|
'rap',
|
|
|
|
'windbg'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
egg_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'exec',
|
2018-05-16 08:24:35 +00:00
|
|
|
#'shya',
|
2018-02-20 08:33:19 +00:00
|
|
|
'xor'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
fs_plugins = [
|
|
|
|
'cpio',
|
2018-02-20 08:33:19 +00:00
|
|
|
'ext2',
|
|
|
|
'fat',
|
|
|
|
'fb',
|
|
|
|
'hfs',
|
|
|
|
'hfsplus',
|
2018-05-16 08:24:35 +00:00
|
|
|
'io',
|
2018-02-20 08:33:19 +00:00
|
|
|
'iso9660',
|
|
|
|
'jfs',
|
|
|
|
'minix',
|
|
|
|
'ntfs',
|
|
|
|
'posix',
|
2018-05-16 08:24:35 +00:00
|
|
|
'r2',
|
2018-02-20 08:33:19 +00:00
|
|
|
'reiserfs',
|
|
|
|
'sfs',
|
|
|
|
'tar',
|
|
|
|
'udf',
|
|
|
|
'ufs',
|
2018-05-16 08:24:35 +00:00
|
|
|
'ufs2',
|
2018-02-20 08:33:19 +00:00
|
|
|
'xfs'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
io_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'ar',
|
|
|
|
'bfdbg',
|
2018-05-16 08:24:35 +00:00
|
|
|
'bochs',
|
2018-02-20 08:33:19 +00:00
|
|
|
'debug',
|
|
|
|
'default',
|
|
|
|
'gdb',
|
2018-05-16 08:24:35 +00:00
|
|
|
'gprobe',
|
2018-02-20 08:33:19 +00:00
|
|
|
'gzip',
|
|
|
|
'http',
|
|
|
|
'ihex',
|
|
|
|
'mach',
|
|
|
|
'malloc',
|
|
|
|
'mmap',
|
|
|
|
'null',
|
|
|
|
'procpid',
|
|
|
|
'ptrace',
|
2018-05-16 08:24:35 +00:00
|
|
|
'qnx',
|
2018-02-20 08:33:19 +00:00
|
|
|
'r2k',
|
|
|
|
'r2pipe',
|
|
|
|
'r2web',
|
|
|
|
'rap',
|
2018-05-16 08:24:35 +00:00
|
|
|
'rbuf',
|
2018-02-20 08:33:19 +00:00
|
|
|
'self',
|
|
|
|
'shm',
|
|
|
|
'sparse',
|
|
|
|
'tcp',
|
|
|
|
'windbg',
|
2018-05-16 08:24:35 +00:00
|
|
|
'winedbg',
|
|
|
|
'zip'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
2018-02-20 08:33:19 +00:00
|
|
|
|
2018-03-23 06:47:46 +00:00
|
|
|
if host_machine.system() == 'windows'
|
2018-05-16 08:24:35 +00:00
|
|
|
io_plugins += [
|
2018-02-20 08:33:19 +00:00
|
|
|
'w32dbg',
|
|
|
|
'w32',
|
|
|
|
]
|
2017-05-30 16:38:19 +00:00
|
|
|
endif
|
2017-05-26 00:43:26 +00:00
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
lang_plugins = [
|
|
|
|
'c',
|
|
|
|
'cpipe',
|
|
|
|
'lib',
|
|
|
|
'pipe',
|
|
|
|
'rust',
|
2018-02-20 08:33:19 +00:00
|
|
|
'vala'
|
2017-05-26 00:43:26 +00:00
|
|
|
]
|
2018-02-20 08:33:19 +00:00
|
|
|
|
2018-05-16 08:24:35 +00:00
|
|
|
parse_plugins = [
|
2018-02-20 08:33:19 +00:00
|
|
|
'6502_pseudo',
|
|
|
|
'arm_pseudo',
|
|
|
|
'att2intel',
|
2018-05-16 08:24:35 +00:00
|
|
|
'avr_pseudo',
|
2018-02-20 08:33:19 +00:00
|
|
|
'dalvik_pseudo',
|
|
|
|
'm68k_pseudo',
|
|
|
|
'mips_pseudo',
|
|
|
|
'mreplace',
|
|
|
|
'ppc_pseudo',
|
|
|
|
'sh_pseudo',
|
|
|
|
'x86_pseudo',
|
2018-05-16 08:24:35 +00:00
|
|
|
'z80_pseudo'
|
2018-03-14 22:43:53 +00:00
|
|
|
]
|
2018-03-23 06:47:46 +00:00
|
|
|
|
|
|
|
include_files = run_command(glob_cmd + ['include/*.h']).stdout().strip().split(';')
|
|
|
|
install_headers(include_files, subdir: 'libr')
|
|
|
|
|
|
|
|
r_util_files = run_command(glob_cmd + ['include/r_util/*.h']).stdout().strip().split(';')
|
|
|
|
install_headers(r_util_files, subdir: 'libr/r_util')
|
|
|
|
|
|
|
|
sdb_files = run_command(glob_cmd + ['include/sdb/*.h']).stdout().strip().split(';')
|
|
|
|
install_headers(sdb_files, subdir: 'libr/sdb')
|
|
|
|
|
|
|
|
sflib_common_files = [
|
|
|
|
'include/sflib/common/sftypes.h',
|
|
|
|
'include/sflib/common/sfsocketcall.h'
|
|
|
|
]
|
|
|
|
|
|
|
|
sflib_arch = [
|
|
|
|
'linux-x86-64',
|
|
|
|
'linux-x86-32',
|
|
|
|
'linux-arm-64',
|
|
|
|
'linux-arm-32',
|
|
|
|
'darwin-x86-64',
|
|
|
|
'darwin-x86-32',
|
|
|
|
'darwin-arm-64'
|
|
|
|
]
|
|
|
|
|
|
|
|
sflib_arch_files = [
|
|
|
|
'sflib.h',
|
|
|
|
'sfsyscall.h',
|
|
|
|
'sfsysnr.h'
|
|
|
|
]
|
|
|
|
|
|
|
|
install_headers(sflib_common_files, subdir: 'libr/sflib/common')
|
|
|
|
foreach arch : sflib_arch
|
|
|
|
foreach file : sflib_arch_files
|
|
|
|
install_headers(join_paths('include/sflib', arch, file), subdir: join_paths('libr/sflib', arch))
|
|
|
|
endforeach
|
|
|
|
endforeach
|
2018-07-17 19:12:17 +00:00
|
|
|
|
|
|
|
sdb_readlink_script = '''#script
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
infile = sys.argv[1]
|
|
|
|
if os.name == 'nt' and os.path.getsize(infile) <= 64:
|
|
|
|
with open(infile) as sdb_txt:
|
|
|
|
fname = sdb_txt.readline()
|
|
|
|
if fname.endswith('.sdb.txt'):
|
|
|
|
infile = fname
|
|
|
|
else:
|
|
|
|
infile = os.path.basename(infile)
|
|
|
|
print(infile)
|
|
|
|
'''
|
|
|
|
|
|
|
|
sdb_readlink_cmd = [
|
|
|
|
py3_exe,
|
|
|
|
'-c',
|
|
|
|
sdb_readlink_script
|
|
|
|
]
|