Skip to content

Commit

Permalink
Clean-up improvements: unify style and modernize syntax
Browse files Browse the repository at this point in the history
General codebase cleanup, unified formatting with LLVM style,
updated syntax and standardized licensing across files.
  • Loading branch information
antoniofrighetto committed Nov 25, 2024
1 parent 1ce103c commit e0b27f1
Show file tree
Hide file tree
Showing 110 changed files with 3,373 additions and 3,112 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/s3-deploy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env python3

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

import sys
import os
import logging
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
# O-MVLL

O-MVLL (in reference to [O-LLVM](https://github.com/obfuscator-llvm/obfuscator)) is a LLVM-based obfuscator
driven by a Python API and by new LLVM pass manager:
driven by Python and the LLVM pass manager. It can be run as follows:

```bash
clang++ -fpass-plugin=omvll.so main.cpp -o main
clang++ -fpass-plugin=libOMVLL.dylib main.cpp -o main
```

```python
Expand All @@ -51,7 +51,7 @@ class MyConfig(omvll.ObfuscationConfig):

O-MVLL can be used with the Android NDK and an iOS toolchain but **it only supports the AArch64 architecture**.

For the details, you can checkout the documentation: [obfuscator.re/omvll](https://obfuscator.re/omvll)
For more details, please check out the documentation at [obfuscator.re/omvll](https://obfuscator.re/omvll).

### Download

Expand All @@ -60,15 +60,15 @@ For the details, you can checkout the documentation: [obfuscator.re/omvll](https

### Contact

You can reach out by email at this address: `[email protected]`
Feel free to reach out at `[email protected]` for any doubt, issue, bug you may encounter.

#### Maintainers

- [Build38: The Next-Gen Mobile App Security Platform](https://build38.com/)

#### Author

- [Romain Thomas](https://www.romainthomas.fr): [@rh0main](https://twitter.com/rh0main) - `[email protected]`
- [Romain Thomas](https://www.romainthomas.fr): [@rh0main](https://twitter.com/rh0main) (`[email protected]`)

#### Credits

Expand All @@ -80,7 +80,9 @@ You can reach out by email at this address: `[email protected]`

### License

O-MVLL is released under the same License as LLVM: [Apache License, Version 2.0](./LICENSE)
O-MVLL is released under the same License as LLVM: [Apache License, Version 2.0](./LICENSE).

This project is partly funded by the EU and the European Cybersecurity Competence Center.

<div style="display: flex; gap: 0px; padding: 10px;">
<img src=".github/img/eu.jpg" alt="EU Co-funding Logo" style="height: 50px; width: auto;">
Expand Down
4 changes: 4 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

import os
import sphinx
import sys
Expand Down
6 changes: 6 additions & 0 deletions scripts/deps/common/compile_cpython310.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

# This script is used to compile cpython

set -e

curl -LO https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tgz
Expand Down
6 changes: 6 additions & 0 deletions scripts/deps/common/compile_pybind11.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

# This script is used to compile pybind11

set -e

curl -LO https://github.com/pybind/pybind11/archive/refs/tags/v2.10.3.tar.gz
Expand Down
6 changes: 6 additions & 0 deletions scripts/deps/common/compile_spdlog.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

# This script is used to compile cpython

set -e

curl -LO https://github.com/gabime/spdlog/archive/refs/tags/v1.10.0.tar.gz
Expand Down
5 changes: 5 additions & 0 deletions scripts/deps/generate_deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

set -e

SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
Expand Down
6 changes: 6 additions & 0 deletions scripts/deps/ndk/compile_llvm_r26d.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

# This script is used to compile the Android NDK r26d LLVM toolchain

set -e

host=$(uname)
Expand Down
5 changes: 5 additions & 0 deletions scripts/docker/doc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/sh

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

set -ex

mkdir -p /deps && cd /deps
Expand Down
7 changes: 5 additions & 2 deletions scripts/docker/ndk_r26_compile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/sh
set -ex

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

set -ex
mkdir -p /data && cd /data

cp /third-party/omvll-deps-ndk-*/android-llvm-toolchain-r26d.tar.gz .
Expand All @@ -16,7 +20,6 @@ tar xzvf Python-slim.tar.gz
tar xzvf pybind11.tar.gz
tar xzvf spdlog-1.10.0-Linux.tar.gz


# Android NDK is bootstrapped in a so-called 2-stage process. To avoid ABI incompatibilities,
# we build our plugin with the same toolchain used to build the NDK itself (stage-1). Then,
# we link the plugin against stage-2 build artifacts.
Expand Down
6 changes: 6 additions & 0 deletions scripts/docker/xcode_15_compile.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/sh

#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

set -ex

mkdir -p /deps && cd /deps

cp /third-party/omvll-deps-xcode-*/LLVM-16.0.0git-arm64-Darwin.tar.gz .
Expand Down
4 changes: 4 additions & 0 deletions scripts/package.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# This file is distributed under the Apache License v2.0. See LICENSE for details.
#

import argparse
import sys
from pathlib import Path
Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ else()
set(OMVLL_DEBUG 1)
endif()


configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/omvll/config.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/omvll/config.hpp")

Expand Down Expand Up @@ -133,7 +132,6 @@ endif()

target_link_options(OMVLL PUBLIC ${OMVLL_LINK_OPT})


target_link_libraries(OMVLL
PRIVATE
spdlog::spdlog pybind11::headers
Expand All @@ -147,7 +145,6 @@ if(NOT APPLE)
)
endif()


set(LLVM_LIBS_DEP
demangle
OrcJIT
Expand Down
3 changes: 1 addition & 2 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

target_sources(OMVLL PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/omvll_config.cpp
${CMAKE_CURRENT_SOURCE_DIR}/log.cpp
${CMAKE_CURRENT_SOURCE_DIR}/plugin.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Jitter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/jitter.cpp
)

add_subdirectory("python")
154 changes: 0 additions & 154 deletions src/core/Jitter.cpp

This file was deleted.

Loading

0 comments on commit e0b27f1

Please sign in to comment.