debian/0000775000000000000000000000000012321544454007174 5ustar debian/rules0000775000000000000000000000203112321544242010243 0ustar #!/usr/bin/make -f DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEBUG_SUPPORT=0 EXTRA_FLAGS=--with-sysmagic ifeq (arm,$(DEB_HOST_ARCH_CPU)) DEBUG_SUPPORT=1 endif ifeq (amd64,$(DEB_HOST_ARCH_CPU)) DEBUG_SUPPORT=1 endif ifeq (i386,$(DEB_HOST_ARCH_CPU)) DEBUG_SUPPORT=1 endif ifeq (0,$(DEBUG_SUPPORT)) EXTRA_FLAGS+=--disable-debugger endif %: dh $@ --with autotools_dev override_dh_auto_configure: ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) ${EXTRA_FLAGS} override_dh_makeshlibs: dh_makeshlibs --exclude=/usr/lib/$(DEB_HOST_MULTIARCH)/radare2/ override_dh_strip: dh_strip -pradare2 #--dbg-package=radare2-dbg dh_strip -pradare2-plugins dh_strip -plibradare2-0.9.6 --dbg-package=libradare2-0.9.6-dbg override_dh_auto_install: dh_auto_install # remove "last" symlink rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/radare2/last override_dh_install: dh_install --fail-missing override_dh_auto_clean: touch config-user.mk libr/config.mk -dh_auto_clean rm -f config-user.mk libr/config.mk debian/libradare2-0.9.6.lintian-overrides0000664000000000000000000000040412321544242015224 0ustar # One package is enough for all those libs libradare2-0.9.6: package-name-doesnt-match-sonames # This is really com+ment but it's too hard for lintian to notice. libradare2-0.9.6: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libr_core.so.0.9.6 ment meant debian/watch0000664000000000000000000000007312321544242010220 0ustar version=3 http://radare.org/get/radare2-([\d\.]+)\.tar\.xz debian/libradare2-common.install0000664000000000000000000000002312321544242014047 0ustar /usr/share/radare2 debian/changelog0000664000000000000000000001777012321544425011060 0ustar radare2 (0.9.6-3.1ubuntu1) trusty; urgency=medium * Merge from Debian unstable. Remaining changes: - Use autotools-dev to update config.{sub,guess} for new arches. -- Logan Rosen Thu, 10 Apr 2014 12:38:27 -0400 radare2 (0.9.6-3.1) unstable; urgency=medium * debian/patches/12_fix_strcasestr_declaration: Add #define _GNU_SOURCE as well, to get the definition of strcasestr (closes: #735921). -- Steve McIntyre <93sam@debian.org> Sun, 23 Mar 2014 14:38:44 +0000 radare2 (0.9.6-3ubuntu1) trusty; urgency=low * Use autotools-dev helper for newer arches. * Define missing macro so the strcasestr fix is actually used. -- Daniel T Chen Mon, 31 Mar 2014 15:26:56 -0400 radare2 (0.9.6-3) unstable; urgency=medium * debian/patches/12_fix_strcasestr_declaration: Fixed a missing include, thanks to Matthias Klose for pointing it (closes: #735921). -- David Martínez Moreno Tue, 28 Jan 2014 10:29:31 -0800 radare2 (0.9.6-2) unstable; urgency=low * debian/control: Switched Sebastian and myself as Maintainer/Uploader. * debian/patches/08_proper_tcc_build: Updated to fix a wrong ifeq in the Makefile. * debian/watch: Updated as it seems that pancake is releasing .tar.xz now. * debian/patches/01_fix-kfreebsd-compilation: Completely revamped from upstream commit 1941efc, to (hopefully) fix builds on kFreeBSD. * Added a lintian override for spelling-error-in-binary in libradare2-0.9.6, as it's invalid. -- David Martínez Moreno Fri, 17 Jan 2014 07:48:47 -0800 radare2 (0.9.6-1) unstable; urgency=low * New Year's release. Just in time! * New upstream release. Main changes are: - r2 now supports UTF-8, RGB and TrueColor ansi codes. - More platforms supported: ARM aarch64, TI c55x+, 8051, Javascript (emscripten), ARCcompact. - ASLR for PIE binaries is now supported by using the -B flag. - MACH0 XNU kernels are now properly loaded. - Added support for TE binaries. - Identify some PC BIOS and UEFI ROMs. - Java Class file parser has been rewritten to support Java7. - Python ctypes, D and Java JNI bindings. - An embedded webserver have been included, and you can invoke it using the `=h' or '=H' commands. - Improved JSON output for many commands. Just append 'j' to the command and it will use that format. - First release with an extensive test suite. - Lots of bugs has been fixed, overflows, memory leaks, and many handcrafted binaries can now be loaded without segfaults, crashes or lack of info (closes: #716192). * debian/patches: - 01_fix-kfreebsd-compilation: Refreshed. - 02_link-needed-libmagic: Fixed. - 03_unsafe_snprintf: New, partly taken from upstream commit 1289476 to fix an incomplete snprintf that was breaking the hardened build. - 04_remove_non-installable_library: New, to fix an extraneous t.0.9.6 that was appearing in the builds. - 05_typos: Added, some typos and wrong man macros. - 06_no_forced_rpath: Added, disable rpath when --with-rpath is not present. - 07_propagate_ldflags: New, propagate LDFLAGS from environment into compilation by making assignment additive, fixing hardened builds. - 08_proper_tcc_build: Add .so as the default suffix of libr_tcc. - 09_fix_internal_plugins: New, fixed a bunch of problems with the internal bindings: made the lua check support Debian's lua, fixed library prefix, and removed ncurses bogus linking. - 10_fix_rafind2_segfault: New, backported from e0f4364 to fix a segfault reported by the Mayhem team (closes: #716503). - 11_block_libtcc_install: New, backported from upstream 1531e96 to stop installing libtcc files. - 101_split_plugins_installation: New, Debian-only, to ease packaging of the plugins. Otherwise they ended up in libradare2. * debian/control: - Build-Depends on valabind (>> 0.7.4) and swig to generate internal plugins, plus python-dev and liblua5.2-dev for the corresponding extensions, and dh-exec to help with the packaging of radare2-plugins. - Updated descriptions. - Bumped Standards-Version to 3.9.5 (no changes). - Created another package (radare2-plugins) with the Python and Lua extensions (plus the dependency on Vala). - Make radare-plugins depend on valac; otherwise the vala extension is not functional. * debian/rules: - Fix a broken flag for configure (--without-debugger -> --disable-debugger) that was causing the debugger to be enabled back in several architectures where it was previously disabled, and thus breaking the builds (closes: #732853). - Force --fail-missing on dh_install to make sure that we don't miss new files in subsequent releases. * Removed the libradare2's symbols file because radare2 doesn't really try to have any sort of backwards compatibility. It's futile to dump it from scratch in every release. -- David Martínez Moreno Tue, 31 Dec 2013 23:57:03 -0800 radare2 (0.9.4-2) unstable; urgency=low [ Sebastian Reichel ] * r_debug_desc_plugin_native is not available on some architectures, so make tag it accordingly in *.symbols file. * Add patch to fix compilation under GNU/kFreeBSD. -- David Martínez Moreno Tue, 10 Dec 2013 11:17:44 -0800 radare2 (0.9.4-1) unstable; urgency=low * New upstream release * Update debian/copyright * Bump Debian Standards Version 3.9.2 -> 3.9.4 * Create new -common package for arch independent files -- Sebastian Reichel Sun, 22 Sep 2013 19:50:24 +0200 radare2 (0.9-3) unstable; urgency=low * Add Patch from Julian Taylor to fix FTBFS when building using ld --as-needed (Closes: #653873) -- Sebastian Reichel Sat, 31 Dec 2011 20:43:17 +0100 radare2 (0.9-2) unstable; urgency=low * readd fix in symbols file: r_debug_desc_plugin_native is only built for x86, x86-64 and arm -- Sebastian Reichel Tue, 06 Dec 2011 14:29:09 +0100 radare2 (0.9-1) unstable; urgency=low * New upstream release - automatic hurd detection * radare2 now recommends libradare2-dev - header files are used by ragg2-cc -- Sebastian Reichel Tue, 06 Dec 2011 01:36:55 +0100 radare2 (0.8.8-2) unstable; urgency=low * fix symbols file: r_debug_desc_plugin_native is only built for x86, x86-64 and arm * add patch to fix build on kFreeBSD * add upstream patch to fix a bug when redefining io sections -- Sebastian Reichel Fri, 04 Nov 2011 22:53:13 +0100 radare2 (0.8.8-1) unstable; urgency=low * new upstream release - fixed lintian warnings * update copyright information -- Sebastian Reichel Tue, 01 Nov 2011 13:03:36 +0100 radare2 (0.8.1-1) unstable; urgency=low * new upstream release * remove all patches (included upstream) * switch from cdbs to debhelper * update Debian Standards Version to 3.9.2 * make libradare2 multi-arch capable -- Sebastian Reichel Sun, 24 Jul 2011 15:06:17 +0200 radare2 (0.7-3) unstable; urgency=low * update the fcntl patch * new patch: honor --without-debugger to fix build on unsupported architectures * new patch: add kfreebsd support -- Sebastian Reichel Wed, 13 Apr 2011 11:04:00 +0200 radare2 (0.7-2) unstable; urgency=low * disable debugger on all arches except i386, amd64, arm to make them building * new patch: drx_add / drx_del should not be exported * new patch: add fcntl.h to fix build error on kfreebsd / hurd * new patch: fix cflags to build some failing plugins * Closes: #621412 -- Sebastian Reichel Mon, 04 Apr 2011 15:27:16 +0200 radare2 (0.7-1) unstable; urgency=low * New upstream release -- Sebastian Reichel Wed, 09 Mar 2011 00:54:02 +0100 radare2 (0.6-1) unstable; urgency=low * Initial Upload to Debian (Closes: #573345) -- Sebastian Reichel Mon, 07 Feb 2011 13:00:47 +0100 debian/compat0000664000000000000000000000000212321544242010365 0ustar 9 debian/radare2.install0000664000000000000000000000005112321544242012073 0ustar usr/bin usr/share/man/man1 usr/share/doc debian/libradare2-dev.install0000664000000000000000000000005712321544242013344 0ustar usr/include usr/lib/*/pkgconfig usr/lib/*/*.so debian/libradare2-0.9.6.install0000664000000000000000000000005112321544242013232 0ustar usr/lib/*/*.so.0.* usr/lib/*/radare2/0.* debian/copyright0000664000000000000000000004366412321544242011137 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: http://radare.org/ Files: * Copyright: 2007-2009, th0rpe 2007-2012, pancake 2008-2012, nibble 2009-2012, Anton Kochkov License: LGPL-3 On Debian systems, the complete text of the LGPL-3 can be found in /usr/share/common-licenses/LGPL-3. Files: r2rc/r2rc.c libr/asm/arch/include/opintl.h libr/asm/arch/include/elf-bfd.h libr/asm/arch/include/sysdep.h libr/asm/p/asm_* libr/bin/p/bin_* libr/cmd/p/cmd_dummy.c libr/asm/arch/sparc/gnu/sparc-dis.c libr/asm/arch/sparc/gnu/sparc-opc.c libr/asm/arch/mips/gnu/mips16-opc.c libr/asm/arch/mips/gnu/mips-dis.c libr/asm/arch/mips/gnu/mips-opc.c libr/asm/arch/ppc/gnu/ppc-dis.c libr/asm/arch/ppc/gnu/ppc-opc.c libr/asm/arch/dalvik/opcode.h libr/asm/arch/arc/gnu/arc-dis.c libr/asm/arch/arc/gnu/arc-dis.h libr/asm/arch/arc/gnu/arc-ext.c libr/asm/arch/arc/gnu/arc-ext.h libr/asm/arch/arc/gnu/arc-opc.c libr/asm/arch/arc/gnu/arc.h libr/asm/p/asm_msil.c libr/syscall/fastcall.h Copyright: 2009-2011, pancake 2009-2010, nibble 2011, capi_x 1989-2008, Free Software Foundation, Inc. License: GPL-3+ On Debian systems, the complete text of the GPL-3 can be found in /usr/share/common-licenses/GPL-3. Files: libr/asm/arch/dcpu16/asm.c Copyright: 2012, Karl Hobley License: Expat Files: libr/fs/p/grub/fs/* libr/fs/p/grub/kern/* libr/fs/p/grub/partmap/* Copyright: 1999-2010, Free Software Foundation, Inc. 2010, Bean Lee License: GPL-3+ On Debian systems, the complete text of the GPL-3 can be found in /usr/share/common-licenses/GPL-3. Files: libr/util/base85.c Copyright: 2011, Remy Oukaour License: Expat Files: rsc2/rsc2.c libr/asm/arch/include/ansidecl.h libr/asm/arch/include/dis-asm.h libr/asm/arch/include/symcat.h libr/asm/arch/include/bfdlink.h libr/asm/arch/include/opcode/sparc.h libr/asm/arch/include/elf/common.h libr/asm/arch/include/elf/internal.h libr/asm/arch/include/elf/mips.h libr/asm/arch/include/elf/reloc-macros.h libr/asm/arch/include/elf/external.h libr/asm/arch/include/libiberty.h libr/meta/tmp/data.c libr/asm/arch/include/bfd.h libr/asm/arch/x86/ollyasm/disasm.c libr/asm/arch/x86/ollyasm/assembl.c libr/asm/arch/x86/ollyasm/disasm.h libr/asm/arch/x86/ollyasm/asmserv.c libr/asm/arch/arm/gnu/* libr/asm/arch/psosvm/vmas/vmas.c libr/asm/arch/java/javasm/javasm.c libr/bin/format/java/java.c libr/flags/old_flags.c libr/search/old_xrefs.c libr/hash/md4.c libr/hash/crc32.c libr/hash/hamdist.c libr/bin/mangling/cxx/ansidecl.h libr/bin/mangling/cxx/cp-demangle.c libr/bin/mangling/cxx/cp-demangle.h libr/bin/mangling/cxx/demangle.h libr/bin/mangling/cxx/liberty.h libr/asm/arch/sh/sh-dis.c libr/asm/arch/sh/sh-opc.h libr/asm/arch/arm/aarch64/* Copyright: 2006-2010, pancake 2009, skurz0 1989-2010, Free Software Foundation, Inc. 2001, Oleh Yuschuk 1997-1998, Andrew Tridgell License: GPL-2+ On Debian systems, the complete text of the GPL-2 can be found in /usr/share/common-licenses/GPL-2. Files: shlr/udis86/* Copyright: 2002-2006, Vivek Mohan License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/include/getopt.c Copyright: 1987-1994, The Regents of the University of California License: BSD-4-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the Christian E. Hopps. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/asm/arch/m68k/m68k_disasm/m68k_disasm.c libr/asm/arch/m68k/m68k_disasm/m68k_disasm.h Copyright: 1999-2002, Frank Wille 1994, Christian E. Hopps License: BSD-4-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the Christian E. Hopps. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/asm/arch/z80/z80asm.c libr/asm/arch/z80/z80asm.h libr/asm/arch/z80/expressions.c Copyright: 2002-2009, Bas Wijnen 2005, Jan Wilmans License: GPL-3+ On Debian systems, the complete text of the GPL-3 can be found in /usr/share/common-licenses/GPL-3. Files: libr/asm/arch/z80/disasm.c Copyright: 1992, Markus Fritze License: Freeware This Product is Freeware, it may not be used as basis for commercial software! I take no liability for damages, which arise because of direct, or indirect use of this software. Files: libr/magic/* Copyright: 1986-1995, Ian F. Darwin 2003, Christos Zoulas License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/asm/arch/include/opcode/mips.h libr/asm/arch/include/opcode/ppc.h Copyright: 1993-2008, Free Software Foundation, Inc. License: GPL-1+ The complete text of the GPL-1 can be found in /usr/share/common-licenses/GPL-1. Files: libr/bin/format/elf/elf_specs.h Copyright: 1995-2007, Free Software Foundation, Inc. License: LGPL-2.1+ On Debian systems, the complete text of the LGPL-2.1 can be found in /usr/share/common-licenses/LGPL-2.1. Files: libr/hash/sha2.h Copyright: 2000-2001, Aaron D. Gifford License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/util/regex/* Copyright: 1992-1994, Henry Spencer 1992-1994, University of California 1997, Phillip F Knaack License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: libr/hash/md5c.c libr/hash/md5.h Copyright: 1991-1992, RSA Data Security, Inc. License: custom License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. Files: libr/hash/sha1.c libr/hash/sha1.h Copyright: 1995-1999, Cryptography Research, Inc. License: GPL-2+ or MPL-1.1 On Debian systems, the complete text of the GPL-2 can be found in /usr/share/common-licenses/GPL-2. Files: libr/asm/arch/msil/demsil.c libr/asm/arch/msil/demsil.h Copyright: 2008, Daniel Pistelli License: public-domain DisasMSIL is a free/open disasm engine for the Microsoft Intermediate Language (MSIL). You can use it any context you wish. There are no license restrictions. The only thing I ask you to do is to send me your bug fixes (if any). Files: libr/anal/cparse/*.c libr/anal/cparse/*.h Copyright: 2001, Brian Raiter License: GPL-2+ On Debian systems, the complete text of the GPL-2 can be found in /usr/share/common-licenses/GPL-2. Files: libr/util/ht.c libr/util/ht64.c libr/db/sdb/src/ht.c Copyright: 2009, Intel Corporation 1988-2004, Keith Packard 1988-2004, Bart Massey License: MIT Permission is hereby granted, free of charge, to any person obtaining a this software and associated documentation files (the "Software"), in the Software without restriction, including without limitation to use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, and to permit persons to whom the furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next shall be included in all copies or substantial portions of the . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS SOFTWARE. . Except as contained in this notice, the names of the authors institutions shall not be used in advertising or promote the sale, use or other dealings in this prior written authorization from the Files: debian/* Copyright: 2010-2011, Sebastian Reichel License: ISC Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/source/0000775000000000000000000000000012321544447010476 5ustar debian/source/format0000664000000000000000000000001412321544242011675 0ustar 3.0 (quilt) debian/radare2-plugins.install0000775000000000000000000000014612321544242013562 0ustar #!/usr/bin/dh-exec usr/lib/${DEB_HOST_MULTIARCH}/r2-plugins/* /usr/lib/${DEB_HOST_MULTIARCH}/radare2/ debian/control0000664000000000000000000001367512321544242010606 0ustar Source: radare2 Section: devel Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: David Martínez Moreno Uploaders: Sebastian Reichel Build-Depends: debhelper (>= 9), autotools-dev, dh-exec (>= 0.3), quilt, flex, gobject-introspection, libgmp3-dev, libmagic-dev, swig, valabind (>> 0.7.4), valac, python-dev, liblua5.2-dev Standards-Version: 3.9.5 Homepage: http://www.radare.org Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/radare2.git Vcs-Git: git://anonscm.debian.org/collab-maint/radare2.git Package: radare2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: libradare2-dev Description: free and advanced command line hexadecimal editor The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. Package: radare2-plugins Section: libs Architecture: any Depends: valac, ${misc:Depends}, ${shlibs:Depends} Description: plugins for radare2 The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. . This package provides the necessary libraries to run Python, Lua and Vala from within radare2. Package: libradare2-0.9.6 Section: libs Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, libradare2-common (>= ${source:Version}) Multi-Arch: same Description: libraries from the radare2 suite The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. . This package provides the libraries from radare2. Package: libradare2-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libradare2-0.9.6 (= ${binary:Version}), libmagic-dev Description: devel files from the radare2 suite The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. . This package provides the devel files from radare2. Package: libradare2-0.9.6-dbg Multi-Arch: same Section: debug Architecture: any Depends: ${misc:Depends}, libradare2-0.9.6 (= ${binary:Version}) Description: debug symbols for libraries from radare suite The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. . This package provides the debug symbols for the libraries of radare2. Package: libradare2-common Multi-Arch: foreign Architecture: all Depends: ${misc:Depends} Description: arch independent files from the radare2 suite The project aims to create a complete, portable, multi-architecture, unix-like toolchain for reverse engineering. . It is composed by an hexadecimal editor (radare) with a wrapped IO layer supporting multiple backends for local/remote files, debugger (OS X, BSD, Linux, W32), stream analyzer, assembler/disassembler (rasm) for x86, ARM, PPC, m68k, Java, MSIL, SPARC, code analysis modules and scripting facilities. A bindiffer named radiff, base converter (rax), shellcode development helper (rasc), a binary information extractor supporting PE, mach0, ELF, class, etc. named rabin, and a block-based hash utility called rahash. . This package provides the arch independent files from radare2. debian/docs0000664000000000000000000000002212321544242010034 0ustar README.md TODO.md debian/patches/0000775000000000000000000000000012321544447010625 5ustar debian/patches/01_fix-kfreebsd-compilation.patch0000664000000000000000000000431712321544242017031 0ustar Subject: Fix compilation under kFreeBSD. strlcat and strlcpy appear in the sources and break. Instead, backport commit 1941efc1 that removes those two functions.. Author: pancake Origin: https://github.com/radare/radare2/commit/1941efc16094e35032d04bfac385e00f36cafec8.patch Last-Update: 2014-01-21 --- a/libr/debug/p/debug_native.c +++ b/libr/debug/p/debug_native.c @@ -425,7 +425,7 @@ return 1; #else //ut64 rip = r_debug_reg_get (dbg, "pc"); - ptrace (PT_CONTINUE, pid, (void*)(size_t)1, data); + ptrace (PT_CONTINUE, pid, (void*)(size_t)1, (int)(size_t)data); return 0; #endif #elif __BSD__ @@ -1283,6 +1283,7 @@ start_args = iter_args; //reset start position to beginning of cmdline foo = 1; *psname = 0; + psnamelen = 0; while (iter_args < end_args && nargs > 0) { if (*iter_args++ == '\0') { int alen = strlen (curr_arg); @@ -2302,33 +2303,28 @@ struct sockaddr_in *sin; struct sockaddr_un *sun; + if (buflen>0) switch (ss->ss_family) { case AF_LOCAL: sun = (struct sockaddr_un *)ss; - if (strlen (sun->sun_path) == 0) - strlcpy (buffer, "-", buflen); - else - strlcpy (buffer, sun->sun_path, buflen); + strncpy (buffer, (sun && *sun->sun_path)? + sun->sun_path: "-", buflen-1); break; - case AF_INET: sin = (struct sockaddr_in *)ss; - snprintf(buffer, buflen, "%s:%d", inet_ntoa(sin->sin_addr), - ntohs(sin->sin_port)); + snprintf (buffer, buflen, "%s:%d", inet_ntoa (sin->sin_addr), + ntohs (sin->sin_port)); break; - case AF_INET6: sin6 = (struct sockaddr_in6 *)ss; if (inet_ntop (AF_INET6, &sin6->sin6_addr, buffer2, sizeof (buffer2)) != NULL) snprintf (buffer, buflen, "%s.%d", buffer2, ntohs (sin6->sin6_port)); - else - strlcpy (buffer, "-", sizeof(buffer)); + else strcpy (buffer, "-"); break; - default: - strlcpy (buffer, "", buflen); + *buffer = 0; break; } } @@ -2384,7 +2380,7 @@ addr_to_string (&kve->kf_sa_peer, path, sizeof (path)); } else { addr_to_string (&kve->kf_sa_local, path, sizeof (path)); - strlcat (path, " ", sizeof (path)); + strcat (path, " "); addr_to_string (&kve->kf_sa_peer, path + strlen (path), sizeof (path)); } debian/patches/11_block_libtcc_install.patch0000664000000000000000000000153712321544242016306 0ustar Description: Stop installing libtcc files. As per pancake, we shouldn't install any of the libtcc files in the final package. Based on commit 1531e96. Author: David Martínez Moreno Origin: upstream, https://github.com/radare/radare2/commit/1531e965b3394056c0b68da85cb717f06139bb0a Forwarded: not-needed Last-Update: 2013-12-30 --- radare2-0.9.6.orig/shlr/Makefile +++ radare2-0.9.6/shlr/Makefile @@ -84,13 +84,13 @@ tcc-sync sync-tcc: D=${DESTDIR}/${PREFIX} install: - mkdir -p ${D}/lib - cp -f tcc/libr_tcc* ${D}/lib + #mkdir -p ${D}/lib + #cp -f tcc/libr_tcc* ${D}/lib install-symlink symstall: - mkdir -p ${D}/lib - cd tcc ; for a in libr_tcc* ; do \ + #mkdir -p ${D}/lib + #cd tcc ; for a in libr_tcc* ; do \ ln -fs `pwd`/$$a ${D}/lib/$$a ; done uninstall deinstall: - rm -f ${D}/lib/libr_tcc* + #rm -f ${D}/lib/libr_tcc* debian/patches/10_fix_rafind2_segfault.patch0000664000000000000000000000132612321544242016226 0ustar Description: Fix a segfault in rafind2. The Mayhem team from CMU found with a fuzzying attack that a short hex:// URL can make it to segfault. Author: pancake Origin: upstream, https://github.com/radare/radare2/commit/e0f436415f4a139da251f72e960fd12d1e1d738e Reviewed-by: David Martínez Moreno Last-Update: 2013-12-28 --- a/libr/io/p/io_malloc.c +++ b/libr/io/p/io_malloc.c @@ -80,6 +80,10 @@ mal->buf = malloc (mal->size); memset (mal->buf, 0, mal->size); mal->size = r_hex_str2bin (pathname+6, mal->buf); + if ((int)mal->size<1) { + free (mal->buf); + mal->buf = NULL; + } } else { mal->size = r_num_math (NULL, pathname+9); if ((mal->size)>0) { debian/patches/06_no_forced_rpath.patch0000664000000000000000000000456712321544242015314 0ustar Description: Honor --with-rpath, and disable it when not specified. Lintian noticed that rpath was being added to every binary object. The problem is that when the --with-rpath option is not specified to configure, disabling of rpath is not really enforced. I altered the logic to honor any previous options, and then decide whether to use rpath or not. This configure has been generated with acr, so it's very possible that this change will need to go there. Author: David Martínez Moreno Forwarded: no Last-Update: 2013-12-18 --- radare2-0.9.6.orig/configure +++ radare2-0.9.6/configure @@ -201,12 +201,6 @@ flag=`echo $1| cut -d = -f 1` value=`echo $1| awk 'BEGIN{FS="=";}{print $2}'` flag2=`echo $flag|cut -f2- -d -| sed -e 's,-,_,g' -e 's,^_,,g'|tr '[a-z]' '[A-Z]'` -if [ "${TARGET_OS}" = "darwin" ]; then - LIBPATH=-Wl,-install_name, -else - LIBPATH=-Wl,-R -fi - case $flag in "-h"|"--help"|"--hel"|"--h"|"--he"|"-help") show_usage ; ;; @@ -253,7 +247,7 @@ echo "FLAGS: --enable-cparse --disab "--localstatedir") LOCALSTATEDIR="$value"; ;; "--libdir") - LIBDIR="$value"; LDFLAGS="${LDFLAGS} -L$value ${LIBPATH}$value"; ;; + LIBDIR="$value"; ;; "--includedir") INCLUDEDIR="$value"; CFLAGS="${CFLAGS} -I$value"; ;; "--infodir") @@ -291,6 +285,20 @@ parse_options $1 shift done +if [ "${TARGET_OS}" = "darwin" ]; then + LIBPATH=-Wl,-install_name, +elif [ "${USE_RPATH}" -eq 1 ]; then + LIBPATH=-Wl,-R +else + LIBPATH='' +fi + +if [ "${USE_RPATH}" -eq 0 ]; then + LDFLAGS="${LDFLAGS} -L${LIBDIR}" +else + LDFLAGS="${LDFLAGS} -L${LIBDIR} ${LIBPATH}$value" +fi + ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C CPARSE DEBUGGER HAVE_LIB_DL DL_LIBS LIL_ENDIAN BIG_ENDIAN BYTEORDER HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC HAVE_LIB_EWF EWF_CFLAGS EWF_LDFLAGS HAVE_PKGCFG_LIBEWF HAVE_EWF HAVE_LIB_GMP HAVE_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL USE_RPATH HAVE_LILEND HAVE_BIGEND HAVE_LIB_LUA5_1 USERCC USEROSTYPE WITHPIC WITHNONPIC LIBVERSION" create_environ debian/patches/02_link-needed-libmagic.patch0000664000000000000000000000102712321544242016064 0ustar Description: link with needed libmagic required when building with ld --as-needed Author: Julian Taylor Reviewed-by: Sebastian Reichel Debian-Bug: http://bugs.debian.org/653873 Forwarded: yes Last-Update: 2013-12-29 --- a/libr/core/Makefile +++ b/libr/core/Makefile @@ -10,7 +10,7 @@ OBJS+=anal.o project.o gdiff.o asm.o rtr.o vmenus.o disasm.o patch.o bin.o log.o include ../db/build.mk -LDFLAGS+=${DL_LIBS} +LDFLAGS+=${DL_LIBS} -lmagic ifeq ($(shell uname),OpenBSD) LDFLAGS+=-lpthread debian/patches/series0000664000000000000000000000057312321544242012040 0ustar 01_fix-kfreebsd-compilation.patch 02_link-needed-libmagic.patch 03_unsafe_snprintf.patch 04_remove_non-installable_library.patch 05_typos.patch 06_no_forced_rpath.patch 07_propagate_ldflags.patch 08_proper_tcc_build.patch 09_fix_internal_plugins.patch 10_fix_rafind2_segfault.patch 11_block_libtcc_install.patch 101_split_plugins_installation 12_fix_strcasestr_declaration.patch debian/patches/05_typos.patch0000664000000000000000000001470512321544242013330 0ustar Description: Fix a round of typos and incorrect man macros. The macro Em. was present in all the manpages and it's incorrect, plus there's some typos here and there, some of them spotted by lintian. Author: David Martínez Moreno Forwarded: https://github.com/radare/radare2/pull/504 Last-Update: 2013-12-31 --- a/libr/bin/format/mach0/mach-o/fat.h +++ b/libr/bin/format/mach0/mach-o/fat.h @@ -24,7 +24,7 @@ #define _MACH_O_FAT_H_ /* * This header file describes the structures of the file format for "fat" - * architecture specific file (wrapper design). At the begining of the file + * architecture specific file (wrapper design). At the beginning of the file * there is one fat_header structure followed by a number of fat_arch * structures. For each architecture in the file, specified by a pair of * cputype and cpusubtype, the fat_header describes the file offset, file --- a/libr/cons/grep.c +++ b/libr/cons/grep.c @@ -8,7 +8,7 @@ "Usage: [command]~[modifier][word,word][[column][:line]\n" " modifiers\n" " & all words must match to grep the line\n" -" ^ words must be placed at the begining of line\n" +" ^ words must be placed at the beginning of line\n" " ! negate grep\n" " ? count number of matching lines\n" " examples:\n" --- a/man/rabin2.1 +++ b/man/rabin2.1 @@ -1,4 +1,3 @@ -.Em .TH RABIN2 1 .SH NAME rabin2 \- Binary program info extractor @@ -38,7 +37,7 @@ .It Fl f Ar subbin Select sub-binary architecture. Useful for fat-mach0 binaries .It Fl g -Same as -SMRevsiz (Show all possible information). See -r +Same as \-SMRevsiz (Show all possible information). See \-r .It Fl i Show imports (symbols imported from libraries) .It Fl s @@ -110,5 +109,4 @@ .Xr rarun2(1) , .Sh AUTHORS .Pp -pancake , -nibble +Written by pancake and nibble . --- a/man/radiff2.1 +++ b/man/radiff2.1 @@ -1,4 +1,3 @@ -.Em .TH RADIFF2 1 .SH NAME radiff2 \- unified binary diffing utility --- a/man/rafind2.1 +++ b/man/rafind2.1 @@ -1,4 +1,3 @@ -.Em .TH RAFIND2 1 .SH NAME rafind2 \- Advanced commandline hexadecimal editor --- a/man/ragg2.1 +++ b/man/ragg2.1 @@ -1,4 +1,3 @@ -.Em .TH RAGG2 1 .SH NAME ragg2 \- radare2 utility to run programs in exotic environments @@ -80,7 +79,7 @@ /* hello world in r_egg */ write@syscall(4); exit@syscall(1); -.Pp +.Pp main@global(128) { .var0 = "hi!\\n"; write(1,.var0, 4); @@ -110,4 +109,4 @@ .Xr rasm2(1) , .Sh AUTHORS .Pp -pancake +Written by pancake . --- a/man/ragg2-cc.1 +++ b/man/ragg2-cc.1 @@ -1,4 +1,3 @@ -.Em .TH RAGG2-CC 1 .SH NAME ragg2-cc \- CC frontend for compiling shellcodes @@ -49,7 +48,7 @@ write (1, "Hello World\\n", 12); exit (0); } -.Pp +.Pp $ ragg2-cc hi.c hi.c.bin .Pp --- a/man/rahash2.1 +++ b/man/rahash2.1 @@ -1,4 +1,3 @@ -.Em .TH RAHASH2 1 .SH NAME hasher2 \- block based hashing utility --- a/man/rarun2.1 +++ b/man/rarun2.1 @@ -1,4 +1,3 @@ -.Em .TH RARUN2 1 .SH NAME rarun2 \- radare2 utility to run programs in exotic environments @@ -57,7 +56,7 @@ .Pp Connecting a program to a socket .Pp - $ nc -l 9999 + $ nc \-l 9999 $ rarun2 program=/bin/ls connect=localhost:9999 .Pp Debugging a program redirecting io to another terminal @@ -66,7 +65,7 @@ $ tty ; clear ; sleep 999999 /dev/ttyS010 ## in another terminal run r2 - $ r2 -d rarun2 program=/bin/ls stdio=/dev/ttys010 + $ r2 \-d rarun2 program=/bin/ls stdio=/dev/ttys010 .Sh SEE ALSO .Pp .Xr radare2(1) , @@ -78,4 +77,4 @@ .Xr rasm2(1) , .Sh AUTHORS .Pp -pancake +Written by pancake --- a/man/rax2.1 +++ b/man/rax2.1 @@ -1,4 +1,3 @@ -.Em .TH RAX2 1 .SH NAME rax2 \- radare base converter @@ -70,7 +69,7 @@ 0x5*101b+5 30 .Pp -It is very useful tool for scripting, so you can read floating point values, or get the integer offset of a jump or a stack delta when analyzing programs. +It is a very useful tool for scripting, so you can read floating point values, or get the integer offset of a jump or a stack delta when analyzing programs. .Pp .Sh SEE ALSO .Pp @@ -84,5 +83,4 @@ .Xr rasm2(1) , .Sh AUTHORS .Pp -pancake , -nibble +Written by pancake and nibble . --- a/man/radare2.1 +++ b/man/radare2.1 @@ -1,4 +1,3 @@ -.Em .TH RADARE2 1 .SH NAME radare2 \- Advanced commandline hexadecimal editor, disassembler and debugger @@ -86,7 +85,7 @@ .Sh ENVIRONMENT These values can be used from scripts launched from inside radare ('!' command) .Ar FILE -path to the current working file +path to the current working file. .Sh SEE ALSO .Pp .Xr rahash2(1) , --- a/man/rasm2.1 +++ b/man/rasm2.1 @@ -1,4 +1,3 @@ -.Em .TH "RASM2" "1" "" "" .SH "NAME" rasm2 \- radare2 assembler and disassembler tool @@ -16,7 +15,7 @@ .Op Fl l Ar int .Op ARG .Sh DESCRIPTION -This tool uses r_asm to assemble and disassemble files or hexpair strings. It supports a large list of architectures which can be listed using the -L flag. +This tool uses r_asm to assemble and disassemble files or hexpair strings. It supports a large list of architectures which can be listed using the \-L flag. .Pp .Bl -tag -width Fl .It Fl a Ar arch @@ -26,7 +25,7 @@ .It Fl B Binary input/output (\-l is mandatory for binary input) .It Fl c Ar cpu -Select specific CPU (depends on -a arch) +Select specific CPU (depends on \-a arch) .It Fl C Output in C format .It Fl d @@ -44,7 +43,7 @@ .It Fl l Ar int Input/Output length .It Fl i Ar int -Ignore/skip N bytes from the begining of the input buffer +Ignore/skip N bytes from the beginning of the input buffer .It Fl L List supported asm plugins .It Fl o Ar offset @@ -60,7 +59,7 @@ .Pp $ rasm2 \-a x86 \-b 32 'mov eax, 33' .Pp -Disassemble opcode: +Disassemble opcode: .Pp $ rasm2 \-d 90 .Sh SEE ALSO @@ -75,5 +74,4 @@ .Xr rax2(1) , .Sh AUTHORS .Pp -pancake , -nibble +Written by pancake and nibble . --- a/libr/core/cmd_debug.c +++ b/libr/core/cmd_debug.c @@ -956,7 +956,7 @@ r_io_read_at (core->io, addr, buf, sizeof (buf)); r_anal_op (core->anal, &aop, addr, buf, sizeof (buf)); if (aop.jump != UT64_MAX && aop.fail != UT64_MAX) { - eprintf ("Dont know how to skip this instruction\n"); + eprintf ("Don't know how to skip this instruction\n"); break; } addr += aop.length; debian/patches/08_proper_tcc_build.patch0000664000000000000000000000101212321544242015457 0ustar Description: Add .so as a suffix for libtcc on Linux. It's an oversight that libtcc is being built as .dylib (OS X). Do the right thing and use .so as the default. Author: David Martínez Moreno Forwarded: https://github.com/radare/radare2/pull/504 Last-Update: 2014-01-01 --- a/shlr/tcc/Makefile +++ b/shlr/tcc/Makefile @@ -4,7 +4,11 @@ CFLAGS+=-fPIC -Wall LDFLAGS+=-shared +ifeq ($(OSNAME),darwin) SOEXT?=dylib +else +SOEXT?=so +endif LIBNAME=libr_tcc.${SOEXT} all: ${LIBNAME} libr_tcc.a debian/patches/04_remove_non-installable_library.patch0000664000000000000000000000144612321544242020332 0ustar Description: A test library is being installed and breaks the build. This solves the problem of creating and installing parse/t/lib.so as debian/tmp//usr/lib/x86_64-linux-gnu/t.0.9.6. Author: David Martínez Moreno Forwarded: https://github.com/radare/radare2/pull/504 Last-Update: 2013-12-31 --- a/libr/Makefile +++ b/libr/Makefile @@ -108,7 +108,7 @@ # TODO :Use INSTALL_DATA_DIR instead of mkdir # libraries @${INSTALL_DIR} ${LFX} - @for a in `find * -type f | grep -e '\.${EXT_SO}$$' | grep -v lib/t | grep lib | grep -v /p/` ; do \ + @for a in `find * -type f | grep -e '\.${EXT_SO}$$' | grep -Ev '(lib|parse)/t/' | grep lib | grep -v /p/` ; do \ b=`echo $$a|cut -d / -f 2`; \ echo " ${LFX}/$$b.${LIBVERSION}"; \ ${INSTALL_LIB} $$a ${LFX}/$$b.${LIBVERSION} ; \ debian/patches/101_split_plugins_installation0000664000000000000000000000305212321544242016577 0ustar Description: Move language plugins to a different directory. In order to prevent conflicts and to ease packaging (otherwise you have to use a dh_install line in debian/rules for every package and an additional -X n libradare2), move the installation of the plugins to a harmless directory where it can be safely ignored by libradare2 and installed by radare2-plugins. This is Debian-only. Author: David Martínez Moreno Forwarded: not-needed Last-Update: 2013-12-30 --- a/libr/Makefile +++ b/libr/Makefile @@ -119,11 +119,15 @@ echo " ${LFX}/$$a"; ${INSTALL_DATA} $$a ${LFX} ; done # plugins @${INSTALL_DIR} ${LFX}/radare2/${VERSION} - @for a in `find */p -perm -u+x -type f | grep -v exe | grep -v dll | grep ${EXT_SO}`; \ + @for a in `find */p -perm -u+x -type f | grep -v exe | grep -v dll | grep -v lang/p/ | grep ${EXT_SO}`; \ do echo " ${LFX}/radare2/${VERSION}/$$a"; \ ${INSTALL_DATA} $$a ${LFX}/radare2/${VERSION} ; done - @echo "lang/p/radare.* ${DESTDIR}/${PFX}/${LIBDIR}/radare2/${VERSION}" - ${INSTALL_DATA} lang/p/radare.* ${LFX}/radare2/${VERSION} + mkdir -p ${LFX}/r2-plugins/${VERSION} + @for a in `find lang/p -perm -u+x -type f | grep -v exe | grep -v dll | grep ${EXT_SO}`; \ + do echo " Diverting language plugins in Debian packaging: ${LFX}/r2-plugins/${VERSION}/$$a"; \ + ${INSTALL_DATA} $$a ${LFX}/r2-plugins/${VERSION} ; done + @echo "lang/p/radare.* ${LFX}/r2-plugins/${VERSION}" + ${INSTALL_DATA} lang/p/radare.* ${LFX}/r2-plugins/${VERSION} cd ${LFX}/radare2 ; ln -fs ${VERSION} last deinstall uninstall: debian/patches/09_fix_internal_plugins.patch0000664000000000000000000000342412321544242016375 0ustar Description: Fix check for lua libs. The internal plugins Makefile is too strict on the pkgconfig check for lua config, so I made the hyphen optional and added a number to make a possible mismatch more unlikely. There's a leftover in the main Makefile, possibly from radare1, for installing radare.lua. Also the lua plugin is not looking at the same directory for radare.lua as the installation says. Author: David Martínez Moreno Forwarded: no Last-Update: 2013-12-30 --- a/libr/lang/p/Makefile +++ b/libr/lang/p/Makefile @@ -1,11 +1,11 @@ BINDEPS=foo include ../../config.mk -CFLAGS+=-I../../include -Wall -DPREFIX=\"${PREFIX}\" +CFLAGS+=-I../../include -Wall -DLIBDIR=\"${LIBDIR}\" ifeq ($(OSTYPE),darwin) CFLAGS+=-undefined dynamic_lookup endif -LUAPKG=$(shell pkg-config --list-all|awk '/lua-/{print $$1;}') +LUAPKG=$(shell pkg-config --list-all|awk '/lua-?[0-9]/{print $$1};') ifneq (${LUAPKG},) CFLAGS+=$(shell pkg-config --cflags ${LUAPKG}) LUA_LDFLAGS+=$(shell pkg-config --libs ${LUAPKG}) --- a/libr/lang/p/lua.c +++ b/libr/lang/p/lua.c @@ -7,8 +7,6 @@ #include #include -#define LIBDIR PREFIX"/lib" - static lua_State *L; static RCore* core = NULL; static int lua_run(RLang *lang, const char *code, int len); --- a/Makefile +++ b/Makefile @@ -101,7 +101,6 @@ done mkdir -p ${DLIBDIR}/radare2/${VERSION}/hud cp -f doc/hud ${DLIBDIR}/radare2/${VERSION}/hud/main - cp ${PWD}/libr/lang/p/radare.lua ${DLIBDIR}/radare2/${VERSION}/radare.lua sys/ldconfig.sh install-www: @@ -132,7 +131,6 @@ done mkdir -p ${DLIBDIR}/radare2/${VERSION}/hud ln -fs ${PWD}/doc/hud ${DLIBDIR}/radare2/${VERSION}/hud/main - ln -fs ${PWD}/libr/lang/p/radare.lua ${DLIBDIR}/radare2/${VERSION}/radare.lua sys/ldconfig.sh deinstall uninstall: debian/patches/03_unsafe_snprintf.patch0000664000000000000000000000135312321544242015347 0ustar Description: Fix incomplete snprintf declaration. This patch prevents a potential format string attack, caught thanks to the hardening flags in the Debian build (-Werror=format-security). It's partially taken from upstream's 1289476120c4... Author: David Martínez Moreno Forwarded: not-needed Last-Update: 2013-12-11 --- a/shlr/java/code.c +++ b/shlr/java/code.c @@ -132,13 +132,13 @@ if(!string_str) string_str = empty; - memory_alloc = strlen(string_str) + 4; + memory_alloc = strlen(string_str) + 3; if (memory_alloc) str = malloc(memory_alloc); if (str){ - snprintf (str, "\"%s\"", string_str); + snprintf (str, memory_alloc, "\"%s\"", string_str); } if (string_str != empty) debian/patches/07_propagate_ldflags.patch0000664000000000000000000000166612321544242015634 0ustar Description: Properly propagate LDFLAGS in libraries. Debian fills up LDFLAGS with hardening flgs but for some libraries this parameter is not read from the environment variable but hardcoded. Author: David Martínez Moreno Forwarded: https://github.com/radare/radare2/pull/504 Last-Update: 2013-12-31 --- a/mk/gcc.mk +++ b/mk/gcc.mk @@ -26,7 +26,7 @@ LDFLAGS_LIB=-dynamiclib LDFLAGS_SONAME=-Wl,-install_name,${LIBDIR}/ else -LDFLAGS_LIB=-shared +LDFLAGS_LIB=${LDFLAGS} -shared #ifneq (${NAME},) #LDFLAGS_LIB+=-Wl,-soname,lib${NAME}.${EXT_SO}.${VERSION} #endif --- a/shlr/tcc/Makefile +++ b/shlr/tcc/Makefile @@ -3,7 +3,7 @@ OFILES=libtcc.o tccgen.o tccpp.o CFLAGS+=-fPIC -Wall -LDFLAGS=-shared +LDFLAGS+=-shared SOEXT?=dylib LIBNAME=libr_tcc.${SOEXT} --- a/libr/util/Makefile +++ b/libr/util/Makefile @@ -24,6 +24,6 @@ endif LDFLAGS+=${BN_LIBS} -LDFLAGS=${TH_LIBS} +LDFLAGS+=${TH_LIBS} include ../rules.mk debian/patches/12_fix_strcasestr_declaration.patch0000664000000000000000000000125312321544274017557 0ustar Description: Fix an implicit declaration of strcasestr. Matthias Klose found a function not defined in the build logs. It's due to a missing include. I checked upstream and it's has already been fixed. Updated by Steve McIntyre <93sam@debian.org> Author: David Martínez Moreno Bug-Debian: http://bugs.debian.org/735921 Forwarded: not-needed Last-Update: 2014-03-23 --- radare2-0.9.6.orig/libr/util/str.c +++ radare2-0.9.6/libr/util/str.c @@ -1,8 +1,10 @@ /* radare - LGPL - Copyright 2007-2013 - pancake */ +#define _GNU_SOURCE #include "r_types.h" #include "r_util.h" #include +#include #include #include