From owner-svn-ports-all@freebsd.org Sun Feb 23 00:54:34 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E53AD252ADC; Sun, 23 Feb 2020 00:54:34 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Q6Ct5Dpjz4Mg9; Sun, 23 Feb 2020 00:54:34 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD74F457E; Sun, 23 Feb 2020 00:54:34 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01N0sYAd086662; Sun, 23 Feb 2020 00:54:34 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01N0sWSa086653; Sun, 23 Feb 2020 00:54:32 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <202002230054.01N0sWSa086653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 23 Feb 2020 00:54:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r526866 - in head/sysutils: . triton triton/files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/sysutils: . triton triton/files X-SVN-Commit-Revision: 526866 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 00:54:35 -0000 Author: yuri Date: Sun Feb 23 00:54:32 2020 New Revision: 526866 URL: https://svnweb.freebsd.org/changeset/ports/526866 Log: New mport: sysutils/triton: Dynamic Binary Analysis (DBA) framework Added: head/sysutils/triton/ head/sysutils/triton/Makefile (contents, props changed) head/sysutils/triton/distinfo (contents, props changed) head/sysutils/triton/files/ head/sysutils/triton/files/patch-src_CMakeLists.txt (contents, props changed) head/sysutils/triton/files/patch-src_libtriton_CMakeLists.txt (contents, props changed) head/sysutils/triton/files/patch-src_libtriton_includes_triton_syscalls.hpp (contents, props changed) head/sysutils/triton/files/patch-src_scripts_extract__syscall.py (contents, props changed) head/sysutils/triton/pkg-descr (contents, props changed) head/sysutils/triton/pkg-plist (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sun Feb 23 00:38:36 2020 (r526865) +++ head/sysutils/Makefile Sun Feb 23 00:54:32 2020 (r526866) @@ -1306,6 +1306,7 @@ SUBDIR += tracker-miners SUBDIR += tree SUBDIR += tren + SUBDIR += triton SUBDIR += trueos-libqt5 SUBDIR += ts SUBDIR += tss Added: head/sysutils/triton/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/Makefile Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= triton +DISTVERSIONPREFIX= v +DISTVERSION= 0.7 +CATEGORIES= sysutils + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Dynamic Binary Analysis (DBA) framework + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= boost-libs>0:devel/boost-libs +LIB_DEPENDS= libcapstone.so:devel/capstone4 \ + libz3.so:math/z3 + +USES= cmake python:build shebangfix +SHEBANG_FILES= src/scripts/extract_syscall.py +USE_GITHUB= yes +GH_ACCOUNT= JonathanSalwan +GH_PROJECT= Triton +USE_LDCONFIG= yes + +CMAKE_OFF= PYTHON_BINDINGS + +.include Added: head/sysutils/triton/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/distinfo Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,3 @@ +TIMESTAMP = 1582414724 +SHA256 (JonathanSalwan-Triton-v0.7_GH0.tar.gz) = 8f32f4988ca4411ad7a28cf65ec49a7a5e4fe161f6e2ac3925e8ed7844974bd6 +SIZE (JonathanSalwan-Triton-v0.7_GH0.tar.gz) = 9231009 Added: head/sysutils/triton/files/patch-src_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/files/patch-src_CMakeLists.txt Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,11 @@ +--- src/CMakeLists.txt.orig 2020-02-22 23:42:18 UTC ++++ src/CMakeLists.txt +@@ -4,7 +4,7 @@ add_subdirectory(tracer) + if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") + # Disable exemples for windows as linkage doesn't work. Exported function should + # be marked as exported on windows. +- add_subdirectory(examples) ++ #add_subdirectory(examples) + else() + enable_testing() + add_test(DummyTest echo "Windows is awesome") Added: head/sysutils/triton/files/patch-src_libtriton_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/files/patch-src_libtriton_CMakeLists.txt Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,42 @@ +--- src/libtriton/CMakeLists.txt.orig 2019-09-30 08:16:44 UTC ++++ src/libtriton/CMakeLists.txt +@@ -50,7 +50,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID + endif() + + # 32-bits +-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + if(${ARCHITECTURE} STREQUAL "i386") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") + endif() +@@ -150,9 +150,9 @@ endif() + + # Triton have to generate a syscalls table from the kernel source + # This following code tries to find the unistd_64.h or unistd_32.h header depending on the architecture. +-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +- FILE(GLOB_RECURSE syscalls32_table_files /usr/include/*unistd_32.h) +- FILE(GLOB_RECURSE syscalls64_table_files /usr/include/*unistd_64.h) ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") ++ FILE(GLOB_RECURSE syscalls32_table_files /usr/include/unistd.h) ++ FILE(GLOB_RECURSE syscalls64_table_files /usr/include/unistd.h) + endif() + + macro(find_osx_syscall path) +@@ -197,7 +197,7 @@ macro(gen_syscall bits) + endmacro() + + # Note: Windows ?! +-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + gen_syscall(64) + else() + add_custom_target(gen-syscall64 +@@ -206,7 +206,7 @@ else() + endif() + + # Syscall 32 is only available for linux users +-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") ++if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + gen_syscall(32) + else() + add_custom_target(gen-syscall32 Added: head/sysutils/triton/files/patch-src_libtriton_includes_triton_syscalls.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/files/patch-src_libtriton_includes_triton_syscalls.hpp Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,11 @@ +--- src/libtriton/includes/triton/syscalls.hpp.orig 2020-02-22 23:40:16 UTC ++++ src/libtriton/includes/triton/syscalls.hpp +@@ -10,7 +10,7 @@ + + #if defined(__unix__) || defined(__APPLE__) + +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(__FreeBSD__) + #include + #elif defined(__ANDROID___) + #if defined(__aarch64__) Added: head/sysutils/triton/files/patch-src_scripts_extract__syscall.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/files/patch-src_scripts_extract__syscall.py Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,11 @@ +--- src/scripts/extract_syscall.py.orig 2020-02-23 00:00:42 UTC ++++ src/scripts/extract_syscall.py +@@ -41,6 +41,8 @@ if __name__ == "__main__": + + if platform.system() == 'Linux': + regex = re.compile(r"#define\s+(__NR_)(\w+)\s+(\d+)") ++ elif platform.system() == 'FreeBSD': ++ regex = re.compile(r"#define\s+(__NR_)(\w+)\s+(\d+)") + elif platform.system() == 'Darwin': + regex = re.compile(r"#define\s+(SYS_)(\w+)\s+(\d+)") + else: Added: head/sysutils/triton/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/pkg-descr Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,7 @@ +Triton is a dynamic binary analysis (DBA) framework. It provides internal +components like a Dynamic Symbolic Execution (DSE) engine, a dynamic taint +engine, AST representations of the x86, x86-64 and AArch64 Instructions Set +Architecture (ISA), SMT simplification passes, an SMT solver interface. Triton +is mainly used to provide help during reverse-engineering. + +WWW: https://triton.quarkslab.com/ Added: head/sysutils/triton/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/triton/pkg-plist Sun Feb 23 00:54:32 2020 (r526866) @@ -0,0 +1,67 @@ +include/triton/aarch64.spec +include/triton/aarch64Cpu.hpp +include/triton/aarch64OperandProperties.hpp +include/triton/aarch64Semantics.hpp +include/triton/aarch64Specifications.hpp +include/triton/api.hpp +include/triton/archEnums.hpp +include/triton/architecture.hpp +include/triton/ast.hpp +include/triton/astContext.hpp +include/triton/astEnums.hpp +include/triton/astPythonRepresentation.hpp +include/triton/astRepresentation.hpp +include/triton/astRepresentationInterface.hpp +include/triton/astSmtRepresentation.hpp +include/triton/bitsVector.hpp +include/triton/callbacks.hpp +include/triton/callbacksEnums.hpp +include/triton/comparableFunctor.hpp +include/triton/coreUtils.hpp +include/triton/cpuInterface.hpp +include/triton/cpuSize.hpp +include/triton/dllexport.hpp +include/triton/exceptions.hpp +include/triton/externalLibs.hpp +include/triton/immediate.hpp +include/triton/instruction.hpp +include/triton/irBuilder.hpp +include/triton/memoryAccess.hpp +include/triton/modes.hpp +include/triton/modesEnums.hpp +include/triton/operandWrapper.hpp +include/triton/pathConstraint.hpp +include/triton/pathManager.hpp +include/triton/py3c_compat.h +include/triton/pythonBindings.hpp +include/triton/pythonObjects.hpp +include/triton/pythonUtils.hpp +include/triton/pythonXFunctions.hpp +include/triton/register.hpp +include/triton/semanticsInterface.hpp +include/triton/shortcutRegister.hpp +include/triton/solverEngine.hpp +include/triton/solverEnums.hpp +include/triton/solverInterface.hpp +include/triton/solverModel.hpp +include/triton/symbolicEngine.hpp +include/triton/symbolicEnums.hpp +include/triton/symbolicExpression.hpp +include/triton/symbolicSimplification.hpp +include/triton/symbolicVariable.hpp +include/triton/syscalls.hpp +include/triton/syscalls.hpp.orig +include/triton/taintEngine.hpp +include/triton/tritonToZ3Ast.hpp +include/triton/tritonTypes.hpp +include/triton/unix.hpp +include/triton/version.hpp +include/triton/version.hpp.in +include/triton/x86.spec +include/triton/x8664Cpu.hpp +include/triton/x86Cpu.hpp +include/triton/x86Semantics.hpp +include/triton/x86Specifications.hpp +include/triton/z3Solver.hpp +include/triton/z3ToTritonAst.hpp +lib/libtriton.so