mirror of
https://github.com/frida/frida-core.git
synced 2026-11-08 17:12:49 -10:00
Compare commits
No files matched your search
@@ -0,0 +1 @@
|
||||
/.github/workflows/ @oleavr
|
||||
@@ -0,0 +1 @@
|
||||
github: frida
|
||||
@@ -0,0 +1,39 @@
|
||||
name: Set up Apple codesigning certificates
|
||||
description: Set up certificates needed for codesigning when building for Apple OSes
|
||||
inputs:
|
||||
certificates-p12:
|
||||
required: true
|
||||
description: The certificates to use for codesigning, as a base64-encoded .p12
|
||||
certificates-password:
|
||||
required: true
|
||||
description: The password for the .p12
|
||||
keychain-password:
|
||||
required: true
|
||||
description: The keychain password to use
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install the Apple certificates
|
||||
env:
|
||||
CERTIFICATES_P12: ${{ inputs.certificates-p12 }}
|
||||
CERTIFICATES_PASSWORD: ${{ inputs.certificates-password }}
|
||||
KEYCHAIN_PASSWORD: ${{ inputs.keychain-password }}
|
||||
run: |
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/apple-certificates.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/frida-signing.keychain-db
|
||||
echo -n "$CERTIFICATES_P12" | base64 -d -o $CERTIFICATE_PATH
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security import $CERTIFICATE_PATH -P "$CERTIFICATES_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
rm $CERTIFICATE_PATH
|
||||
(
|
||||
MACOS_CERTID=$(security find-identity -v -p codesigning | grep "Developer ID Application: " | awk '{ print $2 }')
|
||||
IOS_CERTID=$(security find-identity -v -p codesigning | grep "Apple Development: " | awk '{ print $2 }')
|
||||
echo MACOS_CERTID=$MACOS_CERTID
|
||||
echo IOS_CERTID=$IOS_CERTID
|
||||
echo WATCHOS_CERTID=$IOS_CERTID
|
||||
echo TVOS_CERTID=$IOS_CERTID
|
||||
) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
@@ -0,0 +1,482 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
FRIDA_CORE_OPTIONS: '--with-devkits=core --enable-tests'
|
||||
|
||||
jobs:
|
||||
native:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { id: windows-arm64, runner: '"windows-11-arm"', sys: CLANGARM64, pkg: 'mingw-w64-clang-aarch64-clang' }
|
||||
- { id: windows-x86_64, runner: '"windows-latest"', sys: MINGW64, pkg: 'mingw-w64-x86_64-gcc' }
|
||||
- { id: windows-x86, runner: '"windows-latest"', sys: MINGW32, pkg: 'mingw-w64-i686-gcc' }
|
||||
- { id: macos-x86_64, runner: '"macos-latest"' }
|
||||
- { id: macos-arm64, runner: '"macos-latest"' }
|
||||
- { id: linux-x86_64, runner: '"ubuntu-latest"' }
|
||||
- { id: linux-x86, runner: '"ubuntu-latest"' }
|
||||
fail-fast: false
|
||||
runs-on: ${{ fromJSON(matrix.runner) }}
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install MinGW toolchain for cgo support
|
||||
if: ${{ startsWith(matrix.id, 'windows-') }}
|
||||
id: msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
install: ${{ matrix.pkg }}
|
||||
- name: Install Go toolchain
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'src/compiler/go.mod'
|
||||
cache-dependency-path: 'src/compiler/go.mod'
|
||||
- name: Set up Apple certificates
|
||||
if: ${{ startsWith(matrix.id, 'macos-') }}
|
||||
uses: ./.github/actions/setup-apple-certificates
|
||||
with:
|
||||
certificates-p12: ${{ secrets.APPLE_CERTIFICATES_P12 }}
|
||||
certificates-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }}
|
||||
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
|
||||
- name: Relax macOS security policy to avoid prompts
|
||||
if: ${{ startsWith(matrix.id, 'macos-') }}
|
||||
run: sudo security authorizationdb write system.privilege.taskport allow
|
||||
- name: Install gcc-multilib
|
||||
if: matrix.id == 'linux-x86'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-multilib lib32stdc++-13-dev
|
||||
- name: Build
|
||||
if: ${{ startsWith(matrix.id, 'windows-') }}
|
||||
run: |
|
||||
.\configure `
|
||||
--host=${{ matrix.id }} `
|
||||
--enable-compiler-backend `
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
.\make
|
||||
env:
|
||||
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
|
||||
- name: Build
|
||||
if: ${{ !startsWith(matrix.id, 'windows-') && matrix.id != 'linux-x86' }}
|
||||
run: |
|
||||
./configure \
|
||||
--enable-compiler-backend \
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Build
|
||||
if: matrix.id == 'linux-x86'
|
||||
run: |
|
||||
CC="gcc -m32" CXX="g++ -m32" STRIP="strip" \
|
||||
./configure \
|
||||
--build=linux-x86 \
|
||||
--host=linux-x86 \
|
||||
--enable-compiler-backend \
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Upload devkit
|
||||
if: ${{ !startsWith(matrix.id, 'linux-') }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-devkit-${{ matrix.id }}
|
||||
path: build/src/devkit/
|
||||
- name: Test
|
||||
if: ${{ matrix.id != 'windows-arm64' && !startsWith(matrix.id, 'macos-') }}
|
||||
run: make test
|
||||
|
||||
cross:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { id: windows-x86_64-mingw, opts: '--host=x86_64-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-x86-64 }
|
||||
- { id: windows-x86-mingw, opts: '--host=i686-w64-mingw32 --without-prebuilds=sdk:host', pkg: g++-mingw-w64-i686 }
|
||||
- { id: linux-mips, opts: '--host=mips-linux-gnu', pkg: g++-mips-linux-gnu }
|
||||
- { id: linux-mipsel, opts: '--host=mipsel-linux-gnu', pkg: g++-mipsel-linux-gnu }
|
||||
- { id: linux-mips64, opts: '--host=mips64-linux-gnuabi64', pkg: g++-mips64-linux-gnuabi64 }
|
||||
- { id: linux-mips64el, opts: '--host=mips64el-linux-gnuabi64', pkg: g++-mips64el-linux-gnuabi64 }
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ${{ matrix.pkg }}
|
||||
- name: Install Go toolchain
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'src/compiler/go.mod'
|
||||
cache-dependency-path: 'src/compiler/go.mod'
|
||||
- name: Build
|
||||
run: |
|
||||
./configure \
|
||||
${{ matrix.opts }} \
|
||||
${{ !contains(matrix.id, 'mips') && '--enable-compiler-backend' || '' }} \
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Upload devkit
|
||||
if: ${{ !startsWith(matrix.id, 'linux-') }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-devkit-${{ matrix.id }}
|
||||
path: build/src/devkit/
|
||||
|
||||
manylinux:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86, x86_64, x86_64-musl, armhf, arm64, arm64-musl, mips, mipsel, mips64, mips64el]
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/frida/x-tools-linux-${{ matrix.arch }}:latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Go toolchain
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'src/compiler/go.mod'
|
||||
cache-dependency-path: 'src/compiler/go.mod'
|
||||
- name: Build
|
||||
run: |
|
||||
./configure \
|
||||
--host=$XTOOLS_HOST \
|
||||
${{ !startsWith(matrix.arch, 'mips') && '--enable-compiler-backend' || '' }} \
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Upload devkit
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-devkit-linux-${{ matrix.arch }}
|
||||
path: build/src/devkit/
|
||||
- name: Test
|
||||
if: matrix.arch == 'x86' || matrix.arch == 'x86_64'
|
||||
run: make test
|
||||
|
||||
emulator:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [armbe8, arm64be]
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/frida/x-tools-linux-${{ matrix.arch }}:latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
./configure --host=$XTOOLS_HOST --without-prebuilds=sdk:host --enable-tests
|
||||
make
|
||||
- name: Run custom container
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: docker:stable
|
||||
options: -v ${{ github.workspace }}:/workspace:delegated
|
||||
run: |
|
||||
cat <<EOF > /workspace/initscript
|
||||
#!/bin/sh
|
||||
dmesg -n1
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t tmpfs none /tmp
|
||||
mount -t devtmpfs none /dev
|
||||
mount -t 9p -o rw,sync,dirsync,relatime,trans=virtio,msize=131072,version=9p2000.L host0 /workspace
|
||||
ip link set lo up
|
||||
ip addr add 192.168.76.20/24 dev eth0
|
||||
ip link set eth0 up
|
||||
ip route add default via 192.168.76.2 dev eth0
|
||||
export LD_LIBRARY_PATH=/lib:/lib64:/libilp32
|
||||
/sbin/entropy
|
||||
cat /etc/motd
|
||||
export PS1='\u@frida:\w\$ '
|
||||
/root/frida-tests
|
||||
status=\$?
|
||||
echo "exit status: \$status"
|
||||
if [ \$status -eq 0 ]; then
|
||||
echo EXIT_OK
|
||||
elif [ \$status -gt 128 ]; then
|
||||
signal=\$((\$status - 128))
|
||||
echo "EXIT_FAIL (terminated by signal \$signal)"
|
||||
else
|
||||
echo "EXIT_FAIL (exit code \$status)"
|
||||
fi
|
||||
EOF
|
||||
|
||||
cat <<EOF > /workspace/launch.sh
|
||||
#!/bin/sh
|
||||
LOGFILE=/workspace/qemu.log
|
||||
: > "\$LOGFILE"
|
||||
timeout 120 qemu-system-aarch64 \
|
||||
-M virt \
|
||||
-machine virtualization=true \
|
||||
-machine type=virt \
|
||||
-cpu cortex-a72 \
|
||||
-smp 4 \
|
||||
-kernel /root/Image.gz \
|
||||
-initrd /root/initramfs.img \
|
||||
-append 'earlyprintk=serial,ttyAMA0 console=ttyAMA0 coredump_filter=0x3f' \
|
||||
-m 4096M \
|
||||
-net nic,id=eth \
|
||||
-net user,id=mynet,net=192.168.76.0/24 \
|
||||
-virtfs local,path=/workspace/,mount_tag=host0,security_model=passthrough,id=host0 \
|
||||
-nographic \
|
||||
-no-reboot \
|
||||
>> "\$LOGFILE" 2>&1 &
|
||||
QEMU_PID=\$!
|
||||
echo "QEMU started with PID \$QEMU_PID"
|
||||
tail -n 0 -f "\$LOGFILE" | while read line; do
|
||||
echo "\$line"
|
||||
echo "\$line" | grep "EXIT_OK" >/dev/null 2>&1
|
||||
if [ \$? -eq 0 ]; then
|
||||
echo "Success signal received from guest. Killing QEMU..."
|
||||
kill -9 "\$QEMU_PID"
|
||||
cat -n "\$LOGFILE"
|
||||
exit 0
|
||||
fi
|
||||
echo "\$line" | grep "EXIT_FAIL" >/dev/null 2>&1
|
||||
if [ \$? -eq 0 ]; then
|
||||
echo "Failure signal received from guest. Killing QEMU..."
|
||||
kill -9 "\$QEMU_PID"
|
||||
cat -n "\$LOGFILE"
|
||||
exit 1
|
||||
fi
|
||||
if ! kill -0 "\$QEMU_PID" 2>/dev/null; then
|
||||
echo "QEMU process has exited."
|
||||
cat -n "\$LOGFILE"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
EOF
|
||||
|
||||
cat <<EOF > /workspace/Dockerfile.ci
|
||||
FROM ghcr.io/frida/x-tools-linux-be-target:latest
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
cpio
|
||||
|
||||
RUN mkdir /tmp/initramfs
|
||||
WORKDIR /tmp/initramfs
|
||||
RUN cpio --extract < /root/initramfs.img
|
||||
|
||||
RUN mkdir /tmp/initramfs/workspace
|
||||
|
||||
COPY initscript /tmp/initramfs/init
|
||||
RUN chmod +x /tmp/initramfs/init
|
||||
|
||||
COPY build/tests /tmp/initramfs/root/
|
||||
RUN find . | cpio -o --format=newc -R root:root > /root/initramfs.img
|
||||
|
||||
COPY launch.sh /root/launch.sh
|
||||
RUN chmod +x /root/launch.sh
|
||||
ENTRYPOINT ["/root/launch.sh"]
|
||||
EOF
|
||||
|
||||
docker build -t ci-image -f /workspace/Dockerfile.ci /workspace
|
||||
docker run --rm -v /workspace:/workspace ci-image
|
||||
|
||||
mobile:
|
||||
strategy:
|
||||
matrix:
|
||||
id:
|
||||
- ios-arm64
|
||||
- android-x86
|
||||
- android-x86_64
|
||||
- android-arm
|
||||
- android-arm64
|
||||
fail-fast: false
|
||||
runs-on: ${{ startsWith(matrix.id, 'ios-') && 'macos-latest' || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Go toolchain
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'src/compiler/go.mod'
|
||||
cache-dependency-path: 'src/compiler/go.mod'
|
||||
- name: Set up Apple certificates
|
||||
if: startsWith(matrix.id, 'ios-')
|
||||
uses: ./.github/actions/setup-apple-certificates
|
||||
with:
|
||||
certificates-p12: ${{ secrets.APPLE_CERTIFICATES_P12 }}
|
||||
certificates-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }}
|
||||
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
|
||||
- uses: nttld/setup-ndk@v1
|
||||
if: startsWith(matrix.id, 'android-')
|
||||
id: setup-ndk
|
||||
with:
|
||||
ndk-version: r25c
|
||||
- name: Add NDK to env
|
||||
if: startsWith(matrix.id, 'android-')
|
||||
run: echo ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }} >> $GITHUB_ENV
|
||||
- name: Build
|
||||
run: |
|
||||
./configure \
|
||||
--host=${{ matrix.id }} \
|
||||
--enable-compiler-backend \
|
||||
${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Upload devkit
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-devkit-${{ matrix.id }}
|
||||
path: build/src/devkit/
|
||||
- name: Package tests
|
||||
run: |
|
||||
mkdir -p /tmp/pkg
|
||||
cd build
|
||||
case ${{ matrix.id }} in
|
||||
ios-*)
|
||||
shlibext=.dylib
|
||||
;;
|
||||
android-*)
|
||||
shlibext=.so
|
||||
;;
|
||||
esac
|
||||
cp -a tests/frida-tests tests/labrats lib/agent/frida-agent$shlibext /tmp/pkg/
|
||||
case ${{ matrix.id }} in
|
||||
ios-*)
|
||||
cp -a lib/gadget/frida-gadget.dylib ../tests/test-gadget-standalone.js /tmp/pkg/
|
||||
;;
|
||||
esac
|
||||
tar -C /tmp/pkg -czf /tmp/runner.tar.gz .
|
||||
- name: Test on Corellium iOS device
|
||||
if: matrix.id == 'ios-arm64'
|
||||
continue-on-error: true
|
||||
uses: frida/corellium-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
gateway: corellium.frida.re
|
||||
device: ios-12.5.7-arm64
|
||||
upload: /tmp/runner.tar.gz
|
||||
run: |
|
||||
cd /usr/local
|
||||
rm -rf opt/frida
|
||||
mkdir -p opt/frida
|
||||
cd opt/frida
|
||||
tar xf $ASSET_PATH
|
||||
./frida-tests
|
||||
- name: Test on Corellium Android device
|
||||
if: matrix.id == 'android-arm64'
|
||||
continue-on-error: true
|
||||
uses: frida/corellium-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
gateway: corellium.frida.re
|
||||
device: android-8.1.0-arm64
|
||||
upload: /tmp/runner.tar.gz
|
||||
run: |
|
||||
cd /data/local/tmp
|
||||
tar xf $ASSET_PATH
|
||||
TMPDIR=/data/local/tmp ./frida-tests
|
||||
|
||||
qnx-armeabi:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/frida/qnx-tools:latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
CFLAGS="--sysroot=$QNX_TARGET/armle-v7" \
|
||||
./configure --host=arm-unknown-nto-qnx6.5.0eabi ${{ env.FRIDA_CORE_OPTIONS }}
|
||||
make
|
||||
- name: Upload devkit
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: core-devkit-qnx-armeabi
|
||||
path: build/src/devkit/
|
||||
- name: Test
|
||||
run: |
|
||||
mkdir -p /tmp/pkg
|
||||
cd build
|
||||
cp -a tests/frida-tests tests/labrats lib/agent/frida-agent.so /tmp/pkg/
|
||||
tar -C /tmp/pkg -cf /tmp/runner.tar .
|
||||
/opt/sabrelite/run.sh /tmp/runner.tar /opt/frida/frida-tests
|
||||
|
||||
# This job is used to check that the Linux helpers are built correctly for all
|
||||
# supported architectures. We do this because the binary artifacts are checked
|
||||
# in, and we want to ensure that they are up-to-date with respect to the source
|
||||
# for all architectures.
|
||||
check-linux-helpers:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86, x86_64, arm, armbe8, arm64, arm64be, arm64beilp32, mips, mipsel, mips64, mips64el]
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/frida/core-linux-helpers-${{ matrix.arch }}:latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
./src/linux/helpers/rebuild.sh ${{ matrix.arch }}
|
||||
- name: Check for unexpected changes
|
||||
run: |
|
||||
git config --global --add safe.directory "$(realpath .)"
|
||||
status_output=$(git status --porcelain tests/labrats/{resident-agent,simple-agent}-linux-${{ matrix.arch }}.so tests/labrats/{forker,sleeper,spawner}-linux-${{ matrix.arch }})
|
||||
if [ -n "$status_output" ]; then
|
||||
echo "Unexpected changes detected:"
|
||||
echo "$status_output"
|
||||
echo "Diff:"
|
||||
git diff
|
||||
exit 1
|
||||
else
|
||||
echo "No unexpected changes detected."
|
||||
fi
|
||||
|
||||
# This job is used to check that the Linux labrats are built correctly for all
|
||||
# supported architectures. We do this because the binary artifacts are checked
|
||||
# in, and we want to ensure that they are up-to-date with respect to the source
|
||||
# for all architectures.
|
||||
check-labrats:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86, x86_64, arm, armbe8, arm64, arm64be, arm64beilp32, mips, mipsel, mips64, mips64el]
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/frida/core-linux-helpers-${{ matrix.arch }}:latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
./tests/labrats/rebuild.sh ${{ matrix.arch }}
|
||||
- name: Check for unexpected changes
|
||||
run: |
|
||||
git config --global --add safe.directory "$(realpath .)"
|
||||
status_output=$(git status --porcelain src/linux/helpers/{bootstrapper,loader}-${{ matrix.arch }}.bin)
|
||||
if [ -n "$status_output" ]; then
|
||||
echo "Unexpected changes detected:"
|
||||
echo "$status_output"
|
||||
echo "Diff:"
|
||||
git diff
|
||||
exit 1
|
||||
else
|
||||
echo "No unexpected changes detected."
|
||||
fi
|
||||
+10
-4
@@ -1,12 +1,18 @@
|
||||
*.user
|
||||
/lib/xnu/build/
|
||||
/lib/xnu/FridaKernelAgent.xcodeproj/project.xcworkspace/xcuserdata/
|
||||
/lib/xnu/FridaKernelAgent.xcodeproj/xcuserdata/
|
||||
/build/
|
||||
/deps/
|
||||
/src/barebone/helpers/memory-scanner/target/
|
||||
/src/barebone/helpers/target/
|
||||
/src/barebone/node_modules/
|
||||
/src/barebone/script-runtime.js
|
||||
/src/compiler/node_modules/
|
||||
/src/darwin/agent/osanalytics/node_modules/
|
||||
/src/darwin/agent/osanalytics/osanalytics.js
|
||||
/src/darwin/agent/reportcrash/node_modules/
|
||||
/src/darwin/agent/reportcrash/reportcrash.js
|
||||
/src/droidy/helper/build/
|
||||
/src/fruity/helpers/build/
|
||||
/src/linux/agent/system-server/node_modules/
|
||||
/src/linux/agent/system-server/system-server.js
|
||||
/src/linux/helpers/build/
|
||||
/src/linux/helpers/ext/
|
||||
/subprojects/*
|
||||
@@ -0,0 +1,3 @@
|
||||
[submodule "releng"]
|
||||
path = releng
|
||||
url = https://github.com/frida/releng.git
|
||||
@@ -0,0 +1,6 @@
|
||||
all: .DEFAULT
|
||||
|
||||
.DEFAULT:
|
||||
@gmake ${.MAKEFLAGS} ${.TARGETS}
|
||||
|
||||
.PHONY: all
|
||||
@@ -0,0 +1,16 @@
|
||||
PYTHON ?= $(shell which python3 >/dev/null && echo python3 || echo python)
|
||||
|
||||
all $(MAKECMDGOALS):
|
||||
@$(PYTHON) \
|
||||
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_make import main; main()" \
|
||||
"$(shell pwd)" \
|
||||
./build \
|
||||
$(MAKECMDGOALS)
|
||||
|
||||
git-submodules:
|
||||
@if [ ! -f releng/meson/meson.py ]; then \
|
||||
git submodule update --init --recursive --depth 1; \
|
||||
fi
|
||||
-include git-submodules
|
||||
|
||||
.PHONY: all $(MAKECMDGOALS)
|
||||
+669
@@ -0,0 +1,669 @@
|
||||
from __future__ import annotations
|
||||
import argparse
|
||||
import base64
|
||||
from collections import OrderedDict
|
||||
from dataclasses import dataclass, field
|
||||
import itertools
|
||||
import locale
|
||||
import os
|
||||
from pathlib import Path
|
||||
import pickle
|
||||
import platform
|
||||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import traceback
|
||||
from typing import Any, Literal, Mapping, Optional, Sequence, Tuple
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
NINJA = os.environ.get("NINJA", "ninja")
|
||||
|
||||
|
||||
Role = Literal["project", "subproject"]
|
||||
|
||||
|
||||
def main(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
subparsers = parser.add_subparsers()
|
||||
|
||||
command = subparsers.add_parser("setup", help="setup everything needed to compile")
|
||||
command.add_argument("role", help="project vs subproject", choices=["project", "subproject"])
|
||||
command.add_argument("builddir", help="build directory", type=Path)
|
||||
command.add_argument("top_builddir", help="top build directory", type=Path)
|
||||
command.add_argument("frida_version", help="the Frida version")
|
||||
command.add_argument("host_os", help="operating system binaries are being built for")
|
||||
command.add_argument("host_arch", help="architecture binaries are being built for")
|
||||
command.add_argument("host_config", help="configuration binaries are being built for")
|
||||
command.add_argument("compat", help="support for targets with a different architecture",
|
||||
type=parse_compat_option_value)
|
||||
command.add_argument("assets", help="whether assets are embedded vs installed and loaded at runtime")
|
||||
command.add_argument("components", help="which components will be built",
|
||||
type=parse_array_option_value)
|
||||
command.add_argument("compilers", help="compiler command arrays", nargs="+")
|
||||
command.set_defaults(func=lambda args: setup(args.role,
|
||||
args.builddir,
|
||||
args.top_builddir,
|
||||
args.frida_version,
|
||||
args.host_os,
|
||||
args.host_arch,
|
||||
args.host_config if args.host_config else None,
|
||||
args.compat,
|
||||
args.assets,
|
||||
args.components,
|
||||
parse_compilers(args.compilers)))
|
||||
|
||||
command = subparsers.add_parser("compile", help="compile compatibility assets")
|
||||
command.add_argument("privdir", help="directory to store intermediate files", type=Path)
|
||||
command.add_argument("state", help="opaque state from the setup step")
|
||||
command.set_defaults(func=lambda args: compile(args.privdir, pickle.loads(base64.b64decode(args.state))))
|
||||
|
||||
args = parser.parse_args()
|
||||
if "func" in args:
|
||||
try:
|
||||
args.func(args)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(e, file=sys.stderr)
|
||||
print("Output:\n\t| " + "\n\t| ".join(e.output.strip().split("\n")), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
else:
|
||||
parser.print_usage(file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def parse_compat_option_value(v: str) -> set[str]:
|
||||
vals = parse_array_option_value(v)
|
||||
|
||||
if len(vals) > 1:
|
||||
for choice in {"auto", "disabled"}:
|
||||
if choice in vals:
|
||||
raise argparse.ArgumentTypeError(f"the compat '{choice}' choice cannot be combined with other choices")
|
||||
|
||||
return vals
|
||||
|
||||
|
||||
def parse_array_option_value(v: str) -> set[str]:
|
||||
return {v.strip() for v in v.split(",")}
|
||||
|
||||
|
||||
def parse_compilers(compilers: list[str]) -> Compilers:
|
||||
cc = pop_cmd_array_arg(compilers)
|
||||
cpp = pop_cmd_array_arg(compilers)
|
||||
return Compilers(cc, cpp)
|
||||
|
||||
|
||||
def pop_cmd_array_arg(args: list[str]) -> list[str]:
|
||||
result: list[str] = []
|
||||
first = args.pop(0)
|
||||
assert first == ">>>"
|
||||
while True:
|
||||
cur = args.pop(0)
|
||||
if cur == "<<<":
|
||||
break
|
||||
result.append(cur)
|
||||
if len(result) == 1 and not result[0]:
|
||||
return None
|
||||
return result
|
||||
|
||||
|
||||
def setup(role: Role,
|
||||
builddir: Path,
|
||||
top_builddir: Path,
|
||||
frida_version: str,
|
||||
host_os: str,
|
||||
host_arch: str,
|
||||
host_config: Optional[str],
|
||||
compat: set[str],
|
||||
assets: str,
|
||||
components: set[str],
|
||||
compilers: Compilers):
|
||||
try:
|
||||
outputs: Mapping[str, Sequence[Output]] = OrderedDict()
|
||||
|
||||
outputs[OutputGroup(arch=None)] = [Output("arch_support_bundle", "arch-support.bundle", Path("compat"), "")]
|
||||
|
||||
releng_location = query_releng_location(role)
|
||||
ensure_submodules_checked_out(releng_location)
|
||||
configure_import_path(releng_location)
|
||||
|
||||
auto_detect = "auto" in compat
|
||||
if auto_detect:
|
||||
if host_os in {"windows", "macos", "linux", "ios", "tvos", "android"}:
|
||||
summary = f"enabled by default for {host_os}-{host_arch}"
|
||||
compat = {"native", "emulated"}
|
||||
else:
|
||||
summary = f"disabled by default for {host_os}-{host_arch}"
|
||||
compat = set()
|
||||
elif "disabled" in compat:
|
||||
summary = "disabled by user"
|
||||
compat = set()
|
||||
else:
|
||||
summary = "enabled by user"
|
||||
missing: list[MissingFeature] = []
|
||||
|
||||
if "native" in compat:
|
||||
have_toolchain = True
|
||||
other_label: Optional[str] = None
|
||||
other_triplet: Optional[str] = None
|
||||
extra_environ: dict[str, str] = {}
|
||||
|
||||
if host_os == "windows" and host_arch == "x86_64" and host_config == "mingw":
|
||||
other_label = "x86"
|
||||
have_toolchain, other_triplet = detect_mingw_toolchain_for("x86")
|
||||
elif host_os == "linux" and host_arch == "x86_64" and host_config is None:
|
||||
other_label = "x86"
|
||||
other_triplet = "i686-linux-gnu"
|
||||
have_toolchain = shutil.which(other_triplet + "-gcc") is not None
|
||||
if not have_toolchain:
|
||||
with (tempfile.NamedTemporaryFile(mode="w", encoding="utf-8", suffix=".c") as probe_c,
|
||||
tempfile.NamedTemporaryFile(delete=False) as probe_executable):
|
||||
try:
|
||||
probe_c.write("int main (void) { return 0; }")
|
||||
probe_c.flush()
|
||||
p = subprocess.run(compilers.cc + ["-m32", probe_c.name, "-o", probe_executable.name],
|
||||
capture_output=True)
|
||||
if p.returncode == 0:
|
||||
extra_environ["CC"] = shlex.join(compilers.cc + ["-m32"])
|
||||
extra_environ["CXX"] = shlex.join(compilers.cpp + ["-m32"])
|
||||
have_toolchain = True
|
||||
finally:
|
||||
try:
|
||||
os.unlink(probe_executable.name)
|
||||
except:
|
||||
pass
|
||||
|
||||
if not have_toolchain:
|
||||
if not auto_detect:
|
||||
raise ToolchainNotFoundError(f"unable to locate toolchain for {other_triplet}")
|
||||
missing.append(MissingFeature(other_label, other_triplet))
|
||||
|
||||
if host_os == "windows" and host_arch == "x86_64" and have_toolchain:
|
||||
group = OutputGroup("x86", other_triplet, extra_environ)
|
||||
outputs[group] = [
|
||||
Output(identifier="helper_legacy",
|
||||
name=HELPER_FILE_WINDOWS.name,
|
||||
file=HELPER_FILE_WINDOWS,
|
||||
target=HELPER_TARGET),
|
||||
Output(identifier="agent_legacy",
|
||||
name=AGENT_FILE_WINDOWS.name,
|
||||
file=AGENT_FILE_WINDOWS,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
if "gadget" in components:
|
||||
outputs[group] += [
|
||||
Output(identifier="gadget_legacy",
|
||||
name=GADGET_FILE_WINDOWS.name,
|
||||
file=GADGET_FILE_WINDOWS,
|
||||
target=GADGET_TARGET),
|
||||
]
|
||||
|
||||
if host_os in {"macos", "ios"} and host_arch in {"arm64e", "arm64"} and host_config != "simulator":
|
||||
if host_arch == "arm64e":
|
||||
other_arch = "arm64"
|
||||
kind = "legacy"
|
||||
else:
|
||||
other_arch = "arm64e"
|
||||
kind = "modern"
|
||||
group = OutputGroup(other_arch)
|
||||
outputs[group] = [
|
||||
Output(identifier=f"helper_{kind}",
|
||||
name=f"frida-helper-{other_arch}",
|
||||
file=HELPER_FILE_UNIX,
|
||||
target=HELPER_TARGET),
|
||||
Output(identifier=f"agent_{kind}",
|
||||
name=f"frida-agent-{other_arch}.dylib",
|
||||
file=AGENT_FILE_DARWIN,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
if "gadget" in components:
|
||||
outputs[group] += [
|
||||
Output(identifier=f"gadget_{kind}",
|
||||
name=f"frida-gadget-{other_arch}.dylib",
|
||||
file=GADGET_FILE_DARWIN,
|
||||
target=GADGET_TARGET),
|
||||
]
|
||||
if "server" in components and assets == "installed":
|
||||
outputs[group] += [
|
||||
Output(identifier=f"server_{kind}",
|
||||
name=f"frida-server-{other_arch}",
|
||||
file=SERVER_FILE_UNIX,
|
||||
target=SERVER_TARGET),
|
||||
]
|
||||
|
||||
if host_os == "linux" and host_arch == "x86_64" and have_toolchain:
|
||||
group = OutputGroup("x86", other_triplet, extra_environ)
|
||||
outputs[group] = [
|
||||
Output(identifier="helper_legacy",
|
||||
name=HELPER_FILE_UNIX.name,
|
||||
file=HELPER_FILE_UNIX,
|
||||
target=HELPER_TARGET),
|
||||
Output(identifier="agent_legacy",
|
||||
name=AGENT_FILE_ELF.name,
|
||||
file=AGENT_FILE_ELF,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
if "gadget" in components:
|
||||
outputs[group] += [
|
||||
Output(identifier="gadget_legacy",
|
||||
name=GADGET_FILE_ELF.name,
|
||||
file=GADGET_FILE_ELF,
|
||||
target=GADGET_TARGET),
|
||||
]
|
||||
|
||||
if host_os == "android" and host_arch in {"arm64", "x86_64"}:
|
||||
group = OutputGroup("arm" if host_arch == "arm64" else "x86")
|
||||
outputs[group] = [
|
||||
Output(identifier="helper_legacy",
|
||||
name=HELPER_FILE_UNIX.name,
|
||||
file=HELPER_FILE_UNIX,
|
||||
target=HELPER_TARGET),
|
||||
Output(identifier="agent_legacy",
|
||||
name=AGENT_FILE_ELF.name,
|
||||
file=AGENT_FILE_ELF,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
if "gadget" in components:
|
||||
outputs[group] += [
|
||||
Output(identifier="gadget_legacy",
|
||||
name=GADGET_FILE_ELF.name,
|
||||
file=GADGET_FILE_ELF,
|
||||
target=GADGET_TARGET),
|
||||
]
|
||||
|
||||
if "emulated" in compat:
|
||||
if host_os == "windows" and host_arch == "arm64":
|
||||
for kind, emulated_arch in [("modern", "x86_64"), ("legacy", "x86")]:
|
||||
if host_config == "mingw":
|
||||
found, emulated_triplet = detect_mingw_toolchain_for(emulated_arch)
|
||||
if not found:
|
||||
if not auto_detect:
|
||||
raise ToolchainNotFoundError(f"unable to locate toolchain for {emulated_triplet}")
|
||||
missing.append(MissingFeature(emulated_arch, emulated_triplet))
|
||||
continue
|
||||
else:
|
||||
emulated_triplet = None
|
||||
outputs[OutputGroup(emulated_arch, emulated_triplet, extra_environ)] = [
|
||||
Output(identifier=f"helper_emulated_{kind}",
|
||||
name=HELPER_FILE_WINDOWS.name.replace(".exe", f"-{emulated_arch}.exe"),
|
||||
file=HELPER_FILE_WINDOWS,
|
||||
target=HELPER_TARGET),
|
||||
Output(identifier=f"agent_emulated_{kind}",
|
||||
name=AGENT_FILE_WINDOWS.name.replace(".dll", f"-{emulated_arch}.dll"),
|
||||
file=AGENT_FILE_WINDOWS,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
|
||||
if host_os == "android" and host_arch in {"x86_64", "x86"}:
|
||||
outputs[OutputGroup("arm")] = [
|
||||
Output(identifier="agent_emulated_legacy",
|
||||
name="frida-agent-arm.so",
|
||||
file=AGENT_FILE_ELF,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
if host_arch == "x86_64":
|
||||
outputs[OutputGroup("arm64")] = [
|
||||
Output(identifier="agent_emulated_modern",
|
||||
name="frida-agent-arm64.so",
|
||||
file=AGENT_FILE_ELF,
|
||||
target=AGENT_TARGET),
|
||||
]
|
||||
|
||||
raw_allowed_prebuilds = os.environ.get("FRIDA_ALLOWED_PREBUILDS")
|
||||
allowed_prebuilds = set(raw_allowed_prebuilds.split(",")) if raw_allowed_prebuilds is not None else None
|
||||
|
||||
state = State(role, builddir, top_builddir, frida_version, host_os, host_config, allowed_prebuilds, outputs)
|
||||
serialized_state = base64.b64encode(pickle.dumps(state)).decode('ascii')
|
||||
|
||||
if missing:
|
||||
summary = ", ".join([f"{m.label} disabled due to missing toolchain for {m.triplet}" for m in missing])
|
||||
variable_names, output_names = zip(*[(output.identifier, output.name) \
|
||||
for output in itertools.chain.from_iterable(outputs.values())])
|
||||
print("ok")
|
||||
print(summary)
|
||||
print(f"{','.join(variable_names)}")
|
||||
print(f"{','.join(output_names)}")
|
||||
print(DEPFILE_FILENAME)
|
||||
print(serialized_state)
|
||||
except Exception as e:
|
||||
print(f"error {e}")
|
||||
print("")
|
||||
print(traceback.format_exception(e))
|
||||
|
||||
|
||||
class ToolchainNotFoundError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Compilers:
|
||||
cc: list[str]
|
||||
cpp: list[str]
|
||||
|
||||
|
||||
@dataclass
|
||||
class State:
|
||||
role: Role
|
||||
builddir: Path
|
||||
top_builddir: Path
|
||||
frida_version: str
|
||||
host_os: str
|
||||
host_config: Optional[str]
|
||||
allowed_prebuilds: Optional[set[str]]
|
||||
outputs: Mapping[OutputGroup, Sequence[Output]]
|
||||
|
||||
|
||||
@dataclass
|
||||
class OutputGroup:
|
||||
arch: Optional[str]
|
||||
triplet: Optional[str] = None
|
||||
extra_environ: dict[str, str] = field(default_factory=dict)
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, OutputGroup):
|
||||
return other.arch == self.arch
|
||||
return False
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.arch)
|
||||
|
||||
|
||||
@dataclass
|
||||
class Output:
|
||||
identifier: str
|
||||
name: str
|
||||
file: Path
|
||||
target: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class MissingFeature:
|
||||
label: str
|
||||
triplet: str
|
||||
|
||||
|
||||
def compile(privdir: Path, state: State):
|
||||
releng_location = query_releng_location(state.role)
|
||||
subprojects = detect_relevant_subprojects(releng_location)
|
||||
if state.role == "subproject":
|
||||
grab_subprojects_from_parent(subprojects, releng_location)
|
||||
configure_import_path(releng_location)
|
||||
|
||||
from releng.env import call_meson
|
||||
from releng.machine_spec import MachineSpec
|
||||
from releng.meson_configure import configure
|
||||
from releng.meson_make import make
|
||||
|
||||
def call_internal_meson(argv, *args, **kwargs):
|
||||
if "stdout" not in kwargs and "stderr" not in kwargs:
|
||||
silenced_kwargs = {
|
||||
**kwargs,
|
||||
"stdout": subprocess.PIPE,
|
||||
"stderr": subprocess.STDOUT,
|
||||
"encoding": locale.getpreferredencoding(),
|
||||
}
|
||||
else:
|
||||
silenced_kwargs = kwargs
|
||||
return call_meson(argv, *args, **silenced_kwargs)
|
||||
|
||||
options: Optional[Sequence[str]] = None
|
||||
build_env = scrub_environment(os.environ)
|
||||
build_env["FRIDA_RELENG"] = str(releng_location)
|
||||
top_builddir = state.top_builddir
|
||||
depfile_lines = []
|
||||
for group, outputs in state.outputs.items():
|
||||
if group.arch is None:
|
||||
for o in outputs:
|
||||
(state.builddir / o.name).write_bytes(b"")
|
||||
continue
|
||||
|
||||
workdir = (privdir / group.arch).resolve()
|
||||
|
||||
if not (workdir / "build.ninja").exists():
|
||||
if options is None:
|
||||
options = load_meson_options(top_builddir, state.role, set(subprojects.keys()))
|
||||
version_opt = next((opt for opt in options if opt.startswith("-Dfrida_version=")), None)
|
||||
if version_opt is None:
|
||||
options += [f"-Dfrida_version={state.frida_version}"]
|
||||
|
||||
host_machine = MachineSpec(state.host_os, group.arch, state.host_config, group.triplet)
|
||||
|
||||
configure(sourcedir=REPO_ROOT,
|
||||
builddir=workdir,
|
||||
host_machine=host_machine,
|
||||
environ={**build_env, **group.extra_environ},
|
||||
allowed_prebuilds=state.allowed_prebuilds,
|
||||
extra_meson_options=[
|
||||
"-Dcompiler_backend=disabled",
|
||||
"-Dhelper_modern=",
|
||||
"-Dhelper_legacy=",
|
||||
"-Dagent_modern=",
|
||||
"-Dagent_legacy=",
|
||||
"-Dagent_emulated_modern=",
|
||||
"-Dagent_emulated_legacy=",
|
||||
*options,
|
||||
],
|
||||
call_meson=call_internal_meson,
|
||||
on_progress=lambda progress: None)
|
||||
|
||||
make(sourcedir=REPO_ROOT,
|
||||
builddir=workdir,
|
||||
targets=[o.target for o in outputs],
|
||||
environ=build_env,
|
||||
call_meson=call_internal_meson)
|
||||
|
||||
for o in outputs:
|
||||
shutil.copy(workdir / o.file, state.builddir / o.name)
|
||||
|
||||
output_relpath = (workdir / o.name).relative_to(top_builddir).as_posix()
|
||||
input_paths = shlex.split(subprocess.run([NINJA, "-t", "inputs", o.file],
|
||||
cwd=workdir,
|
||||
capture_output=True,
|
||||
encoding="utf-8",
|
||||
check=True).stdout)
|
||||
input_entries = []
|
||||
for raw_path in input_paths:
|
||||
path = Path(raw_path)
|
||||
if not path.is_absolute():
|
||||
path = Path(os.path.relpath(workdir / path, top_builddir))
|
||||
input_entries.append(escape_depfile_path(path.as_posix()))
|
||||
depfile_lines.append(f"{output_relpath}: {' '.join(input_entries)}")
|
||||
|
||||
(state.builddir / DEPFILE_FILENAME).write_text("\n".join(depfile_lines), encoding="utf-8")
|
||||
|
||||
|
||||
def load_meson_options(top_builddir: Path,
|
||||
role: Role,
|
||||
subprojects: set[str]) -> Sequence[str]:
|
||||
from mesonbuild import coredata
|
||||
|
||||
return [f"-D{adapt_key(k, role)}={v.value}" for k, v in coredata.load(top_builddir).options.items()
|
||||
if option_should_be_forwarded(k, v, role, subprojects)]
|
||||
|
||||
|
||||
def adapt_key(k: "OptionKey", role: Role) -> "OptionKey":
|
||||
if role == "subproject" and k.subproject == "frida-core":
|
||||
return k.as_root()
|
||||
return k
|
||||
|
||||
|
||||
def option_should_be_forwarded(k: "OptionKey",
|
||||
v: "coredata.UserOption[Any]",
|
||||
role: Role,
|
||||
subprojects: set[str]) -> bool:
|
||||
from mesonbuild import coredata
|
||||
|
||||
our_project_id = "frida-core" if role == "subproject" else ""
|
||||
is_for_us = k.subproject == our_project_id
|
||||
is_for_child = k.subproject in subprojects
|
||||
|
||||
if k.is_project():
|
||||
if is_for_us:
|
||||
if k.name == "compiler_backend":
|
||||
return False
|
||||
tokens = k.name.split("_")
|
||||
if tokens[0] in {"helper", "agent"} and tokens[-1] in {"modern", "legacy"}:
|
||||
return False
|
||||
if k.subproject and k.machine is not coredata.MachineChoice.HOST:
|
||||
return False
|
||||
return is_for_us or is_for_child
|
||||
|
||||
if coredata.CoreData.is_per_machine_option(k):
|
||||
return k.machine is coredata.MachineChoice.BUILD
|
||||
|
||||
if k.is_builtin():
|
||||
if k.name in {"buildtype", "genvslite"}:
|
||||
return False
|
||||
if not str(v.value):
|
||||
return False
|
||||
if not is_for_child and role == "subproject" and k.subproject in {"", our_project_id}:
|
||||
if not coredata.BUILTIN_OPTIONS[k.as_root()].yielding:
|
||||
return k.subproject == our_project_id
|
||||
return True
|
||||
|
||||
if k.module == "python":
|
||||
if k.name == "install_env" and v.value == "prefix":
|
||||
return False
|
||||
if not str(v.value):
|
||||
return False
|
||||
|
||||
return is_for_us or is_for_child
|
||||
|
||||
|
||||
def scrub_environment(env: Mapping[str, str]) -> Mapping[str, str]:
|
||||
from releng.env import TOOLCHAIN_ENVVARS
|
||||
clean_env = OrderedDict()
|
||||
envvars_to_avoid = {*TOOLCHAIN_ENVVARS, *MSVS_ENVVARS}
|
||||
for k, v in env.items():
|
||||
if k in envvars_to_avoid:
|
||||
continue
|
||||
if k.upper() == "PATH" and platform.system() == "Windows":
|
||||
v = scrub_windows_devenv_dirs_from_path(v, env)
|
||||
clean_env[k] = v
|
||||
return clean_env
|
||||
|
||||
|
||||
def scrub_windows_devenv_dirs_from_path(raw_path: str, env: Mapping[str, str]) -> str:
|
||||
raw_vcinstalldir = env.get("VCINSTALLDIR")
|
||||
if raw_vcinstalldir is None:
|
||||
return raw_path
|
||||
vcinstalldir = Path(raw_vcinstalldir)
|
||||
clean_entries = []
|
||||
for raw_entry in raw_path.split(";"):
|
||||
entry = Path(raw_entry)
|
||||
if entry.is_relative_to(vcinstalldir):
|
||||
continue
|
||||
if "WINDOWS KITS" in [p.upper() for p in entry.parts]:
|
||||
continue
|
||||
clean_entries.append(raw_entry)
|
||||
return ";".join(clean_entries)
|
||||
|
||||
|
||||
def escape_depfile_path(path: str) -> str:
|
||||
return path.replace(" ", "\\ ")
|
||||
|
||||
|
||||
def query_releng_location(role: Role) -> Path:
|
||||
if role == "subproject":
|
||||
candidate = REPO_ROOT.parent.parent / "releng"
|
||||
if candidate.exists():
|
||||
return candidate
|
||||
return REPO_ROOT / "releng"
|
||||
|
||||
|
||||
def ensure_submodules_checked_out(releng_location: Path):
|
||||
if not (releng_location / "meson" / "meson.py").exists():
|
||||
subprocess.run(["git", "submodule", "update", "--init", "--recursive", "--depth", "1", "releng"],
|
||||
cwd=releng_location.parent,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
encoding="utf-8",
|
||||
check=True)
|
||||
|
||||
|
||||
def detect_relevant_subprojects(releng_location: Path) -> dict[str, Path]:
|
||||
subprojects = detect_relevant_subprojects_in(REPO_ROOT, releng_location)
|
||||
gum_location = subprojects.get("frida-gum")
|
||||
if gum_location is not None:
|
||||
subprojects.update(detect_relevant_subprojects_in(gum_location, releng_location))
|
||||
return subprojects
|
||||
|
||||
|
||||
def detect_relevant_subprojects_in(repo_root: Path, releng_location: Path) -> dict[str, Path]:
|
||||
result = {}
|
||||
for f in (repo_root / "subprojects").glob("*.wrap"):
|
||||
name = f.stem
|
||||
location = releng_location.parent / "subprojects" / name
|
||||
if location.exists():
|
||||
result[name] = location
|
||||
return result
|
||||
|
||||
|
||||
def grab_subprojects_from_parent(subprojects: dict[str, Path], releng_location: Path):
|
||||
for name, location in subprojects.items():
|
||||
subp_here = REPO_ROOT / "subprojects" / name
|
||||
if subp_here.exists():
|
||||
continue
|
||||
|
||||
try:
|
||||
subp_here.symlink_to(Path("..") / ".." / name, target_is_directory=True)
|
||||
continue
|
||||
except OSError as e:
|
||||
if not getattr(e, "winerror", None) == 1314:
|
||||
raise e
|
||||
|
||||
subprocess.run(["git", "worktree", "add", subp_here],
|
||||
cwd=location,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
encoding="utf-8",
|
||||
check=True)
|
||||
|
||||
|
||||
def configure_import_path(releng_location: Path):
|
||||
sys.path.insert(0, str(releng_location / "meson"))
|
||||
sys.path.insert(0, str(releng_location.parent))
|
||||
|
||||
|
||||
def detect_mingw_toolchain_for(arch: str) -> Tuple[bool, Optional[str]]:
|
||||
triplet = MINGW_ARCHS.get(arch, arch) + "-w64-mingw32"
|
||||
found = shutil.which(triplet + "-gcc") is not None
|
||||
return (found, triplet)
|
||||
|
||||
|
||||
STATE_FILENAME = "state.dat"
|
||||
DEPFILE_FILENAME = "compat.deps"
|
||||
|
||||
HELPER_TARGET = "frida-helper"
|
||||
HELPER_FILE_WINDOWS = Path("src") / "frida-helper.exe"
|
||||
HELPER_FILE_UNIX = Path("src") / "frida-helper"
|
||||
|
||||
AGENT_TARGET = "frida-agent"
|
||||
AGENT_FILE_WINDOWS = Path("lib") / "agent" / "frida-agent.dll"
|
||||
AGENT_FILE_DARWIN = Path("lib") / "agent" / "frida-agent.dylib"
|
||||
AGENT_FILE_ELF = Path("lib") / "agent" / "frida-agent.so"
|
||||
|
||||
GADGET_TARGET = "frida-gadget"
|
||||
GADGET_FILE_WINDOWS = Path("lib") / "gadget" / "frida-gadget.dll"
|
||||
GADGET_FILE_DARWIN = Path("lib") / "gadget" / "frida-gadget.dylib"
|
||||
GADGET_FILE_ELF = Path("lib") / "gadget" / "frida-gadget.so"
|
||||
|
||||
SERVER_TARGET = "frida-server"
|
||||
SERVER_FILE_UNIX = Path("server") / "frida-server"
|
||||
|
||||
MSVS_ENVVARS = {
|
||||
"PLATFORM",
|
||||
"VCINSTALLDIR",
|
||||
"INCLUDE",
|
||||
"LIB",
|
||||
}
|
||||
|
||||
MINGW_ARCHS = {
|
||||
"x86": "i686",
|
||||
"arm64": "aarch64",
|
||||
}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
@@ -0,0 +1,122 @@
|
||||
helper_modern = get_option('helper_modern')
|
||||
helper_legacy = get_option('helper_legacy')
|
||||
helper_compat = ''
|
||||
helper_emulated_modern = get_option('helper_emulated_modern')
|
||||
helper_emulated_legacy = get_option('helper_emulated_legacy')
|
||||
helper_depends = []
|
||||
|
||||
agent_modern = get_option('agent_modern')
|
||||
agent_legacy = get_option('agent_legacy')
|
||||
agent_compat = ''
|
||||
agent_emulated_modern = get_option('agent_emulated_modern')
|
||||
agent_emulated_legacy = get_option('agent_emulated_legacy')
|
||||
agent_depends = []
|
||||
|
||||
gadget_compat = ''
|
||||
gadget_depends = []
|
||||
|
||||
server_compat = ''
|
||||
server_depends = []
|
||||
|
||||
no_overridden_compat_bits = \
|
||||
helper_modern == 'auto' and helper_legacy == 'auto' \
|
||||
and helper_emulated_modern == 'auto' and helper_emulated_legacy == 'auto' \
|
||||
and agent_modern == 'auto' and agent_legacy == 'auto' \
|
||||
and agent_emulated_modern == 'auto' and agent_emulated_legacy == 'auto'
|
||||
|
||||
if no_overridden_compat_bits
|
||||
build_py = [python, files('build.py')]
|
||||
|
||||
components = []
|
||||
if build_gadget
|
||||
components += 'gadget'
|
||||
endif
|
||||
if build_server
|
||||
components += 'server'
|
||||
endif
|
||||
|
||||
setup_result = run_command(build_py,
|
||||
'setup',
|
||||
meson.is_subproject() ? 'subproject' : 'project',
|
||||
meson.current_build_dir(),
|
||||
meson.global_build_root(),
|
||||
frida_version,
|
||||
host_os,
|
||||
host_abi,
|
||||
host_config,
|
||||
','.join(get_option('compat')),
|
||||
get_option('assets'),
|
||||
','.join(components),
|
||||
'--',
|
||||
'>>>', cc.cmd_array(), '<<<',
|
||||
'>>>', cpp.cmd_array(), '<<<',
|
||||
check: true
|
||||
)
|
||||
setup_output = setup_result.stdout().strip()
|
||||
if setup_output.startswith('error ')
|
||||
error('compat/build.py setup failed:', setup_output.substring(6))
|
||||
endif
|
||||
lines = setup_output.split('\n')
|
||||
assert(lines[0] == 'ok')
|
||||
compat_summary = lines[1]
|
||||
varnames = lines[2].split(',')
|
||||
outputs = lines[3].split(',')
|
||||
depfile = lines[4]
|
||||
state = lines[5]
|
||||
|
||||
if host_os_family == 'darwin'
|
||||
install = false
|
||||
install_dir = asset_dir
|
||||
else
|
||||
install = true
|
||||
install_dir = []
|
||||
foreach varname : varnames
|
||||
if varname != 'arch_support_bundle' and (get_option('assets') == 'installed' or varname.startswith('gadget_'))
|
||||
install_dir += varname.endswith('_modern') ? asset_dir_modern : asset_dir_legacy
|
||||
else
|
||||
install_dir += false
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
||||
arch_support = custom_target('arch-support',
|
||||
output: outputs,
|
||||
command: [
|
||||
build_py,
|
||||
'compile',
|
||||
'@PRIVATE_DIR@',
|
||||
state,
|
||||
],
|
||||
depfile: depfile,
|
||||
install: install,
|
||||
install_dir: install_dir,
|
||||
)
|
||||
|
||||
i = 0
|
||||
foreach output : arch_support.to_list()
|
||||
outpath = output.full_path()
|
||||
varname = varnames[i]
|
||||
|
||||
set_variable(varname, outpath)
|
||||
|
||||
if varname.startswith('helper_')
|
||||
helper_compat = outpath
|
||||
helper_depends += arch_support
|
||||
elif varname.startswith('agent_')
|
||||
agent_compat = outpath
|
||||
agent_depends += arch_support
|
||||
elif varname.startswith('gadget_')
|
||||
gadget_compat = outpath
|
||||
gadget_depends += arch_support
|
||||
elif varname.startswith('server_')
|
||||
server_compat = outpath
|
||||
server_depends += arch_support
|
||||
elif varname != 'arch_support_bundle'
|
||||
assert(false, f'unexpected variable name: @varname@')
|
||||
endif
|
||||
|
||||
i += 1
|
||||
endforeach
|
||||
else
|
||||
compat_summary = 'not available due to externally provided helper/agent assets'
|
||||
endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$PYTHON" ] && PYTHON=$(which python3 >/dev/null && echo python3 || echo python)
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
srcroot=$(pwd)
|
||||
|
||||
if [ ! -f releng/meson/meson.py ]; then
|
||||
git submodule update --init --recursive --depth 1 || exit $?
|
||||
fi
|
||||
|
||||
cd - >/dev/null
|
||||
|
||||
exec "$PYTHON" \
|
||||
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_configure import main; main()" \
|
||||
"$srcroot" \
|
||||
"$@"
|
||||
@@ -0,0 +1,22 @@
|
||||
@setlocal
|
||||
@echo off
|
||||
rem:: Based on: https://github.com/microsoft/terminal/issues/217#issuecomment-737594785
|
||||
goto :_start_
|
||||
|
||||
:set_real_dp0
|
||||
set dp0=%~dp0
|
||||
set "dp0=%dp0:~0,-1%"
|
||||
goto :eof
|
||||
|
||||
:_start_
|
||||
call :set_real_dp0
|
||||
|
||||
if not exist "%dp0%\releng\meson\meson.py" (
|
||||
pushd "%dp0%" & git submodule update --init --recursive --depth 1 & popd
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
)
|
||||
|
||||
endlocal & goto #_undefined_# 2>nul || title %COMSPEC% & python ^
|
||||
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_configure import main; main()" ^
|
||||
"%dp0%" ^
|
||||
%*
|
||||
@@ -1,949 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B7DC9B02-A5FF-4AA1-B2A2-DC1653168D44}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>frida-base-32.lib;frida-pipe-32.lib;frida-helper-backend-32.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-32.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;$(IntDir)..\gum-32;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>frida-base-32.lib;frida-pipe-32.lib;frida-helper-backend-32.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-32.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-helper-backend-32;$(IntDir)..\gum-32;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>frida-base-64.lib;frida-pipe-64.lib;frida-helper-backend-64.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-64.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;$(IntDir)..\gum-64;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;$(IntDir)data;$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>frida-base-64.lib;frida-pipe-64.lib;frida-helper-backend-64.lib;$(IntDir)data\frida-data-compiler-blob.obj;$(IntDir)data\frida-data-helper-blob.obj;$(IntDir)data\frida-data-agent-blob.obj;$(IntDir)data\frida-data-barebone-blob.obj;gum-64.lib;gumjs-inspector.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-helper-backend-64;$(IntDir)..\gum-64;$(IntDir)..\gumjs-inspector;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="src\helper.resources">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Helper resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\windows.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Helper resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\windows.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Helper resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\windows.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Helper resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\windows.stamp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
|
||||
REM. > "$(IntDir)data\windows.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
|
||||
REM. > "$(IntDir)data\windows.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
|
||||
REM. > "$(IntDir)data\windows.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\helper.resources" -o "$(IntDir)data\frida-data-helper" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-helper-32\frida-helper-32.exe" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-helper-64\frida-helper-64.exe" || exit 1
|
||||
REM. > "$(IntDir)data\windows.stamp"
|
||||
</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\agent.resources">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll;$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll;$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll;$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Agent resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\agent.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Agent resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\agent.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Agent resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\agent.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Agent resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\agent.stamp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
|
||||
REM. > "$(IntDir)data\agent.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
|
||||
REM. > "$(IntDir)data\agent.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
|
||||
REM. > "$(IntDir)data\agent.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\agent.resources" -o "$(IntDir)data\frida-data-agent" "$(SolutionDir)build\tmp-windows\Win32-$(ConfigurationName)\frida-agent-32\frida-agent-32.dll" "$(SolutionDir)build\tmp-windows\x64-$(ConfigurationName)\frida-agent-64\frida-agent-64.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-32.dll" "$(SolutionDir)frida-gum\ext\dbghelp\dbghelp-64.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-32.dll" "$(SolutionDir)frida-gum\ext\symsrv\symsrv-64.dll" || exit 1
|
||||
REM. > "$(IntDir)data\agent.stamp"
|
||||
</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\frida.vala">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
mkdir "$(IntDir)src" 2>NUL
|
||||
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
|
||||
mkdir "$(IntDir)api" 2>NUL
|
||||
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-32\frida-base.vapi" "$(IntDir)..\frida-base-32\frida-base.h" "$(IntDir)api"
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
mkdir "$(IntDir)src" 2>NUL
|
||||
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
|
||||
mkdir "$(IntDir)api" 2>NUL
|
||||
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-64\frida-base.vapi" "$(IntDir)..\frida-base-64\frida-base.h" "$(IntDir)api"
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mkdir "$(IntDir)data" 2>NUL
|
||||
mkdir "$(IntDir)src" 2>NUL
|
||||
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
|
||||
mkdir "$(IntDir)api" 2>NUL
|
||||
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-32\frida-base.vapi" "$(IntDir)..\frida-base-32\frida-base.h" "$(IntDir)api"
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mkdir "$(IntDir)data" 2>NUL
|
||||
mkdir "$(IntDir)src" 2>NUL
|
||||
"$(ValaCompiler)" src/frida.vala src/control-service.vala src/portal-service.vala src/host-session-service.vala src/agent-container.vala src/gdb.vala src/system.vala src/compiler/compiler.vala src/file-monitor.vala src/async-task.vala src/windows/windows-host-session.vala src/windows/winjector.vala src/windows/frida-helper-process.vala src/socket/socket-host-session.vala src/fruity/fruity-host-session.vala src/fruity/dtx.vala src/fruity/lockdown.vala src/fruity/installation-proxy.vala src/fruity/springboard-services.vala src/fruity/lldb.vala src/fruity/injector.vala src/fruity/usbmux.vala src/fruity/keyed-archive.vala src/fruity/plist.vala src/fruity/plist-service.vala src/droidy/droidy-host-session.vala src/droidy/droidy-client.vala src/droidy/jdwp.vala src/droidy/injector.vala src/droidy/axml.vala src/barebone/barebone-host-session.vala src/barebone/script.vala src/barebone/machine.vala src/barebone/allocator.vala src/barebone/callback.vala src/barebone/memory-scanner.vala src/barebone/interceptor.vala src/barebone/rust-module.vala src/barebone/arch-x86/machine.vala src/barebone/arch-x86_64/machine.vala src/barebone/arch-arm/machine.vala src/barebone/arch-arm64/machine.vala src/barebone/arch-unknown/machine.vala --ccode --directory=$(IntDir) --library=frida-core --gir=Frida-1.0.gir --header=$(IntDir)frida-core.h --symbols=$(IntDir)frida-core.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" --vapidir="$(IntDir)data" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gmodule-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=libsoup-3.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-inspector-1.0 --pkg=libbrotlidec --pkg=quickjs --pkg=frida-base --pkg=frida-pipe --pkg=frida-helper-backend --pkg=frida-data-compiler --pkg=frida-data-helper --pkg=frida-data-agent --pkg=frida-data-barebone || exit 1
|
||||
mkdir "$(IntDir)api" 2>NUL
|
||||
$(Python) "$(ProjectDir)src\api\generate.py" 1.0 "$(IntDir)frida-core.vapi" "$(IntDir)frida-core.h" "$(IntDir)..\frida-base-64\frida-base.vapi" "$(IntDir)..\frida-base-64\frida-base.h" "$(IntDir)api"
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);$(ProjectDir)src\control-service.vala;$(ProjectDir)src\portal-service.vala;$(ProjectDir)src\host-session-service.vala;$(ProjectDir)src\agent-container.vala;$(ProjectDir)src\gdb.vala;$(ProjectDir)src\system.vala;$(ProjectDir)src\compiler\compiler.vala;$(ProjectDir)src\file-monitor.vala;$(ProjectDir)src\async-task.vala;$(ProjectDir)src\windows\windows-host-session.vala;$(ProjectDir)src\windows\winjector.vala;$(ProjectDir)src\windows\frida-helper-process.vala;$(ProjectDir)src\socket\socket-host-session.vala;$(ProjectDir)src\fruity\fruity-host-session.vala;$(ProjectDir)src\fruity\dtx.vala;$(ProjectDir)src\fruity\lockdown.vala;$(ProjectDir)src\fruity\installation-proxy.vala;$(ProjectDir)src\fruity\springboard-services.vala;$(ProjectDir)src\fruity\lldb.vala;$(ProjectDir)src\fruity\injector.vala;$(ProjectDir)src\fruity\usbmux.vala;$(ProjectDir)src\fruity\keyed-archive.vala;$(ProjectDir)src\fruity\plist.vala;$(ProjectDir)src\fruity\plist-service.vala;$(ProjectDir)src\droidy\droidy-host-session.vala;$(ProjectDir)src\droidy\droidy-client.vala;$(ProjectDir)src\droidy\jdwp.vala;$(ProjectDir)src\droidy\injector.vala;$(ProjectDir)src\droidy\axml.vala;$(ProjectDir)src\barebone\barebone-host-session.vala;$(ProjectDir)src\barebone\script.vala;$(ProjectDir)src\barebone\machine.vala;$(ProjectDir)src\barebone\allocator.vala;$(ProjectDir)src\barebone\callback.vala;$(ProjectDir)src\barebone\memory-scanner.vala;$(ProjectDir)src\barebone\interceptor.vala;$(ProjectDir)src\barebone\rust-module.vala;$(ProjectDir)src\barebone\arch-x86\machine.vala;$(ProjectDir)src\barebone\arch-x86_64\machine.vala;$(ProjectDir)src\barebone\arch-arm\machine.vala;$(ProjectDir)src\barebone\arch-arm64\machine.vala;$(ProjectDir)src\barebone\arch-unknown\machine.vala;$(IntDir)data\compiler.stamp;$(IntDir)data\windows.stamp;$(IntDir)data\agent.stamp;$(IntDir)data\barebone.stamp;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\compiler\compiler.resources">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\compiler\generate-agent.py;src\compiler\agent-entrypoint.js;src\compiler\agent-core.ts;src\compiler\agent-warmup.js;src\compiler\package.json;src\compiler\package-lock.json;src\compiler\tsconfig.json;src\compiler\rollup.config.agent-core.ts;src\compiler\rollup.config.typescript.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing compiler resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\compiler.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing compiler resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\compiler.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing compiler resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\compiler.stamp</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing compiler resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\compiler.stamp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if $(ProcessorArchitecture)==amd64 (
|
||||
set host_arch=x64
|
||||
set cpu_mode=64
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
|
||||
) else (
|
||||
set host_arch=ia32
|
||||
set cpu_mode=32
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
|
||||
)
|
||||
if $(Configuration)==Debug (
|
||||
set v8_mksnapshot=""
|
||||
)
|
||||
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
|
||||
REM. > "$(IntDir)data\compiler.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if $(ProcessorArchitecture)==amd64 (
|
||||
set host_arch=x64
|
||||
set cpu_mode=64
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
|
||||
) else (
|
||||
set host_arch=ia32
|
||||
set cpu_mode=32
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
|
||||
)
|
||||
if $(Configuration)==Debug (
|
||||
set v8_mksnapshot=""
|
||||
)
|
||||
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
|
||||
REM. > "$(IntDir)data\compiler.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">if $(ProcessorArchitecture)==amd64 (
|
||||
set host_arch=x64
|
||||
set cpu_mode=64
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
|
||||
) else (
|
||||
set host_arch=ia32
|
||||
set cpu_mode=32
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
|
||||
)
|
||||
if $(Configuration)==Debug (
|
||||
set v8_mksnapshot=""
|
||||
)
|
||||
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
|
||||
REM. > "$(IntDir)data\compiler.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">if $(ProcessorArchitecture)==amd64 (
|
||||
set host_arch=x64
|
||||
set cpu_mode=64
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\x64-Release\bin\windows-x86_64\v8-mksnapshot-windows-x86_64.exe
|
||||
) else (
|
||||
set host_arch=ia32
|
||||
set cpu_mode=32
|
||||
set v8_mksnapshot=$(SolutionDir)build\sdk-windows\Win32-Release\bin\windows-x86\v8-mksnapshot-windows-x86.exe
|
||||
)
|
||||
if $(Configuration)==Debug (
|
||||
set v8_mksnapshot=""
|
||||
)
|
||||
$(Python) src\compiler\generate-agent.py src\compiler "$(IntDir)src\compiler" windows %host_arch% %cpu_mode% %v8_mksnapshot% || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\compiler\compiler.resources" -o "$(IntDir)data\frida-data-compiler" "$(IntDir)src\compiler\agent.js" "$(IntDir)src\compiler\snapshot.bin" || exit 1
|
||||
REM. > "$(IntDir)data\compiler.stamp"
|
||||
</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\barebone\barebone.resources">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
|
||||
REM. > "$(IntDir)data\barebone.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
|
||||
REM. > "$(IntDir)data\barebone.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
|
||||
REM. > "$(IntDir)data\barebone.stamp"
|
||||
</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Python) src\barebone\generate-script-runtime.py src\barebone "$(IntDir)src\barebone" || exit 1
|
||||
mkdir "$(IntDir)data" 2>NUL
|
||||
"$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe" -m $(PlatformTarget) -c "$(ProjectDir)src\barebone\barebone.resources" -o "$(IntDir)data\frida-data-barebone" "$(IntDir)src\barebone\script-runtime.js" src\barebone\helpers\memory-scanner-arm64.elf || exit 1
|
||||
REM. > "$(IntDir)data\barebone.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Serializing Barebone resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\barebone.stamp</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Serializing Barebone resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\barebone.stamp</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Serializing Barebone resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\barebone.stamp</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Serializing Barebone resources</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\barebone.stamp</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)..\frida-resource-compiler\frida-resource-compiler.exe;src\barebone\generate-script-runtime.py;src\barebone\package.json;src\barebone\package-lock.json;src\barebone\script-runtime\console.ts;src\barebone\script-runtime\entrypoint.ts;src\barebone\script-runtime\gdb.ts;src\barebone\script-runtime\hexdump.ts;src\barebone\script-runtime\message-dispatcher.ts;src\barebone\script-runtime\primitives.ts;%(AdditionalInputs)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<None Include="src\control-service.vala" />
|
||||
<None Include="src\portal-service.vala" />
|
||||
<None Include="src\host-session-service.vala" />
|
||||
<None Include="src\agent-container.vala" />
|
||||
<None Include="src\gdb.vala" />
|
||||
<None Include="src\system.vala" />
|
||||
<None Include="src\compiler\compiler.vala" />
|
||||
<None Include="src\file-monitor.vala" />
|
||||
<None Include="src\async-task.vala" />
|
||||
<None Include="src\windows\windows-host-session.vala" />
|
||||
<None Include="src\windows\winjector.vala" />
|
||||
<None Include="src\windows\frida-helper-process.vala" />
|
||||
<None Include="src\socket\socket-host-session.vala" />
|
||||
<None Include="src\fruity\fruity-host-session.vala" />
|
||||
<None Include="src\fruity\dtx.vala" />
|
||||
<None Include="src\fruity\lockdown.vala" />
|
||||
<None Include="src\fruity\installation-proxy.vala" />
|
||||
<None Include="src\fruity\springboard-services.vala" />
|
||||
<None Include="src\fruity\lldb.vala" />
|
||||
<None Include="src\fruity\injector.vala" />
|
||||
<None Include="src\fruity\usbmux.vala" />
|
||||
<None Include="src\fruity\keyed-archive.vala" />
|
||||
<None Include="src\fruity\plist.vala" />
|
||||
<None Include="src\fruity\plist-service.vala" />
|
||||
<None Include="src\droidy\droidy-host-session.vala" />
|
||||
<None Include="src\droidy\droidy-client.vala" />
|
||||
<None Include="src\droidy\jdwp.vala" />
|
||||
<None Include="src\droidy\injector.vala" />
|
||||
<None Include="src\droidy\axml.vala" />
|
||||
<None Include="src\barebone\barebone-host-session.vala" />
|
||||
<None Include="src\barebone\script.vala" />
|
||||
<None Include="src\barebone\machine.vala" />
|
||||
<None Include="src\barebone\allocator.vala" />
|
||||
<None Include="src\barebone\callback.vala" />
|
||||
<None Include="src\barebone\memory-scanner.vala" />
|
||||
<None Include="src\barebone\interceptor.vala" />
|
||||
<None Include="src\barebone\rust-module.vala" />
|
||||
<None Include="src\barebone\arch-x86\machine.vala" />
|
||||
<None Include="src\barebone\arch-x86_64\machine.vala" />
|
||||
<None Include="src\barebone\arch-arm\machine.vala" />
|
||||
<None Include="src\barebone\arch-arm64\machine.vala" />
|
||||
<None Include="src\barebone\arch-unknown\machine.vala" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)src\frida.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\frida-glue.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\control-service.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\portal-service.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\host-session-service.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\agent-container.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\gdb.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\system.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\compiler\compiler.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\compiler\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\compiler\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\compiler\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\compiler\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\file-monitor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\async-task.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\windows-host-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\frida-helper-process-glue.c" />
|
||||
<ClCompile Include="src\windows\windows-host-session-glue.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\winjector.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\winjector-glue.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\frida-helper-process.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\access-helpers.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\icon-helpers.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\system-windows.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\windows\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\socket\socket-host-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\socket\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\socket\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\socket\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\socket\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\fruity-host-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\dtx.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\fruity\fruity-host-session-windows.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\lockdown.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\installation-proxy.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\springboard-services.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\lldb.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\injector.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\usbmux.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\keyed-archive.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\plist.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\plist-service.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\fruity\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\droidy-host-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\droidy-client.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\jdwp.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\injector.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\axml.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\droidy\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\barebone-host-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\script.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\allocator.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\callback.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\memory-scanner.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\interceptor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\rust-module.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-x86\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-x86\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-x86_64\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-x86_64\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-arm\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-arm\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-arm64\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-arm64\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-unknown\machine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)src\barebone\arch-unknown\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-compiler.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-helper.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-agent.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-barebone.c">
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)data\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)data\</ObjectFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\frida-gum\bindings\gumjs\gumjs-inspector.vcxproj">
|
||||
<Project>{0b28ec3c-cc22-4067-9f08-6a3fac4fb454}</Project>
|
||||
<Private>false</Private>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\agent\frida-agent-32.vcxproj">
|
||||
<Project>{b111ba27-807a-4b16-a4de-a33d7d6d7ce1}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\agent\frida-agent-64.vcxproj">
|
||||
<Project>{3194ec55-c1e5-423d-820f-13d38409b9d0}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="src\windows\frida-helper-32.vcxproj">
|
||||
<Project>{e0ac03f2-f077-4ba7-88dd-bbe95b4e4ef0}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="src\windows\frida-helper-64.vcxproj">
|
||||
<Project>{037e8466-f87b-486d-b6ad-fecb5740ce2c}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="tools\frida-resource-compiler.vcxproj">
|
||||
<Project>{81b3e411-8676-41eb-84c6-1e5307f0c5ff}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-core.h" />
|
||||
<ClInclude Include="src\windows\access-helpers.h" />
|
||||
<ClInclude Include="src\windows\frida-helper-process-glue.h" />
|
||||
<ClInclude Include="src\windows\icon-helpers.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,430 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{5871a71e-92fa-44a7-847f-91d4ad19deb0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\core">
|
||||
<UniqueIdentifier>{eef66507-e4a8-4117-87d0-a5b24833ddba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{0ddd771d-c7e1-405b-a3e6-a4433e9094db}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\windows">
|
||||
<UniqueIdentifier>{28f8e0ab-f994-4a5b-b62b-edcdcb9d0c34}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\windows">
|
||||
<UniqueIdentifier>{21f538e1-a14f-441b-9e2e-7303c1465c5b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\socket">
|
||||
<UniqueIdentifier>{d4552ab5-00ec-4394-bf75-666ac4f869a1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\socket">
|
||||
<UniqueIdentifier>{620f3726-c7dd-4d6f-8f54-ad08f2ff594a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\fruity">
|
||||
<UniqueIdentifier>{7c397a46-f5dd-401d-b3c8-423615a25619}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\fruity">
|
||||
<UniqueIdentifier>{2d5a13f8-9bcb-4d70-9f8a-9597707fc771}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\droidy">
|
||||
<UniqueIdentifier>{7c397a46-f5dd-401d-b3c8-423615a25618}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\droidy">
|
||||
<UniqueIdentifier>{2d5a13f8-9bcb-4d70-9f8a-9597707fc770}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\data">
|
||||
<UniqueIdentifier>{e441c3c0-5949-44e4-8617-0483732946e8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files\windows">
|
||||
<UniqueIdentifier>{c619adbc-c722-4220-8c57-9d40ce4e94ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\compiler">
|
||||
<UniqueIdentifier>{440a7aec-8571-44e1-b100-6983d61a26ef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\compiler">
|
||||
<UniqueIdentifier>{977f662a-1dea-4141-b63c-a71768cc07cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files\compiler">
|
||||
<UniqueIdentifier>{56aeb7fc-6443-41fd-8bad-d5e3dd174f5c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone">
|
||||
<UniqueIdentifier>{8095dacf-9529-4daf-9fa7-124a0dbd8c8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone\arch-arm64">
|
||||
<UniqueIdentifier>{5eb2dd88-94b6-46fb-bb45-04a18223ffa4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files\barebone">
|
||||
<UniqueIdentifier>{7543fdf8-bcba-4faf-b776-ba8c60b43ea6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone">
|
||||
<UniqueIdentifier>{ee876d25-94c0-4b08-b62e-542701f53a5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone\arch-arm">
|
||||
<UniqueIdentifier>{a44b2b16-0f6e-4a59-ace2-5eafb5842cd3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone\arch-unknown">
|
||||
<UniqueIdentifier>{732196c7-efbb-467b-9a46-1b893a3ec1cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone\arch-x86_64">
|
||||
<UniqueIdentifier>{890a4566-74ae-4d0a-a479-7e45580171db}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone\arch-arm64">
|
||||
<UniqueIdentifier>{e062def2-897c-47e2-bde1-74b23a6066a8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated\barebone\arch-x86">
|
||||
<UniqueIdentifier>{6408ed39-33ab-461c-b887-a8da9e80ba2b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone\arch-arm">
|
||||
<UniqueIdentifier>{98bd47cd-d261-4776-942b-1a40a30bc3ff}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone\arch-x86">
|
||||
<UniqueIdentifier>{fe48f50a-d564-4618-bbd3-813d5b7a79cb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone\arch-unknown">
|
||||
<UniqueIdentifier>{0e4c39a3-82f0-4034-af21-3f787d114fe6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\barebone\arch-x86_64">
|
||||
<UniqueIdentifier>{abc9ec18-ef36-4200-ac4c-1dcba33f5db5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="src\helper.resources">
|
||||
<Filter>Resource Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\agent.resources">
|
||||
<Filter>Resource Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\frida.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
<None Include="src\host-session-service.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\agent-container.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\gdb.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\system.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\windows\windows-host-session.vala">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</None>
|
||||
<None Include="src\windows\winjector.vala">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</None>
|
||||
<None Include="src\windows\frida-helper-process.vala">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</None>
|
||||
<None Include="src\socket\socket-host-session.vala">
|
||||
<Filter>Source Files\socket</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\fruity-host-session.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\dtx.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\lockdown.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\installation-proxy.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\lldb.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\injector.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\usbmux.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\keyed-archive.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\plist.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\plist-service.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\droidy\droidy-host-session.vala">
|
||||
<Filter>Source Files\droidy</Filter>
|
||||
</None>
|
||||
<None Include="src\droidy\droidy-client.vala">
|
||||
<Filter>Source Files\droidy</Filter>
|
||||
</None>
|
||||
<CustomBuild Include="src\compiler\compiler.resources">
|
||||
<Filter>Resource Files\compiler</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="src\barebone\barebone.resources">
|
||||
<Filter>Resource Files\barebone</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-core.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="$(IntDir)src\frida.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\frida-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\host-session-service.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\agent-container.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\gdb.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\system.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\windows-host-session.c">
|
||||
<Filter>Source Files\generated\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\windows-host-session-glue.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\winjector.c">
|
||||
<Filter>Source Files\generated\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\winjector-glue.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\windows\frida-helper-process.c">
|
||||
<Filter>Source Files\generated\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="src\windows\access-helpers.h">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="src\windows\access-helpers.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="src\windows\icon-helpers.h">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="src\windows\icon-helpers.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\windows\system-windows.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\socket\socket-host-session.c">
|
||||
<Filter>Source Files\generated\socket</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\fruity-host-session.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\dtx.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\fruity\fruity-host-session-windows.c">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\lockdown.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\installation-proxy.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\lldb.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\injector.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\usbmux.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\keyed-archive.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\plist.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\plist-service.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\droidy-host-session.c">
|
||||
<Filter>Source Files\generated\droidy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\droidy-client.c">
|
||||
<Filter>Source Files\generated\droidy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-helper.c">
|
||||
<Filter>Source Files\generated\data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-agent.c">
|
||||
<Filter>Source Files\generated\data</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="src\windows\frida-helper-process-glue.h">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\windows\frida-helper-process-glue.c">
|
||||
<Filter>Source Files\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\injector.c">
|
||||
<Filter>Source Files\generated\droidy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\axml.c">
|
||||
<Filter>Source Files\generated\droidy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\droidy\jdwp.c">
|
||||
<Filter>Source Files\generated\droidy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\async-task.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\control-service.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\file-monitor.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\portal-service.c">
|
||||
<Filter>Source Files\generated\core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\fruity\springboard-services.c">
|
||||
<Filter>Source Files\generated\fruity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\compiler\compiler.c">
|
||||
<Filter>Source Files\generated\compiler</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-compiler.c">
|
||||
<Filter>Source Files\generated\data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\barebone-host-session.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\script.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\machine.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\allocator.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\callback.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\memory-scanner.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\interceptor.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\rust-module.c">
|
||||
<Filter>Source Files\generated\barebone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)data\frida-data-barebone.c">
|
||||
<Filter>Source Files\generated\data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-arm64\machine.c">
|
||||
<Filter>Source Files\generated\barebone\arch-arm64</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-arm\machine.c">
|
||||
<Filter>Source Files\generated\barebone\arch-arm</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-x86\machine.c">
|
||||
<Filter>Source Files\generated\barebone\arch-x86</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-unknown\machine.c">
|
||||
<Filter>Source Files\generated\barebone\arch-unknown</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)src\barebone\arch-x86_64\machine.c">
|
||||
<Filter>Source Files\generated\barebone\arch-x86_64</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="src\droidy\injector.vala">
|
||||
<Filter>Source Files\droidy</Filter>
|
||||
</None>
|
||||
<None Include="src\droidy\jdwp.vala">
|
||||
<Filter>Source Files\droidy</Filter>
|
||||
</None>
|
||||
<None Include="src\async-task.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\control-service.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\file-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\portal-service.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="src\fruity\springboard-services.vala">
|
||||
<Filter>Source Files\fruity</Filter>
|
||||
</None>
|
||||
<None Include="src\compiler\compiler.vala">
|
||||
<Filter>Source Files\compiler</Filter>
|
||||
</None>
|
||||
<None Include="src\droidy\axml.vala">
|
||||
<Filter>Source Files\droidy</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\barebone-host-session.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\script.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\machine.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\allocator.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\callback.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\memory-scanner.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\interceptor.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\rust-module.vala">
|
||||
<Filter>Source Files\barebone</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\arch-arm64\machine.vala">
|
||||
<Filter>Source Files\barebone\arch-arm64</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\arch-arm\machine.vala">
|
||||
<Filter>Source Files\barebone\arch-arm</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\arch-x86\machine.vala">
|
||||
<Filter>Source Files\barebone\arch-x86</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\arch-unknown\machine.vala">
|
||||
<Filter>Source Files\barebone\arch-unknown</Filter>
|
||||
</None>
|
||||
<None Include="src\barebone\arch-x86_64\machine.vala">
|
||||
<Filter>Source Files\barebone\arch-x86_64</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,174 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5DBC3541-98D6-4F06-A184-B6116544ED26}</ProjectGuid>
|
||||
<RootNamespace>frida-gadget</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>gum-32.lib;gumjs-32.lib;frida-base-32.lib;frida-payload-32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<AdditionalDependencies>gum-64.lib;gumjs-64.lib;frida-base-64.lib;frida-payload-64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>gum-32.lib;gumjs-32.lib;frida-base-32.lib;frida-payload-32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<ModuleDefinitionFile>lib\gadget\frida-gadget.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<AdditionalDependencies>gum-64.lib;gumjs-64.lib;frida-base-64.lib;frida-payload-64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="lib\gadget\gadget.vala">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" lib/gadget/gadget.vala --ccode --directory=$(IntDir) --library=frida-gadget --header=$(IntDir)frida-gadget.h --symbols=$(IntDir)frida-gadget.symbols --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gee-0.8 --pkg=gio-2.0 --pkg=nice --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-payload || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)lib\gadget\gadget.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)gadget\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)gadget\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)gadget\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)gadget\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lib\gadget\gadget-glue.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{f60b305c-bd28-4f2c-9c4c-cbabeb0c2142}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="lib\gadget\gadget-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)lib\gadget\gadget.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="lib\gadget\gadget.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,175 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C21A9593-4BE8-4BE5-A7E6-39A1612FA569}</ProjectGuid>
|
||||
<RootNamespace>frida-portal</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="portal\portal.vala">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" portal/portal.vala --ccode --directory=$(IntDir) --library=frida-portal --header=$(IntDir)frida-portal.h --symbols=$(IntDir)frida-portal.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gioopenssl --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="frida-core.vcxproj">
|
||||
<Project>{b7dc9b02-a5ff-4aa1-b2a2-dc1653168d44}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)portal\portal.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)portal\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)portal\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)portal\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)portal\</ObjectFileName>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{4f6f9d9e-2378-4fde-b1b2-f54395a16475}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="portal\portal.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)portal\portal.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,176 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{218DDF16-1726-4492-A92F-DC190397DB44}</ProjectGuid>
|
||||
<RootNamespace>frida-server</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-32;$(IntDir)..\frida-helper-backend-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-core;$(IntDir)..\frida-base-64;$(IntDir)..\frida-helper-backend-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="server\server.vala">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(ValaCompiler)" server/server.vala --ccode --directory=$(IntDir) --library=frida-server --header=$(IntDir)frida-server.h --symbols=$(IntDir)frida-server.symbols --vapidir="$(IntDir)..\frida-core" --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-helper-backend-32" --vapidir="$(IntDir)..\frida-helper-backend-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg config --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-core --pkg=frida-base --pkg=frida-helper-backend --pkg=posix || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling vala code</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ValaCompiler);$(ProjectDir)server\server.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="frida-core.vcxproj">
|
||||
<Project>{b7dc9b02-a5ff-4aa1-b2a2-dc1653168d44}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)server\server.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)server\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)server\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)server\</ObjectFileName>
|
||||
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)server\</ObjectFileName>
|
||||
</ClCompile>
|
||||
<ClCompile Include="server\server-glue.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{f60b305c-bd28-4f2c-9c4c-cbabeb0c2142}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="server\server.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
<ClCompile Include="server\server-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)server\server.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+63
-34
@@ -147,7 +147,7 @@ namespace Frida.Inject {
|
||||
public extern void init ();
|
||||
}
|
||||
|
||||
public class Application : Object {
|
||||
public sealed class Application : Object {
|
||||
public string? device_id {
|
||||
get;
|
||||
construct;
|
||||
@@ -388,7 +388,7 @@ namespace Frida.Inject {
|
||||
return false;
|
||||
}
|
||||
|
||||
script_runner.on_stdin (line);
|
||||
script_runner.on_stdin (line, null);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -414,14 +414,19 @@ namespace Frida.Inject {
|
||||
|
||||
buf[n] = 0;
|
||||
|
||||
script_runner.on_stdin ((string) buf);
|
||||
if (script_runner.terminal_mode == TerminalMode.BINARY) {
|
||||
var bytes = new Bytes (buf[:n]);
|
||||
script_runner.on_stdin ("", bytes);
|
||||
} else {
|
||||
script_runner.on_stdin ((string) buf, null);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private class ScriptRunner : Object, RpcPeer {
|
||||
private sealed class ScriptRunner : Object, RpcPeer {
|
||||
public TerminalMode terminal_mode {
|
||||
get;
|
||||
private set;
|
||||
@@ -549,7 +554,7 @@ namespace Frida.Inject {
|
||||
var stage = new Json.Node.alloc ().init_string ("early");
|
||||
|
||||
try {
|
||||
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, io_cancellable);
|
||||
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null, io_cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
}
|
||||
}
|
||||
@@ -591,7 +596,7 @@ namespace Frida.Inject {
|
||||
private async TerminalMode query_terminal_mode () {
|
||||
Json.Node mode_value;
|
||||
try {
|
||||
mode_value = yield rpc_client.call ("getFridaTerminalMode", new Json.Node[] {}, io_cancellable);
|
||||
mode_value = yield rpc_client.call ("getFridaTerminalMode", new Json.Node[] {}, null, io_cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
return COOKED;
|
||||
}
|
||||
@@ -599,7 +604,14 @@ namespace Frida.Inject {
|
||||
if (mode_value.get_value_type () != typeof (string))
|
||||
return COOKED;
|
||||
|
||||
return (mode_value.get_string () == "raw") ? TerminalMode.RAW : TerminalMode.COOKED;
|
||||
switch (mode_value.get_string ()) {
|
||||
case "raw":
|
||||
return TerminalMode.RAW;
|
||||
case "binary":
|
||||
return TerminalMode.BINARY;
|
||||
default:
|
||||
return TerminalMode.COOKED;
|
||||
}
|
||||
}
|
||||
|
||||
private void apply_terminal_mode (TerminalMode mode) throws Error {
|
||||
@@ -632,10 +644,10 @@ namespace Frida.Inject {
|
||||
}
|
||||
#endif
|
||||
|
||||
public void on_stdin (string data) {
|
||||
var data_value = new Json.Node.alloc ().init_string (data);
|
||||
public void on_stdin (string str, Bytes? data) {
|
||||
var str_value = new Json.Node.alloc ().init_string (str);
|
||||
|
||||
rpc_client.call.begin ("onFridaStdin", new Json.Node[] { data_value }, io_cancellable);
|
||||
rpc_client.call.begin ("onFridaStdin", new Json.Node[] { str_value }, data, io_cancellable);
|
||||
}
|
||||
|
||||
private void on_script_file_changed (File file, File? other_file, FileMonitorEvent event_type) {
|
||||
@@ -675,7 +687,7 @@ namespace Frida.Inject {
|
||||
handled = try_handle_log_message (message);
|
||||
break;
|
||||
case "send":
|
||||
handled = try_handle_stdout_message (message);
|
||||
handled = try_handle_stdout_message (message, data);
|
||||
break;
|
||||
default:
|
||||
handled = false;
|
||||
@@ -722,20 +734,19 @@ namespace Frida.Inject {
|
||||
*
|
||||
* {"type":"send","payload":["frida:stdout","DATA"]}
|
||||
*/
|
||||
private bool try_handle_stdout_message (Json.Object message) {
|
||||
private bool try_handle_stdout_message (Json.Object message, Bytes? data) {
|
||||
var payload = message.get_member ("payload");
|
||||
if (payload.get_node_type () != Json.NodeType.ARRAY)
|
||||
return false;
|
||||
|
||||
var tuple = payload.get_array ();
|
||||
if (tuple.get_length () != 2)
|
||||
var tuple_len = tuple.get_length ();
|
||||
if (tuple_len == 0)
|
||||
return false;
|
||||
|
||||
var first_element = tuple.get_element (0);
|
||||
if (first_element.get_value_type () != typeof (string))
|
||||
var type = tuple.get_element (0).get_string ();
|
||||
if (type == null)
|
||||
return false;
|
||||
|
||||
var type = first_element.get_string ();
|
||||
switch (type) {
|
||||
case "frida:stdout":
|
||||
case "frida:stderr":
|
||||
@@ -744,31 +755,49 @@ namespace Frida.Inject {
|
||||
return false;
|
||||
}
|
||||
|
||||
var second_element = tuple.get_element (1);
|
||||
if (second_element.get_value_type () != typeof (string))
|
||||
return false;
|
||||
var str = second_element.get_string ();
|
||||
|
||||
switch (type) {
|
||||
case "frida:stdout":
|
||||
stdout.write (str.data);
|
||||
stdout.flush ();
|
||||
return true;
|
||||
case "frida:stderr":
|
||||
stderr.write (str.data);
|
||||
return true;
|
||||
default:
|
||||
if (tuple_len >= 2) {
|
||||
var str = tuple.get_element (1).get_string ();
|
||||
if (str == null)
|
||||
return false;
|
||||
|
||||
switch (type) {
|
||||
case "frida:stdout":
|
||||
stdout.write (str.data);
|
||||
stdout.flush ();
|
||||
break;
|
||||
case "frida:stderr":
|
||||
stderr.write (str.data);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (data != null) {
|
||||
switch (type) {
|
||||
case "frida:stdout":
|
||||
stdout.write (data.get_data ());
|
||||
stdout.flush ();
|
||||
break;
|
||||
case "frida:stderr":
|
||||
stderr.write (data.get_data ());
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
|
||||
script.post (json, null);
|
||||
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
|
||||
script.post (json, data);
|
||||
}
|
||||
}
|
||||
|
||||
private enum TerminalMode {
|
||||
COOKED,
|
||||
RAW
|
||||
RAW,
|
||||
BINARY
|
||||
}
|
||||
}
|
||||
+5
-16
@@ -13,36 +13,25 @@ extra_link_args = []
|
||||
extra_link_depends = []
|
||||
if host_os_family == 'darwin'
|
||||
symlist = 'frida-inject.symbols'
|
||||
extra_link_args += ['-Wl,-exported_symbols_list,' + join_paths(meson.current_source_dir(), symlist)]
|
||||
extra_link_args += ['-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist]
|
||||
extra_link_depends += [symlist]
|
||||
elif host_os_family != 'windows'
|
||||
symscript = 'frida-inject.version'
|
||||
extra_link_args += ['-Wl,--version-script,' + join_paths(meson.current_source_dir(), symscript)]
|
||||
extra_link_args += ['-Wl,--version-script,' + meson.current_source_dir() / symscript]
|
||||
extra_link_depends += [symscript]
|
||||
endif
|
||||
|
||||
raw_inject = executable('frida-inject-raw', inject_sources,
|
||||
vala_args: system_vala_args,
|
||||
vala_args: [core_vala_args, system_vala_args],
|
||||
link_args: extra_link_args,
|
||||
link_depends: extra_link_depends,
|
||||
dependencies: [json_glib_dep, core_dep],
|
||||
)
|
||||
|
||||
custom_target('frida-inject',
|
||||
input: [
|
||||
raw_inject,
|
||||
'frida-inject.xcent',
|
||||
],
|
||||
input: [raw_inject, 'frida-inject.xcent'],
|
||||
output: 'frida-inject' + exe_suffix,
|
||||
command: [
|
||||
files('post-process.sh'),
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
host_os,
|
||||
'>>>', strip, '<<<',
|
||||
get_option('strip').to_string(),
|
||||
codesign,
|
||||
],
|
||||
command: post_process + ['executable', 're.frida.Inject', '@INPUT1@'],
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
)
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
input_inject_path=$1
|
||||
input_entitlements_path=$2
|
||||
output_inject_path=$3
|
||||
host_os=$4
|
||||
strip_command=()
|
||||
if [ "$5" = ">>>" ]; then
|
||||
shift 5
|
||||
while true; do
|
||||
cur=$1
|
||||
shift 1
|
||||
if [ "$cur" = "<<<" ]; then
|
||||
break
|
||||
fi
|
||||
strip_command+=("$cur")
|
||||
done
|
||||
else
|
||||
echo "Invalid argument" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
strip_enabled=$1
|
||||
codesign=$2
|
||||
|
||||
case $host_os in
|
||||
macos)
|
||||
if [ -z "$MACOS_CERTID" ]; then
|
||||
echo "MACOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
ios)
|
||||
if [ -z "$IOS_CERTID" ]; then
|
||||
echo "IOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
tvos)
|
||||
if [ -z "$TVOS_CERTID" ]; then
|
||||
echo "TVOS_CERTID not set, see https://github.com/frida/frida#apple-oses"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
intermediate_path=$output_inject_path.tmp
|
||||
rm -f "$intermediate_path"
|
||||
cp -a "$input_inject_path" "$intermediate_path"
|
||||
|
||||
if [ "$strip_enabled" = "true" ]; then
|
||||
"${strip_command[@]}" "$intermediate_path" || exit 1
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
macos|ios|tvos)
|
||||
case $host_os in
|
||||
macos)
|
||||
"$codesign" -f -s "$MACOS_CERTID" -i "re.frida.Inject" "$intermediate_path" || exit 1
|
||||
;;
|
||||
ios)
|
||||
"$codesign" -f -s "$IOS_CERTID" --entitlements "$input_entitlements_path" "$intermediate_path" || exit 1
|
||||
;;
|
||||
tvos)
|
||||
"$codesign" -f -s "$TVOS_CERTID" --entitlements "$input_entitlements_path" "$intermediate_path" || exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
mv "$intermediate_path" "$output_inject_path"
|
||||
+26
-20
@@ -11,7 +11,7 @@ namespace Frida.Agent {
|
||||
PROCESS_TRANSITION
|
||||
}
|
||||
|
||||
private class Runner : Object, ProcessInvader, AgentSessionProvider, ExitHandler, ForkHandler, SpawnHandler {
|
||||
private sealed class Runner : Object, ProcessInvader, AgentSessionProvider, ExitHandler, ForkHandler, SpawnHandler {
|
||||
public static Runner shared_instance = null;
|
||||
public static Mutex shared_mutex;
|
||||
private static string? cached_agent_path = null;
|
||||
@@ -81,7 +81,7 @@ namespace Frida.Agent {
|
||||
|
||||
private uint child_gating_subscriber_count = 0;
|
||||
private ForkMonitor? fork_monitor;
|
||||
private FileDescriptorGuard fd_guard;
|
||||
private FileDescriptorGuard? fd_guard;
|
||||
private ThreadCountCloaker? thread_count_cloaker;
|
||||
private ThreadListCloaker? thread_list_cloaker;
|
||||
private FDListCloaker? fd_list_cloaker;
|
||||
@@ -99,6 +99,7 @@ namespace Frida.Agent {
|
||||
private Cond transition_cond;
|
||||
private SpawnMonitor? spawn_monitor;
|
||||
private ThreadSuspendMonitor? thread_suspend_monitor;
|
||||
private UnwindSitter? unwind_sitter;
|
||||
|
||||
private delegate void CompletionNotify ();
|
||||
|
||||
@@ -148,7 +149,6 @@ namespace Frida.Agent {
|
||||
linjector_state->agent_ctrlfd = -1;
|
||||
|
||||
fdt_padder.move_descriptor_if_needed (ref agent_ctrlfd);
|
||||
Gum.Cloak.add_file_descriptor (agent_ctrlfd);
|
||||
|
||||
agent_parameters_with_transport_uri = "socket:%d%s".printf (agent_ctrlfd, agent_parameters);
|
||||
agent_parameters = agent_parameters_with_transport_uri;
|
||||
@@ -259,6 +259,7 @@ namespace Frida.Agent {
|
||||
interceptor.begin_transaction ();
|
||||
|
||||
thread_suspend_monitor = null;
|
||||
unwind_sitter = null;
|
||||
|
||||
invalidate_dbus_context ();
|
||||
|
||||
@@ -287,6 +288,7 @@ namespace Frida.Agent {
|
||||
#endif
|
||||
bool enable_exit_monitor = true;
|
||||
bool enable_thread_suspend_monitor = true;
|
||||
bool enable_unwind_sitter = true;
|
||||
foreach (unowned string option in tokens[1:]) {
|
||||
if (option == "eternal")
|
||||
ensure_eternalized ();
|
||||
@@ -298,6 +300,8 @@ namespace Frida.Agent {
|
||||
enable_exit_monitor = false;
|
||||
else if (option == "thread-suspend-monitor:off")
|
||||
enable_thread_suspend_monitor = false;
|
||||
else if (option == "unwind-sitter:off")
|
||||
enable_unwind_sitter = false;
|
||||
}
|
||||
|
||||
if (!enable_exceptor)
|
||||
@@ -313,6 +317,9 @@ namespace Frida.Agent {
|
||||
if (enable_thread_suspend_monitor)
|
||||
thread_suspend_monitor = new ThreadSuspendMonitor (this);
|
||||
|
||||
if (enable_unwind_sitter)
|
||||
unwind_sitter = new UnwindSitter (this);
|
||||
|
||||
this.interceptor = interceptor;
|
||||
this.exceptor = Gum.Exceptor.obtain ();
|
||||
|
||||
@@ -1502,13 +1509,14 @@ namespace Frida.Agent {
|
||||
}
|
||||
|
||||
public static NativeBridgeApi open () throws Error {
|
||||
string? nb_mod = null;
|
||||
string? vm_mod = null;
|
||||
Gum.Process.enumerate_modules ((details) => {
|
||||
if (/\/lib(64)?\/libnativebridge.so$/.match (details.path))
|
||||
nb_mod = details.path;
|
||||
else if (/^lib(art|dvm).so$/.match (details.name) && !/\/system\/fake-libs/.match (details.path))
|
||||
vm_mod = details.path;
|
||||
Gum.Module? nb_mod = null;
|
||||
Gum.Module? vm_mod = null;
|
||||
Gum.Process.enumerate_modules (module => {
|
||||
unowned string path = module.path;
|
||||
if (/\/lib(64)?\/libnativebridge.so$/.match (path))
|
||||
nb_mod = module;
|
||||
else if (/^lib(art|dvm).so$/.match (module.name) && !/\/system\/fake-libs/.match (path))
|
||||
vm_mod = module;
|
||||
bool carry_on = nb_mod == null || vm_mod == null;
|
||||
return carry_on;
|
||||
});
|
||||
@@ -1523,29 +1531,27 @@ namespace Frida.Agent {
|
||||
NBUnloadLibraryFunc? unload;
|
||||
NBGetTrampolineFunc get_trampoline;
|
||||
|
||||
load = (NBLoadLibraryFunc) Gum.Module.find_export_by_name (nb_mod, "NativeBridgeLoadLibrary");;
|
||||
load = (NBLoadLibraryFunc) nb_mod.find_export_by_name ("NativeBridgeLoadLibrary");;
|
||||
if (load != null) {
|
||||
flavor = MODERN;
|
||||
load_ext = (NBLoadLibraryExtFunc) Gum.Module.find_export_by_name (nb_mod, "NativeBridgeLoadLibraryExt");
|
||||
load_ext = (NBLoadLibraryExtFunc) nb_mod.find_export_by_name ("NativeBridgeLoadLibraryExt");
|
||||
// XXX: NativeBridgeUnloadLibrary() is only a stub as of Android 11 w/ libndk_translation.so
|
||||
unload = null;
|
||||
get_trampoline = (NBGetTrampolineFunc) Gum.Module.find_export_by_name (nb_mod,
|
||||
"NativeBridgeGetTrampoline");
|
||||
get_trampoline = (NBGetTrampolineFunc) nb_mod.find_export_by_name ("NativeBridgeGetTrampoline");
|
||||
} else {
|
||||
flavor = LEGACY;
|
||||
load = (NBLoadLibraryFunc) Gum.Module.find_export_by_name (nb_mod,
|
||||
"_ZN7android23NativeBridgeLoadLibraryEPKci");
|
||||
load_ext = (NBLoadLibraryExtFunc) Gum.Module.find_export_by_name (nb_mod,
|
||||
load = (NBLoadLibraryFunc) nb_mod.find_export_by_name ("_ZN7android23NativeBridgeLoadLibraryEPKci");
|
||||
load_ext = (NBLoadLibraryExtFunc) nb_mod.find_export_by_name (
|
||||
"_ZN7android26NativeBridgeLoadLibraryExtEPKciPNS_25native_bridge_namespace_tE");
|
||||
// XXX: Unload implementation seems to be unreliable.
|
||||
unload = null;
|
||||
get_trampoline = (NBGetTrampolineFunc) Gum.Module.find_export_by_name (nb_mod,
|
||||
get_trampoline = (NBGetTrampolineFunc) nb_mod.find_export_by_name (
|
||||
"_ZN7android25NativeBridgeGetTrampolineEPvPKcS2_j");
|
||||
}
|
||||
if (load == null || get_trampoline == null)
|
||||
throw new Error.NOT_SUPPORTED ("NativeBridge API is not available on this system");
|
||||
|
||||
var get_vms = (JNIGetCreatedJavaVMsFunc) Gum.Module.find_export_by_name (vm_mod, "JNI_GetCreatedJavaVMs");
|
||||
var get_vms = (JNIGetCreatedJavaVMsFunc) vm_mod.find_export_by_name ("JNI_GetCreatedJavaVMs");
|
||||
if (get_vms == null)
|
||||
throw new Error.NOT_SUPPORTED ("Unable to locate Java VM");
|
||||
|
||||
@@ -1615,7 +1621,7 @@ namespace Frida.Agent {
|
||||
}
|
||||
#endif
|
||||
|
||||
private class LiveAgentSession : BaseAgentSession {
|
||||
private sealed class LiveAgentSession : BaseAgentSession {
|
||||
public uint registration_id {
|
||||
get;
|
||||
set;
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F4F9AF1C-3111-4563-8066-8FAE8CBEFBDC}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-agent-32</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;$(IntDir)..\frida-pipe-32;$(IntDir)..\frida-payload-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-agent-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-32.vcxproj">
|
||||
<Project>{8381538f-3cb5-480b-bfa4-960299af6485}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\frida-gum\gum-32.vcxproj">
|
||||
<Project>{b31c7d42-54b6-49bb-b30c-11745c48b062}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\base\frida-base-32.vcxproj">
|
||||
<Project>{c4203124-c838-437b-8662-ca477b146655}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\payload\frida-payload-32.vcxproj">
|
||||
<Project>{26f21663-d1b3-46e4-acb6-115ed9ce086c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\pipe\frida-pipe-32.vcxproj">
|
||||
<Project>{4c39c3cf-13e5-4346-b6ae-f73013105936}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{0353eb66-cd17-403a-ac99-dcf4a5709318}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)agent.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="agent-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="agent.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D873638D-AA0D-4252-9334-456557A65D95}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-agent-64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;$(IntDir)..\frida-pipe-64;$(IntDir)..\frida-payload-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>frida-agent.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-agent-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-64.vcxproj">
|
||||
<Project>{0b39885e-731c-4a45-a7de-44cbdbbf0067}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\frida-gum\gum-64.vcxproj">
|
||||
<Project>{dc30a450-95bc-4476-a2f9-45100562424e}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\base\frida-base-64.vcxproj">
|
||||
<Project>{a31522d9-715b-4e04-aa57-df7afebe082c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\payload\frida-payload-64.vcxproj">
|
||||
<Project>{26ccf317-ace8-4cd6-bdde-ffed1aa2fadd}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\pipe\frida-pipe-64.vcxproj">
|
||||
<Project>{d50f460f-9c4d-42eb-a8c4-48c0c46cfaaf}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{ae68f2cc-7b74-44ad-addd-3d447d9b2a4e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)agent.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="agent-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="agent.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
global:
|
||||
frida_agent_main;
|
||||
JNI_OnLoad;
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="agent.vala">
|
||||
<Message>Compiling vala code</Message>
|
||||
<Command>"$(ValaCompiler)" agent.vala --ccode --directory=$(IntDir) --library=frida-agent --header=$(IntDir)frida-agent.h --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --vapidir="$(IntDir)..\frida-pipe-32" --vapidir="$(IntDir)..\frida-pipe-64" --vapidir="$(IntDir)..\frida-payload-32" --vapidir="$(IntDir)..\frida-payload-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg=glib-2.0 --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base --pkg=frida-pipe --pkg=frida-payload || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs>$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)agent.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="agent-glue.c" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
global:
|
||||
frida_agent_main;
|
||||
JNI_OnLoad;
|
||||
|
||||
local:
|
||||
*;
|
||||
|
||||
+35
-32
@@ -20,14 +20,16 @@ if host_os_family == 'darwin'
|
||||
endif
|
||||
|
||||
if host_os_family == 'windows'
|
||||
symfile = (host_arch == 'x86') ? 'frida-agent-x86.symbols' : 'frida-agent.symbols'
|
||||
extra_link_args += '-Wl,--retain-symbols-file,' + (meson.current_source_dir() / symfile)
|
||||
extra_link_depends += symfile
|
||||
if host_toolchain != 'microsoft'
|
||||
symfile = (host_arch == 'x86') ? 'frida-agent-x86.symbols' : 'frida-agent.symbols'
|
||||
extra_link_args += '-Wl,--retain-symbols-file,' + meson.current_source_dir() / symfile
|
||||
extra_link_depends += symfile
|
||||
endif
|
||||
elif host_os_family == 'darwin'
|
||||
extra_link_args += '-Wl,-exported_symbol,_frida_agent_main'
|
||||
else
|
||||
symscript = 'frida-agent.version'
|
||||
extra_link_args += '-Wl,--version-script,' + (meson.current_source_dir() / symscript)
|
||||
symscript = (host_os == 'android') ? 'frida-agent-android.version' : 'frida-agent.version'
|
||||
extra_link_args += '-Wl,--version-script,' + meson.current_source_dir() / symscript
|
||||
extra_link_depends += symscript
|
||||
endif
|
||||
|
||||
@@ -36,10 +38,11 @@ if host_os_family in ['linux', 'qnx']
|
||||
extra_link_args += '-Wl,-Bsymbolic'
|
||||
endif
|
||||
|
||||
raw_agent = shared_library('frida-agent', agent_sources,
|
||||
raw_agent = shared_library('frida-agent-raw', agent_sources,
|
||||
name_prefix: 'lib',
|
||||
c_args: frida_component_cflags,
|
||||
vala_args: extra_vala_args,
|
||||
vala_header: 'frida-agent.h',
|
||||
vala_args: [base_vala_args, payload_vala_args, extra_vala_args],
|
||||
link_args: extra_link_args,
|
||||
link_depends: extra_link_depends,
|
||||
vs_module_defs: 'frida-agent.def',
|
||||
@@ -51,45 +54,45 @@ operations = ['--move', 'constructor', 'frida_init_memory', 'first']
|
||||
if host_os_family != 'darwin'
|
||||
operations += ['--move', 'destructor', 'frida_deinit_memory', 'first']
|
||||
endif
|
||||
|
||||
if host_machine.endian() == 'little'
|
||||
endian_option = ['--endian', 'little']
|
||||
else
|
||||
endian_option = ['--endian', 'big']
|
||||
endif
|
||||
|
||||
modulated_agent = custom_target('frida-agent-modulated',
|
||||
input: raw_agent,
|
||||
output: 'libfrida-agent-modulated' + shlib_suffix,
|
||||
command: [
|
||||
modulate,
|
||||
'@INPUT@',
|
||||
] + operations + endian_option + [
|
||||
'--output', '@OUTPUT@',
|
||||
'--nm', nm,
|
||||
'--readelf', readelf,
|
||||
'--otool', otool,
|
||||
],
|
||||
command: modulate + operations,
|
||||
)
|
||||
|
||||
need_universal_agent = host_os_family == 'darwin' \
|
||||
and get_option('assets') == 'installed' \
|
||||
and agent_compat != ''
|
||||
|
||||
if host_os_family == 'darwin'
|
||||
identity = 'FridaAgent'
|
||||
else
|
||||
identity = agent_name
|
||||
endif
|
||||
|
||||
agent = custom_target('frida-agent',
|
||||
input: modulated_agent,
|
||||
output: agent_name,
|
||||
command: [
|
||||
post_process_module,
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
identity,
|
||||
],
|
||||
output: need_universal_agent ? f'@agent_name@-@host_abi@' : agent_name,
|
||||
command: post_process + ['shared-library', identity],
|
||||
build_by_default: true,
|
||||
install: get_option('assets') == 'installed',
|
||||
install: get_option('assets') == 'installed' and not need_universal_agent,
|
||||
install_dir: asset_dir,
|
||||
)
|
||||
|
||||
agent_dep = declare_dependency(link_with: agent)
|
||||
|
||||
if need_universal_agent
|
||||
custom_target('frida-agent-universal',
|
||||
input: agent,
|
||||
output: agent_name,
|
||||
command: [
|
||||
lipo,
|
||||
'@INPUT@',
|
||||
agent_compat,
|
||||
'-create',
|
||||
'-output', meson.current_build_dir() / agent_name,
|
||||
],
|
||||
depends: agent_depends,
|
||||
install: true,
|
||||
install_dir: asset_dir,
|
||||
)
|
||||
endif
|
||||
+168
-18
@@ -1,11 +1,11 @@
|
||||
namespace Frida {
|
||||
public class BufferBuilder : Object {
|
||||
public uint pointer_size {
|
||||
public sealed class BufferBuilder : Object {
|
||||
public ByteOrder byte_order {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public ByteOrder byte_order {
|
||||
public uint pointer_size {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
@@ -23,10 +23,10 @@ namespace Frida {
|
||||
private Gee.List<LabelRef>? label_refs;
|
||||
private Gee.Map<string, uint>? label_defs;
|
||||
|
||||
public BufferBuilder (uint pointer_size = (uint) sizeof (size_t), ByteOrder byte_order = HOST) {
|
||||
public BufferBuilder (ByteOrder byte_order = HOST, uint pointer_size = (uint) sizeof (size_t)) {
|
||||
Object (
|
||||
pointer_size: pointer_size,
|
||||
byte_order: byte_order
|
||||
byte_order: byte_order,
|
||||
pointer_size: pointer_size
|
||||
);
|
||||
}
|
||||
|
||||
@@ -307,30 +307,30 @@ namespace Frida {
|
||||
NUL
|
||||
}
|
||||
|
||||
public class Buffer : Object {
|
||||
public sealed class Buffer : Object {
|
||||
public Bytes bytes {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public uint pointer_size {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public ByteOrder byte_order {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public uint pointer_size {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
private unowned uint8 * data;
|
||||
private size_t size;
|
||||
|
||||
public Buffer (Bytes bytes, uint pointer_size, ByteOrder byte_order) {
|
||||
public Buffer (Bytes bytes, ByteOrder byte_order = HOST, uint pointer_size = (uint) sizeof (size_t)) {
|
||||
Object (
|
||||
bytes: bytes,
|
||||
pointer_size: pointer_size,
|
||||
byte_order: byte_order
|
||||
byte_order: byte_order,
|
||||
pointer_size: pointer_size
|
||||
);
|
||||
}
|
||||
|
||||
@@ -428,10 +428,35 @@ namespace Frida {
|
||||
return *((double *) &bits);
|
||||
}
|
||||
|
||||
public string read_string (size_t offset) {
|
||||
string * val = (string *) get_pointer (offset, sizeof (char));
|
||||
public string read_string (size_t offset) throws Error {
|
||||
string * start = (string *) get_pointer (offset, sizeof (char));
|
||||
size_t max_length = size - offset;
|
||||
return val->substring (0, (long) max_length);
|
||||
string * end = memchr (start, 0, max_length);
|
||||
if (end == null)
|
||||
throw new Error.PROTOCOL ("Missing null character");
|
||||
size_t size = end - start;
|
||||
string val = start->substring (0, (long) size);
|
||||
if (!val.validate ())
|
||||
throw new Error.PROTOCOL ("Invalid UTF-8 string");
|
||||
return val;
|
||||
}
|
||||
|
||||
[CCode (cname = "memchr", cheader_filename = "string.h")]
|
||||
private extern static string * memchr (string * s, int c, size_t n);
|
||||
|
||||
public string read_fixed_string (size_t offset, size_t size) throws Error {
|
||||
string * start = (string *) get_pointer (offset, size);
|
||||
size_t max_length = size - offset;
|
||||
string * end = memchr (start, 0, max_length);
|
||||
size_t n;
|
||||
if (end != null)
|
||||
n = end - start;
|
||||
else
|
||||
n = size;
|
||||
string val = start->substring (0, (long) n);
|
||||
if (!val.validate ())
|
||||
throw new Error.PROTOCOL ("Invalid UTF-8 string");
|
||||
return val;
|
||||
}
|
||||
|
||||
public unowned Buffer write_string (size_t offset, string val) {
|
||||
@@ -447,4 +472,129 @@ namespace Frida {
|
||||
return data + offset;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class BufferReader {
|
||||
public size_t available {
|
||||
get {
|
||||
return buffer.bytes.get_size () - offset;
|
||||
}
|
||||
}
|
||||
|
||||
private Buffer buffer;
|
||||
private size_t offset = 0;
|
||||
|
||||
public BufferReader (Buffer buf) {
|
||||
buffer = buf;
|
||||
}
|
||||
|
||||
public uint64 read_pointer (size_t offset) throws Error {
|
||||
var pointer_size = buffer.pointer_size;
|
||||
check_available (pointer_size);
|
||||
var ptr = buffer.read_pointer (offset);
|
||||
offset += pointer_size;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
public int8 read_int8 () throws Error {
|
||||
check_available (sizeof (int8));
|
||||
var val = buffer.read_int8 (offset);
|
||||
offset += sizeof (int8);
|
||||
return val;
|
||||
}
|
||||
|
||||
public uint8 read_uint8 () throws Error {
|
||||
check_available (sizeof (uint8));
|
||||
var val = buffer.read_uint8 (offset);
|
||||
offset += sizeof (uint8);
|
||||
return val;
|
||||
}
|
||||
|
||||
public int16 read_int16 () throws Error {
|
||||
check_available (sizeof (int16));
|
||||
var val = buffer.read_int16 (offset);
|
||||
offset += sizeof (int16);
|
||||
return val;
|
||||
}
|
||||
|
||||
public uint16 read_uint16 () throws Error {
|
||||
check_available (sizeof (uint16));
|
||||
var val = buffer.read_uint16 (offset);
|
||||
offset += sizeof (uint16);
|
||||
return val;
|
||||
}
|
||||
|
||||
public int32 read_int32 () throws Error {
|
||||
check_available (sizeof (int32));
|
||||
var val = buffer.read_int32 (offset);
|
||||
offset += sizeof (int32);
|
||||
return val;
|
||||
}
|
||||
|
||||
public uint32 read_uint32 () throws Error {
|
||||
check_available (sizeof (uint32));
|
||||
var val = buffer.read_uint32 (offset);
|
||||
offset += sizeof (uint32);
|
||||
return val;
|
||||
}
|
||||
|
||||
public int64 read_int64 () throws Error {
|
||||
check_available (sizeof (int64));
|
||||
var val = buffer.read_int64 (offset);
|
||||
offset += sizeof (int64);
|
||||
return val;
|
||||
}
|
||||
|
||||
public uint64 read_uint64 () throws Error {
|
||||
check_available (sizeof (uint64));
|
||||
var val = buffer.read_uint64 (offset);
|
||||
offset += sizeof (uint64);
|
||||
return val;
|
||||
}
|
||||
|
||||
public float read_float () throws Error {
|
||||
check_available (sizeof (float));
|
||||
var val = buffer.read_float (offset);
|
||||
offset += sizeof (float);
|
||||
return val;
|
||||
}
|
||||
|
||||
public double read_double () throws Error {
|
||||
check_available (sizeof (double));
|
||||
var val = buffer.read_double (offset);
|
||||
offset += sizeof (double);
|
||||
return val;
|
||||
}
|
||||
|
||||
public string read_string () throws Error {
|
||||
check_available (1);
|
||||
var val = buffer.read_string (offset);
|
||||
offset += val.length + 1;
|
||||
return val;
|
||||
}
|
||||
|
||||
public string read_fixed_string (size_t size) throws Error {
|
||||
check_available (size);
|
||||
var val = buffer.read_fixed_string (offset, size);
|
||||
offset += size;
|
||||
return val;
|
||||
}
|
||||
|
||||
public Bytes read_bytes (size_t size) throws Error {
|
||||
check_available (size);
|
||||
var val = buffer.bytes[offset:offset + size];
|
||||
offset += size;
|
||||
return val;
|
||||
}
|
||||
|
||||
public unowned BufferReader skip (size_t n) throws Error {
|
||||
check_available (n);
|
||||
offset += n;
|
||||
return this;
|
||||
}
|
||||
|
||||
private void check_available (size_t n) throws Error {
|
||||
if (available < n)
|
||||
throw new Error.PROTOCOL ("Malformed buffer: truncated");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
namespace Frida {
|
||||
public sealed class ChannelRegistry : Object {
|
||||
public signal void channel_closed (ChannelId id);
|
||||
|
||||
private Gee.Map<ChannelId?, weak IOStream> channels =
|
||||
new Gee.HashMap<ChannelId?, weak IOStream> (ChannelId.hash, ChannelId.equal);
|
||||
|
||||
~ChannelRegistry () {
|
||||
clear ();
|
||||
}
|
||||
|
||||
public void clear () {
|
||||
foreach (IOStream stream in channels.values.to_array ()) {
|
||||
var channel_stream = stream as ChannelStream;
|
||||
if (channel_stream != null)
|
||||
channel_stream.abandon ();
|
||||
}
|
||||
channels.clear ();
|
||||
}
|
||||
|
||||
public void register (ChannelId id, IOStream stream) {
|
||||
stream.set_data ("channel-registry-entry", new Entry (this, id));
|
||||
lock (channels)
|
||||
channels[id] = stream;
|
||||
}
|
||||
|
||||
public IOStream link (ChannelId id) throws Error {
|
||||
IOStream? stream;
|
||||
lock (channels)
|
||||
stream = channels[id];
|
||||
if (stream == null)
|
||||
throw new Error.INVALID_ARGUMENT ("Invalid channel ID");
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void unlink (ChannelId id) {
|
||||
lock (channels) {
|
||||
if (!channels.unset (id))
|
||||
return;
|
||||
}
|
||||
|
||||
channel_closed (id);
|
||||
}
|
||||
|
||||
private class Entry {
|
||||
public ChannelRegistry parent;
|
||||
public ChannelId id;
|
||||
|
||||
public Entry (ChannelRegistry parent, ChannelId id) {
|
||||
this.parent = parent;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
~Entry () {
|
||||
parent.unlink (id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ChannelEndpoint : Object, Channel {
|
||||
private IOStream? stream;
|
||||
|
||||
private ByteArray write_queue = new ByteArray ();
|
||||
private bool writing = false;
|
||||
|
||||
private Cancellable io_cancellable = new Cancellable ();
|
||||
|
||||
public ChannelEndpoint (IOStream stream) {
|
||||
this.stream = stream;
|
||||
|
||||
read_loop.begin ();
|
||||
}
|
||||
|
||||
public async void close (Cancellable? cancellable) throws Error, IOError {
|
||||
io_cancellable.cancel ();
|
||||
}
|
||||
|
||||
public async void input (uint8[] data, Cancellable? cancellable) throws Error, IOError {
|
||||
if (io_cancellable.is_cancelled ())
|
||||
throw new Error.INVALID_OPERATION ("Channel is closed");
|
||||
|
||||
write_queue.append (data);
|
||||
|
||||
if (!writing) {
|
||||
writing = true;
|
||||
|
||||
var source = new IdleSource ();
|
||||
source.set_callback (() => {
|
||||
process_write_queue.begin ();
|
||||
return false;
|
||||
});
|
||||
source.attach (MainContext.get_thread_default ());
|
||||
}
|
||||
}
|
||||
|
||||
private async void read_loop () {
|
||||
var input = stream.get_input_stream ();
|
||||
var buffer = new uint8[64 * 1024];
|
||||
|
||||
while (true) {
|
||||
ssize_t n;
|
||||
try {
|
||||
n = yield input.read_async (buffer, Priority.DEFAULT, io_cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
break;
|
||||
}
|
||||
|
||||
output (buffer[:n]);
|
||||
|
||||
if (n == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
stream.close_async.begin ();
|
||||
stream = null;
|
||||
}
|
||||
|
||||
private async void process_write_queue () {
|
||||
if (stream != null) {
|
||||
var output = stream.get_output_stream ();
|
||||
|
||||
while (write_queue.len > 0) {
|
||||
uint8[] batch = write_queue.steal ();
|
||||
|
||||
size_t bytes_written;
|
||||
try {
|
||||
yield output.write_all_async (batch, Priority.DEFAULT, io_cancellable, out bytes_written);
|
||||
} catch (GLib.Error e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
writing = false;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ChannelStream : VirtualStream {
|
||||
public Channel channel {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
private ByteArray recv_queue = new ByteArray ();
|
||||
private ByteArray send_queue = new ByteArray ();
|
||||
|
||||
public ChannelStream (Channel channel) {
|
||||
Object (channel: channel);
|
||||
}
|
||||
|
||||
construct {
|
||||
channel.output.connect (on_output);
|
||||
}
|
||||
|
||||
public void abandon () {
|
||||
with_state_lock (() => {
|
||||
state = CLOSED;
|
||||
update_pending_io ();
|
||||
});
|
||||
}
|
||||
|
||||
protected override IOCondition query_events () {
|
||||
IOCondition new_events = 0;
|
||||
|
||||
if (recv_queue.len != 0 || state == CLOSED)
|
||||
new_events |= IN;
|
||||
|
||||
if (state == OPEN)
|
||||
new_events |= OUT;
|
||||
|
||||
return new_events;
|
||||
}
|
||||
|
||||
protected override void handle_close () {
|
||||
channel.close.begin (null);
|
||||
}
|
||||
|
||||
public override ssize_t read (uint8[] buffer) throws IOError {
|
||||
ssize_t n = 0;
|
||||
with_state_lock (() => {
|
||||
n = ssize_t.min (recv_queue.len, buffer.length);
|
||||
if (n > 0) {
|
||||
Memory.copy (buffer, recv_queue.data, n);
|
||||
recv_queue.remove_range (0, (uint) n);
|
||||
|
||||
update_pending_io ();
|
||||
} else {
|
||||
if (state == OPEN)
|
||||
n = -1;
|
||||
}
|
||||
});
|
||||
|
||||
if (n == -1)
|
||||
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
public override ssize_t write (uint8[] buffer) throws IOError {
|
||||
with_state_lock (() => {
|
||||
send_queue.append (buffer);
|
||||
});
|
||||
|
||||
if (main_context.is_owner ()) {
|
||||
process_send_queue ();
|
||||
} else {
|
||||
var source = new IdleSource ();
|
||||
source.set_callback (() => {
|
||||
process_send_queue ();
|
||||
return Source.REMOVE;
|
||||
});
|
||||
source.attach (main_context);
|
||||
}
|
||||
|
||||
return buffer.length;
|
||||
}
|
||||
|
||||
private void process_send_queue () {
|
||||
uint8[]? chunk = null;
|
||||
with_state_lock (() => {
|
||||
size_t n = send_queue.len;
|
||||
if (n == 0)
|
||||
return;
|
||||
chunk = send_queue.data[0:n];
|
||||
send_queue.remove_range (0, (uint) n);
|
||||
});
|
||||
if (chunk == null)
|
||||
return;
|
||||
|
||||
channel.input.begin (chunk, io_cancellable);
|
||||
}
|
||||
|
||||
private void on_output (uint8[] data) {
|
||||
with_state_lock (() => {
|
||||
if (data.length != 0)
|
||||
recv_queue.append (data);
|
||||
else
|
||||
state = CLOSED;
|
||||
update_pending_io ();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace Frida {
|
||||
public sealed class CFArray<T> {
|
||||
private CoreFoundation.Array handle;
|
||||
|
||||
public static CFArray<T> wrap<T> (void * handle) {
|
||||
return new CFArray<T> ((CoreFoundation.Array) handle);
|
||||
}
|
||||
|
||||
private CFArray (CoreFoundation.Array handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public Iterator<T> iterator () {
|
||||
return new Iterator<T> (handle);
|
||||
}
|
||||
|
||||
public class Iterator<T> {
|
||||
public CoreFoundation.Array handle;
|
||||
private CoreFoundation.Index i = 0;
|
||||
private CoreFoundation.Index length;
|
||||
|
||||
internal Iterator (CoreFoundation.Array arr) {
|
||||
handle = arr;
|
||||
length = arr.length;
|
||||
}
|
||||
|
||||
public unowned T? next_value () {
|
||||
if (i == length)
|
||||
return null;
|
||||
return handle[i++];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -60,7 +60,7 @@ namespace Frida {
|
||||
return yield connection.get_proxy (null, ObjectPath.HOST_SESSION, DBusProxyFlags.NONE, cancellable);
|
||||
}
|
||||
|
||||
private class DummyInputStream : InputStream {
|
||||
private sealed class DummyInputStream : InputStream {
|
||||
private bool done = false;
|
||||
private Mutex mutex;
|
||||
private Cond cond;
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C4203124-C838-437B-8662-CA477B146655}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-base-32</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-base-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)session.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="p2p-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="socket-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)dbus.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)p2p.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)promise.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)rpc.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)socket.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)buffer.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="session-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="session.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-base.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="dbus.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="p2p.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="promise.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="rpc.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="socket.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="buffer.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A31522D9-715B-4E04-AA57-DF7AFEBE082C}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-base-64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-base-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)session.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)dbus.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)p2p.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)promise.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)rpc.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)socket.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)buffer.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="p2p-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="socket-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="session-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="session.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-base.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="dbus.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="p2p.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="promise.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="rpc.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="socket.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="buffer.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="session.vala">
|
||||
<Message>Compiling vala code</Message>
|
||||
<Command>"$(ValaCompiler)" session.vala rpc.vala p2p.vala dbus.vala promise.vala socket.vala buffer.vala --ccode --directory=$(IntDir) --library=frida-base --header=$(IntDir)frida-base.h $(ValaFlags) $(FridaCoreValaFlags) --pkg=gio-2.0 --pkg=libsoup-3.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs>$(ValaCompiler);rpc.vala;p2p.vala;dbus.vala;promise.vala;socket.vala;buffer.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<None Include="rpc.vala" />
|
||||
<None Include="p2p.vala" />
|
||||
<None Include="dbus.vala" />
|
||||
<None Include="promise.vala" />
|
||||
<None Include="socket.vala" />
|
||||
<None Include="buffer.vala" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-base.h" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="session-glue.c" />
|
||||
<ClCompile Include="$(IntDir)rpc.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)p2p.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="p2p-glue.c" />
|
||||
<ClCompile Include="$(IntDir)dbus.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)promise.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)socket.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="socket-glue.c" />
|
||||
<ClCompile Include="$(IntDir)buffer.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "frida-darwin.h"
|
||||
|
||||
gpointer
|
||||
_frida_dispatch_retain (gpointer object)
|
||||
{
|
||||
dispatch_retain (object);
|
||||
return object;
|
||||
}
|
||||
|
||||
void
|
||||
_frida_xpc_connection_set_event_handler (xpc_connection_t connection, FridaXpcHandler handler, gpointer user_data)
|
||||
{
|
||||
xpc_connection_set_event_handler (connection, ^(xpc_object_t object)
|
||||
{
|
||||
handler (object, user_data);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
_frida_xpc_connection_send_message_with_reply (xpc_connection_t connection, xpc_object_t message, dispatch_queue_t replyq,
|
||||
FridaXpcHandler handler, gpointer user_data, GDestroyNotify notify)
|
||||
{
|
||||
xpc_connection_send_message_with_reply (connection, message, replyq, ^(xpc_object_t object)
|
||||
{
|
||||
handler (object, user_data);
|
||||
if (notify != NULL)
|
||||
notify (user_data);
|
||||
});
|
||||
}
|
||||
|
||||
gchar *
|
||||
_frida_xpc_object_to_string (xpc_object_t object)
|
||||
{
|
||||
gchar * result;
|
||||
char * str;
|
||||
|
||||
str = xpc_copy_description (object);
|
||||
result = g_strdup (str);
|
||||
free (str);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_frida_xpc_dictionary_apply (xpc_object_t dict, FridaXpcDictionaryApplier applier, gpointer user_data)
|
||||
{
|
||||
return xpc_dictionary_apply (dict, ^bool (const char * key, xpc_object_t val)
|
||||
{
|
||||
return applier (key, val, user_data);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef __FRIDA_DARWIN_H__
|
||||
#define __FRIDA_DARWIN_H__
|
||||
|
||||
#ifdef HAVE_MACOS
|
||||
|
||||
#include <glib.h>
|
||||
#include <xpc/xpc.h>
|
||||
|
||||
typedef void (* FridaXpcHandler) (xpc_object_t object, gpointer user_data);
|
||||
typedef gboolean (* FridaXpcDictionaryApplier) (const gchar * key, xpc_object_t val, gpointer user_data);
|
||||
|
||||
gpointer _frida_dispatch_retain (gpointer object);
|
||||
|
||||
void _frida_xpc_connection_set_event_handler (xpc_connection_t connection, FridaXpcHandler handler, gpointer user_data);
|
||||
void _frida_xpc_connection_send_message_with_reply (xpc_connection_t connection, xpc_object_t message, dispatch_queue_t replyq,
|
||||
FridaXpcHandler handler, gpointer user_data, GDestroyNotify notify);
|
||||
gchar * _frida_xpc_object_to_string (xpc_object_t object);
|
||||
gboolean _frida_xpc_dictionary_apply (xpc_object_t dict, FridaXpcDictionaryApplier applier, gpointer user_data);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,114 @@
|
||||
namespace Frida.FS {
|
||||
public void mkdirp (File dir, Cancellable? cancellable = null) throws Error {
|
||||
try {
|
||||
dir.make_directory_with_parents (cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
if (!(e is IOError.EXISTS))
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public void rmtree (File dir, Cancellable? cancellable = null) throws Error {
|
||||
rmtree_worker (dir, 0, cancellable);
|
||||
}
|
||||
|
||||
private void rmtree_worker (File dir, uint depth, Cancellable? cancellable = null) throws Error {
|
||||
FileEnumerator enumerator;
|
||||
try {
|
||||
enumerator = dir.enumerate_children (FileAttribute.STANDARD_NAME, NOFOLLOW_SYMLINKS, cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
if (depth == 0 && e is IOError.NOT_FOUND)
|
||||
return;
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
|
||||
try {
|
||||
FileInfo? info;
|
||||
File? child;
|
||||
while (enumerator.iterate (out info, out child, cancellable) && info != null) {
|
||||
if (info == null)
|
||||
continue;
|
||||
if (info.get_file_type () == DIRECTORY)
|
||||
rmtree (child, cancellable);
|
||||
else
|
||||
child.delete (cancellable);
|
||||
}
|
||||
|
||||
dir.delete (cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
if (!(e is IOError.EXISTS))
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public async void rmtree_async (File dir, Cancellable? cancellable = null) throws Error, IOError {
|
||||
yield rmtree_async_worker (dir, 0, cancellable);
|
||||
}
|
||||
|
||||
private async void rmtree_async_worker (File dir, uint depth, Cancellable? cancellable = null) throws Error, IOError {
|
||||
int io_priority = Priority.DEFAULT;
|
||||
|
||||
FileEnumerator enumerator;
|
||||
try {
|
||||
enumerator = yield dir.enumerate_children_async (FileAttribute.STANDARD_NAME, NOFOLLOW_SYMLINKS, io_priority,
|
||||
cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
if (depth == 0 && e is IOError.NOT_FOUND)
|
||||
return;
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
var batch = yield enumerator.next_files_async (1000, io_priority, cancellable);
|
||||
if (batch.is_empty ())
|
||||
break;
|
||||
foreach (FileInfo info in batch) {
|
||||
File child = dir.get_child (info.get_name ());
|
||||
if (info.get_file_type () == DIRECTORY)
|
||||
yield rmtree_async_worker (child, depth + 1, cancellable);
|
||||
else
|
||||
yield child.delete_async (io_priority, cancellable);
|
||||
}
|
||||
}
|
||||
|
||||
yield dir.delete_async (io_priority, cancellable);
|
||||
} catch (GLib.Error e) {
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public async string read_all_text (File f, Cancellable? cancellable) throws Error, IOError {
|
||||
Bytes b = yield read_all_bytes (f, cancellable);
|
||||
string text = (string) b.get_data ();
|
||||
if (!text.validate ())
|
||||
throw new Error.PROTOCOL ("Unable to read '%s': invalid UTF-8", f.get_parse_name ());
|
||||
return text;
|
||||
}
|
||||
|
||||
public async void write_all_text (File f, string t, Cancellable? cancellable) throws Error, IOError {
|
||||
yield write_all_bytes (f, new Bytes (t.data), cancellable);
|
||||
}
|
||||
|
||||
public async Bytes read_all_bytes (File f, Cancellable? cancellable) throws Error, IOError {
|
||||
try {
|
||||
return yield f.load_bytes_async (cancellable, null);
|
||||
} catch (GLib.Error e) {
|
||||
if (e is IOError.CANCELLED)
|
||||
throw (IOError) e;
|
||||
if (e is IOError.NOT_FOUND)
|
||||
throw new Error.INVALID_ARGUMENT ("%s", e.message);
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public async void write_all_bytes (File f, Bytes b, Cancellable? cancellable) throws Error, IOError {
|
||||
try {
|
||||
yield f.replace_contents_bytes_async (b, null, false, FileCreateFlags.NONE, cancellable, null);
|
||||
} catch (GLib.Error e) {
|
||||
if (e is IOError.CANCELLED)
|
||||
throw (IOError) e;
|
||||
throw new Error.PERMISSION_DENIED ("%s", e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __FRIDA_SYSCALL_H__
|
||||
#define __FRIDA_SYSCALL_H__
|
||||
#ifndef __FRIDA_LINUX_SYSCALL_H__
|
||||
#define __FRIDA_LINUX_SYSCALL_H__
|
||||
|
||||
#include <linux/unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#undef SYS_process_vm_readv
|
||||
@@ -14,7 +14,7 @@ namespace Frida {
|
||||
[CCode (cheader_filename = "sys/mman.h", cname = "MAP_ANONYMOUS")]
|
||||
public const int MAP_ANONYMOUS;
|
||||
|
||||
[CCode (cheader_filename = "linux/frida-syscall.h", cprefix = "SYS_", has_type_id = false)]
|
||||
[CCode (cheader_filename = "linux-syscall.h", cprefix = "SYS_", has_type_id = false)]
|
||||
public enum SysCall {
|
||||
memfd_create,
|
||||
pidfd_getfd,
|
||||
@@ -0,0 +1,107 @@
|
||||
namespace Frida {
|
||||
private uint linux_major = 0;
|
||||
private uint linux_minor = 0;
|
||||
|
||||
public bool check_kernel_version (uint major, uint minor) {
|
||||
if (linux_major == 0) {
|
||||
var name = Posix.utsname ();
|
||||
name.release.scanf ("%u.%u", out linux_major, out linux_minor);
|
||||
}
|
||||
|
||||
return (linux_major == major && linux_minor >= minor) || linux_major > major;
|
||||
}
|
||||
|
||||
public class FileDescriptor : Object, FileDescriptorBased {
|
||||
public int handle;
|
||||
|
||||
public FileDescriptor (int handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
~FileDescriptor () {
|
||||
if (handle != -1)
|
||||
Posix.close (handle);
|
||||
}
|
||||
|
||||
public int steal () {
|
||||
int result = handle;
|
||||
handle = -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
public int get_fd () {
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class PidFileDescriptor : FileDescriptor {
|
||||
private uint pid;
|
||||
|
||||
private PidFileDescriptor (int fd, uint pid) {
|
||||
base (fd);
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public static bool is_supported () {
|
||||
return check_kernel_version (5, 3);
|
||||
}
|
||||
|
||||
public static bool getfd_is_supported () {
|
||||
return check_kernel_version (5, 6);
|
||||
}
|
||||
|
||||
public static PidFileDescriptor from_pid (uint pid) throws Error {
|
||||
int fd = pidfd_open (pid, 0);
|
||||
if (fd == -1)
|
||||
throw_pidfd_error (pid, errno);
|
||||
return new PidFileDescriptor (fd, pid);
|
||||
}
|
||||
|
||||
public FileDescriptor getfd (int targetfd) throws Error {
|
||||
int fd = pidfd_getfd (handle, targetfd, 0);
|
||||
if (fd == -1)
|
||||
throw_pidfd_error (pid, errno);
|
||||
return new FileDescriptor (fd);
|
||||
}
|
||||
|
||||
private static int pidfd_open (uint pid, uint flags) {
|
||||
return Linux.syscall (SysCall.pidfd_open, pid, flags);
|
||||
}
|
||||
|
||||
private static int pidfd_getfd (int pidfd, int targetfd, uint flags) {
|
||||
return Linux.syscall (SysCall.pidfd_getfd, pidfd, targetfd, flags);
|
||||
}
|
||||
|
||||
[NoReturn]
|
||||
private static void throw_pidfd_error (uint pid, int err) throws Error {
|
||||
switch (err) {
|
||||
case Posix.ESRCH:
|
||||
throw new Error.PROCESS_NOT_FOUND ("Process not found");
|
||||
case Posix.EPERM:
|
||||
throw new Error.PERMISSION_DENIED ("Unable to use pidfd for pid %u: %s", pid, strerror (err));
|
||||
default:
|
||||
throw new Error.NOT_SUPPORTED ("Unable to use pidfd for pid %u: %s", pid, strerror (err));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace MemoryFileDescriptor {
|
||||
public bool is_supported () {
|
||||
return check_kernel_version (3, 17);
|
||||
}
|
||||
|
||||
public static FileDescriptor from_bytes (string name, Bytes bytes) {
|
||||
assert (is_supported ());
|
||||
|
||||
var fd = new FileDescriptor (memfd_create (name, 0));
|
||||
unowned uint8[] data = bytes.get_data ();
|
||||
ssize_t n = Posix.write (fd.handle, data, data.length);
|
||||
assert (n == data.length);
|
||||
return fd;
|
||||
}
|
||||
|
||||
private int memfd_create (string name, uint flags) {
|
||||
return Linux.syscall (SysCall.memfd_create, name, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
+57
-4
@@ -1,39 +1,92 @@
|
||||
base_sources = [
|
||||
'session.vala',
|
||||
'session-glue.c',
|
||||
'channel.vala',
|
||||
'service.vala',
|
||||
'stream.vala',
|
||||
'rpc.vala',
|
||||
'p2p.vala',
|
||||
'p2p-glue.c',
|
||||
'dbus.vala',
|
||||
'promise.vala',
|
||||
'fs.vala',
|
||||
'socket.vala',
|
||||
'socket-glue.c',
|
||||
'buffer.vala',
|
||||
'value.vala',
|
||||
]
|
||||
|
||||
extra_vala_args = []
|
||||
|
||||
if host_os == 'macos'
|
||||
base_sources += [
|
||||
'xpc.vala',
|
||||
'frida-darwin.c',
|
||||
]
|
||||
endif
|
||||
|
||||
if host_os_family == 'darwin'
|
||||
base_sources += 'corefoundation.vala'
|
||||
endif
|
||||
|
||||
if host_os_family == 'linux'
|
||||
base_sources += 'linux.vala'
|
||||
extra_vala_args += [
|
||||
'--pkg=linux',
|
||||
'--pkg=linux-system',
|
||||
'--pkg=posix',
|
||||
]
|
||||
endif
|
||||
|
||||
extra_deps = []
|
||||
if host_os_family != 'windows'
|
||||
extra_deps += [gio_unix_dep]
|
||||
extra_vala_args += '--pkg=gio-unix-2.0'
|
||||
extra_deps += gio_unix_dep
|
||||
endif
|
||||
|
||||
base_vala_args = [gum_vala_args, '--pkg=gio-2.0', '--pkg=json-glib-1.0']
|
||||
if nice_dep.found()
|
||||
base_vala_args += '--pkg=nice'
|
||||
endif
|
||||
if host_os_family == 'darwin'
|
||||
base_vala_args += [
|
||||
'--pkg=corefoundation',
|
||||
'--pkg=darwin-gcd',
|
||||
'--pkg=darwin-xpc',
|
||||
]
|
||||
endif
|
||||
if host_os_family == 'linux'
|
||||
base_vala_args += [
|
||||
'--vapidir=' + meson.current_source_dir(),
|
||||
'--pkg=gio-unix-2.0',
|
||||
]
|
||||
endif
|
||||
|
||||
base_gir_name = f'FridaBase-@[email protected]'
|
||||
|
||||
base = static_library('frida-base-' + api_version, base_sources,
|
||||
c_args: frida_component_cflags,
|
||||
vala_args: [base_vala_args, '--pkg=libsoup-3.0'] + extra_vala_args,
|
||||
vala_header: 'frida-base.h',
|
||||
vala_gir: base_gir_name,
|
||||
vala_vapi: f'frida-base-@[email protected]',
|
||||
dependencies: [glib_dep, gobject_dep, gio_dep, libsoup_dep, nice_dep, usrsctp_dep, gee_dep, json_glib_dep, gum_dep, openssl_dep] + extra_deps,
|
||||
install: true,
|
||||
install_dir: [true, header_install_dir, true],
|
||||
install_dir: [true, header_install_dir, true, false],
|
||||
)
|
||||
|
||||
base_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
link_with: base,
|
||||
dependencies: [nice_dep, json_glib_dep, gum_dep],
|
||||
dependencies: [nice_dep, json_glib_dep, gum_dep] + extra_deps,
|
||||
)
|
||||
|
||||
base_build_dir = meson.current_build_dir()
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(base,
|
||||
description: 'Frida base library',
|
||||
filebase: f'frida-base-@api_version@',
|
||||
name: 'Frida Base Library',
|
||||
version: frida_version,
|
||||
description: 'Basic building blocks',
|
||||
)
|
||||
+1
-1
@@ -59,7 +59,7 @@ _frida_generate_certificate (guint8 ** cert_der, gint * cert_der_length, gchar *
|
||||
bio = BIO_new (BIO_s_mem ());
|
||||
i2d_X509_bio (bio, x509);
|
||||
n = BIO_get_mem_data (bio, (guint8 **) &der);
|
||||
*cert_der = g_memdup (der, n);
|
||||
*cert_der = g_memdup2 (der, n);
|
||||
*cert_der_length = n;
|
||||
BIO_free (g_steal_pointer (&bio));
|
||||
|
||||
|
||||
+38
-249
@@ -169,7 +169,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class PeerSocket : Object, DatagramBased {
|
||||
public sealed class PeerSocket : Object, DatagramBased {
|
||||
public Nice.Agent agent {
|
||||
get;
|
||||
construct;
|
||||
@@ -447,11 +447,13 @@ namespace Frida {
|
||||
_pending_io = condition;
|
||||
|
||||
foreach (var entry in sources.entries) {
|
||||
Source source = entry.key;
|
||||
unowned Source source = entry.key;
|
||||
IOCondition c = entry.value;
|
||||
if ((_pending_io & c) != 0)
|
||||
source.set_ready_time (0);
|
||||
}
|
||||
|
||||
notify_property ("pending-io");
|
||||
}
|
||||
|
||||
private void prepare_for_io (int64 timeout, Cancellable? cancellable, out int64 deadline) throws IOError {
|
||||
@@ -563,7 +565,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class SctpConnection : IOStream {
|
||||
public sealed class SctpConnection : VirtualStream {
|
||||
public DatagramBased transport_socket {
|
||||
get;
|
||||
construct;
|
||||
@@ -584,55 +586,14 @@ namespace Frida {
|
||||
construct;
|
||||
}
|
||||
|
||||
public State state {
|
||||
get {
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
|
||||
public override InputStream input_stream {
|
||||
get {
|
||||
return _input_stream;
|
||||
}
|
||||
}
|
||||
|
||||
public override OutputStream output_stream {
|
||||
get {
|
||||
return _output_stream;
|
||||
}
|
||||
}
|
||||
|
||||
public IOCondition pending_io {
|
||||
get {
|
||||
lock (state)
|
||||
return sctp_events;
|
||||
}
|
||||
}
|
||||
|
||||
private State _state = CREATED;
|
||||
private SctpInputStream _input_stream;
|
||||
private SctpOutputStream _output_stream;
|
||||
|
||||
private DatagramBasedSource transport_source;
|
||||
private uint8[] transport_buffer = new uint8[65536];
|
||||
|
||||
private void * sctp_socket;
|
||||
private IOCondition sctp_events = 0;
|
||||
private SctpTimerSource sctp_source;
|
||||
private uint16 stream_id;
|
||||
private ByteArray dcep_message = new ByteArray ();
|
||||
|
||||
private Gee.Map<unowned Source, IOCondition> sources = new Gee.HashMap<unowned Source, IOCondition> ();
|
||||
|
||||
private Cancellable io_cancellable = new Cancellable ();
|
||||
|
||||
public enum State {
|
||||
CREATED,
|
||||
OPENING,
|
||||
OPENED,
|
||||
CLOSED
|
||||
}
|
||||
|
||||
public SctpConnection (DatagramBased transport_socket, PeerSetup setup, uint16 port, size_t max_message_size) {
|
||||
Object (
|
||||
transport_socket: transport_socket,
|
||||
@@ -649,14 +610,9 @@ namespace Frida {
|
||||
protected extern static void _initialize_sctp_backend ();
|
||||
|
||||
construct {
|
||||
_input_stream = new SctpInputStream (this);
|
||||
_output_stream = new SctpOutputStream (this);
|
||||
|
||||
sctp_socket = _create_sctp_socket ();
|
||||
_connect_sctp_socket (sctp_socket, port);
|
||||
|
||||
var main_context = MainContext.get_thread_default ();
|
||||
|
||||
transport_source = transport_socket.create_source (IOCondition.IN, io_cancellable);
|
||||
transport_source.set_callback (on_transport_socket_readable);
|
||||
transport_source.attach (main_context);
|
||||
@@ -669,17 +625,22 @@ namespace Frida {
|
||||
|
||||
protected extern void _connect_sctp_socket (void * sock, uint16 port);
|
||||
|
||||
public override bool close (GLib.Cancellable? cancellable) throws IOError {
|
||||
do_close ();
|
||||
return true;
|
||||
protected override VirtualStream.State query_initial_state () {
|
||||
return CREATED;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws IOError {
|
||||
do_close ();
|
||||
return true;
|
||||
protected override IOCondition query_events () {
|
||||
return _query_sctp_socket_events (sctp_socket);
|
||||
}
|
||||
|
||||
private void do_close () {
|
||||
protected override void update_pending_io () {
|
||||
base.update_pending_io ();
|
||||
sctp_source.invalidate ();
|
||||
}
|
||||
|
||||
protected extern static IOCondition _query_sctp_socket_events (void * sock);
|
||||
|
||||
protected override void handle_close () {
|
||||
sctp_source.destroy ();
|
||||
transport_source.destroy ();
|
||||
|
||||
@@ -689,13 +650,17 @@ namespace Frida {
|
||||
|
||||
public extern static void _close (void * sock);
|
||||
|
||||
public void shutdown (SctpShutdownType type) throws IOError {
|
||||
_shutdown (sctp_socket, type);
|
||||
public override void shutdown_read () throws IOError {
|
||||
_shutdown (sctp_socket, READ);
|
||||
}
|
||||
|
||||
public override void shutdown_write () throws IOError {
|
||||
_shutdown (sctp_socket, WRITE);
|
||||
}
|
||||
|
||||
public extern static void _shutdown (void * sock, SctpShutdownType type) throws IOError;
|
||||
|
||||
public ssize_t recv (uint8[] buffer) throws IOError {
|
||||
public override ssize_t read (uint8[] buffer) throws IOError {
|
||||
ssize_t n = -1;
|
||||
|
||||
try {
|
||||
@@ -711,18 +676,18 @@ namespace Frida {
|
||||
handle_dcep_message (stream_id, dcep_message.steal ());
|
||||
}
|
||||
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
|
||||
} else if (protocol_id == NONE || _state != OPENED) {
|
||||
} else if (protocol_id == NONE || state != OPEN) {
|
||||
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
|
||||
}
|
||||
} finally {
|
||||
update_sctp_events ();
|
||||
update_pending_io ();
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
public ssize_t send (uint8[] buffer) throws IOError {
|
||||
if (_state != OPENED)
|
||||
public override ssize_t write (uint8[] buffer) throws IOError {
|
||||
if (state != OPEN)
|
||||
throw new IOError.WOULD_BLOCK ("Resource temporarily unavailable");
|
||||
|
||||
ssize_t n = ssize_t.min (buffer.length, (ssize_t) max_message_size);
|
||||
@@ -730,20 +695,10 @@ namespace Frida {
|
||||
try {
|
||||
return _send (sctp_socket, stream_id, WEBRTC_BINARY, buffer[0:n]);
|
||||
} finally {
|
||||
update_sctp_events ();
|
||||
update_pending_io ();
|
||||
}
|
||||
}
|
||||
|
||||
public void register_source (Source source, IOCondition condition) {
|
||||
lock (state)
|
||||
sources[source] = condition | IOCondition.ERR | IOCondition.HUP;
|
||||
}
|
||||
|
||||
public void unregister_source (Source source) {
|
||||
lock (state)
|
||||
sources.unset (source);
|
||||
}
|
||||
|
||||
private bool on_transport_socket_readable (DatagramBased datagram_based, IOCondition condition) {
|
||||
var v = InputVector ();
|
||||
v.buffer = transport_buffer;
|
||||
@@ -774,31 +729,18 @@ namespace Frida {
|
||||
protected extern void _handle_transport_packet (uint8[] data);
|
||||
|
||||
protected int _emit_transport_packet (uint8[] data) {
|
||||
var v = OutputVector ();
|
||||
v.buffer = data;
|
||||
v.size = data.length;
|
||||
|
||||
OutputVector[] vectors = { v };
|
||||
|
||||
var m = OutputMessage ();
|
||||
m.vectors = vectors;
|
||||
m.num_vectors = vectors.length;
|
||||
|
||||
OutputMessage[] messages = { m };
|
||||
|
||||
try {
|
||||
transport_socket.send_messages (messages, 0, 0, io_cancellable);
|
||||
Udp.send (data, transport_socket, io_cancellable);
|
||||
return 0;
|
||||
} catch (GLib.Error e) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected void _on_sctp_socket_events_changed () {
|
||||
update_sctp_events ();
|
||||
update_pending_io ();
|
||||
|
||||
if (_state == CREATED && setup == ACTIVE && (sctp_events & IOCondition.OUT) != 0) {
|
||||
if (state == CREATED && setup == ACTIVE && (pending_io & IOCondition.OUT) != 0) {
|
||||
stream_id = 1;
|
||||
|
||||
uint8[] open_message = {
|
||||
@@ -812,31 +754,12 @@ namespace Frida {
|
||||
};
|
||||
try {
|
||||
_send (sctp_socket, stream_id, WEBRTC_DCEP, open_message);
|
||||
_state = OPENING;
|
||||
state = OPENING;
|
||||
} catch (IOError e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void update_sctp_events () {
|
||||
IOCondition new_events = _query_sctp_socket_events (sctp_socket);
|
||||
|
||||
lock (state) {
|
||||
sctp_events = new_events;
|
||||
|
||||
foreach (var entry in sources.entries) {
|
||||
Source source = entry.key;
|
||||
IOCondition c = entry.value;
|
||||
if ((new_events & c) != 0)
|
||||
source.set_ready_time (0);
|
||||
}
|
||||
|
||||
sctp_source.invalidate ();
|
||||
}
|
||||
}
|
||||
|
||||
protected extern static IOCondition _query_sctp_socket_events (void * sock);
|
||||
|
||||
protected extern static ssize_t _recv (void * sock, uint8[] buffer, out uint16 stream_id,
|
||||
out PayloadProtocolId protocol_id, out SctpMessageFlags message_flags) throws IOError;
|
||||
|
||||
@@ -848,7 +771,7 @@ namespace Frida {
|
||||
|
||||
switch (type) {
|
||||
case DATA_CHANNEL_OPEN: {
|
||||
if (_state != CREATED || setup == ACTIVE)
|
||||
if (state != CREATED || setup == ACTIVE)
|
||||
return;
|
||||
|
||||
this.stream_id = stream_id;
|
||||
@@ -856,15 +779,15 @@ namespace Frida {
|
||||
uint8[] reply = { DcepMessageType.DATA_CHANNEL_ACK };
|
||||
_send (sctp_socket, stream_id, WEBRTC_DCEP, reply);
|
||||
|
||||
_state = OPENED;
|
||||
state = OPEN;
|
||||
|
||||
break;
|
||||
}
|
||||
case DATA_CHANNEL_ACK:
|
||||
if (_state != OPENING)
|
||||
if (state != OPENING)
|
||||
return;
|
||||
|
||||
_state = OPENED;
|
||||
state = OPEN;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -899,140 +822,6 @@ namespace Frida {
|
||||
DATA_CHANNEL_ACK = 0x02
|
||||
}
|
||||
|
||||
private class SctpInputStream : InputStream, PollableInputStream {
|
||||
public weak SctpConnection connection {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public SctpInputStream (SctpConnection connection) {
|
||||
Object (connection: connection);
|
||||
}
|
||||
|
||||
public override bool close (Cancellable? cancellable) throws IOError {
|
||||
connection.shutdown (READ);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
|
||||
return close (cancellable);
|
||||
}
|
||||
|
||||
public override ssize_t read (uint8[] buffer, Cancellable? cancellable) throws IOError {
|
||||
assert_not_reached ();
|
||||
}
|
||||
|
||||
public bool can_poll () {
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool is_readable () {
|
||||
return (connection.pending_io & IOCondition.IN) != 0;
|
||||
}
|
||||
|
||||
public PollableSource create_source (Cancellable? cancellable) {
|
||||
return new PollableSource.full (this, new SctpIOSource (connection, IOCondition.IN), cancellable);
|
||||
}
|
||||
|
||||
public ssize_t read_nonblocking_fn (uint8[] buffer) throws GLib.Error {
|
||||
return connection.recv (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
private class SctpOutputStream : OutputStream, PollableOutputStream {
|
||||
public weak SctpConnection connection {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public SctpOutputStream (SctpConnection connection) {
|
||||
Object (connection: connection);
|
||||
}
|
||||
|
||||
public override bool close (Cancellable? cancellable) throws IOError {
|
||||
connection.shutdown (WRITE);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
|
||||
return close (cancellable);
|
||||
}
|
||||
|
||||
public override bool flush (GLib.Cancellable? cancellable) throws GLib.Error {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool flush_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override ssize_t write (uint8[] buffer, Cancellable? cancellable) throws IOError {
|
||||
assert_not_reached ();
|
||||
}
|
||||
|
||||
public bool can_poll () {
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool is_writable () {
|
||||
return (connection.pending_io & IOCondition.OUT) != 0;
|
||||
}
|
||||
|
||||
public PollableSource create_source (Cancellable? cancellable) {
|
||||
return new PollableSource.full (this, new SctpIOSource (connection, IOCondition.OUT), cancellable);
|
||||
}
|
||||
|
||||
public ssize_t write_nonblocking_fn (uint8[]? buffer) throws GLib.Error {
|
||||
return connection.send (buffer);
|
||||
}
|
||||
|
||||
public PollableReturn writev_nonblocking_fn (OutputVector[] vectors, out size_t bytes_written) throws GLib.Error {
|
||||
assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
private class SctpIOSource : Source {
|
||||
public SctpConnection connection;
|
||||
public IOCondition condition;
|
||||
|
||||
public SctpIOSource (SctpConnection connection, IOCondition condition) {
|
||||
this.connection = connection;
|
||||
this.condition = condition;
|
||||
|
||||
connection.register_source (this, condition);
|
||||
}
|
||||
|
||||
~SctpIOSource () {
|
||||
connection.unregister_source (this);
|
||||
}
|
||||
|
||||
protected override bool prepare (out int timeout) {
|
||||
timeout = -1;
|
||||
return (connection.pending_io & condition) != 0;
|
||||
}
|
||||
|
||||
protected override bool check () {
|
||||
return (connection.pending_io & condition) != 0;
|
||||
}
|
||||
|
||||
protected override bool dispatch (SourceFunc? callback) {
|
||||
set_ready_time (-1);
|
||||
|
||||
if (callback == null)
|
||||
return Source.REMOVE;
|
||||
|
||||
return callback ();
|
||||
}
|
||||
|
||||
protected static bool closure_callback (Closure closure) {
|
||||
var return_value = Value (typeof (bool));
|
||||
|
||||
closure.invoke (ref return_value, {});
|
||||
|
||||
return return_value.get_boolean ();
|
||||
}
|
||||
}
|
||||
|
||||
private class SctpTimerSource : Source {
|
||||
private static int64 last_process_time = -1;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class Promise<T> {
|
||||
public sealed class Promise<T> {
|
||||
private Impl<T> impl;
|
||||
|
||||
public Future<T> future {
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class RpcClient : Object {
|
||||
public sealed class RpcClient : Object {
|
||||
public weak RpcPeer peer {
|
||||
get;
|
||||
construct;
|
||||
@@ -11,7 +11,7 @@ namespace Frida {
|
||||
Object (peer: peer);
|
||||
}
|
||||
|
||||
public async Json.Node call (string method, Json.Node[] args, Cancellable? cancellable) throws Error, IOError {
|
||||
public async Json.Node call (string method, Json.Node[] args, Bytes? data, Cancellable? cancellable) throws Error, IOError {
|
||||
string request_id = Uuid.string_random ();
|
||||
|
||||
var request = new Json.Builder ();
|
||||
@@ -39,7 +39,7 @@ namespace Frida {
|
||||
pending_responses[request_id] = pending;
|
||||
|
||||
try {
|
||||
yield peer.post_rpc_message (raw_request, cancellable);
|
||||
yield peer.post_rpc_message (raw_request, data, cancellable);
|
||||
} catch (Error e) {
|
||||
if (pending_responses.unset (request_id))
|
||||
pending.complete_with_error (e);
|
||||
@@ -158,6 +158,6 @@ namespace Frida {
|
||||
}
|
||||
|
||||
public interface RpcPeer : Object {
|
||||
public abstract async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError;
|
||||
public abstract async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
namespace Frida {
|
||||
public sealed class ServiceSessionRegistry : Object {
|
||||
public signal void session_closed (ServiceSessionId id);
|
||||
|
||||
private Gee.Map<ServiceSessionId?, ServiceSession> sessions =
|
||||
new Gee.HashMap<ServiceSessionId?, ServiceSession> (ServiceSessionId.hash, ServiceSessionId.equal);
|
||||
|
||||
~ServiceSessionRegistry () {
|
||||
clear ();
|
||||
}
|
||||
|
||||
public void clear () {
|
||||
foreach (var session in sessions.values.to_array ())
|
||||
session.close ();
|
||||
sessions.clear ();
|
||||
}
|
||||
|
||||
public void register (ServiceSessionId id, ServiceSession session) {
|
||||
sessions[id] = session;
|
||||
|
||||
ServiceSessionId? boxed_id = id;
|
||||
session.set_data ("service-session-id", boxed_id);
|
||||
|
||||
session.close.connect (on_session_close);
|
||||
}
|
||||
|
||||
public ServiceSession link (ServiceSessionId id) throws Error {
|
||||
var session = sessions[id];
|
||||
if (session == null)
|
||||
throw new Error.INVALID_ARGUMENT ("Invalid session ID");
|
||||
return session;
|
||||
}
|
||||
|
||||
public void unlink (ServiceSessionId id) {
|
||||
ServiceSession? session;
|
||||
if (sessions.unset (id, out session)) {
|
||||
session.close.disconnect (on_session_close);
|
||||
|
||||
session_closed (id);
|
||||
}
|
||||
}
|
||||
|
||||
private void on_session_close (ServiceSession session) {
|
||||
ServiceSessionId? id = session.get_data ("service-session-id");
|
||||
unlink (id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#if defined (HAVE_WINDOWS)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
gchar *
|
||||
_frida_query_windows_version (void)
|
||||
{
|
||||
|
||||
+138
-28
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
[DBus (name = "re.frida.HostSession16")]
|
||||
[DBus (name = "re.frida.HostSession17")]
|
||||
public interface HostSession : Object {
|
||||
public abstract async void ping (uint interval_seconds, Cancellable? cancellable) throws GLib.Error;
|
||||
|
||||
@@ -27,6 +27,10 @@ namespace Frida {
|
||||
public abstract async InjectorPayloadId inject_library_blob (uint pid, uint8[] blob, string entrypoint, string data,
|
||||
Cancellable? cancellable) throws GLib.Error;
|
||||
|
||||
public abstract async ChannelId open_channel (string address, Cancellable? cancellable) throws GLib.Error;
|
||||
|
||||
public abstract async ServiceSessionId open_service (string address, Cancellable? cancellable) throws GLib.Error;
|
||||
|
||||
public signal void spawn_added (HostSpawnInfo info);
|
||||
public signal void spawn_removed (HostSpawnInfo info);
|
||||
public signal void child_added (HostChildInfo info);
|
||||
@@ -34,10 +38,12 @@ namespace Frida {
|
||||
public signal void process_crashed (CrashInfo crash);
|
||||
public signal void output (uint pid, int fd, uint8[] data);
|
||||
public signal void agent_session_detached (AgentSessionId id, SessionDetachReason reason, CrashInfo crash);
|
||||
public signal void channel_closed (ChannelId id);
|
||||
public signal void service_session_closed (ServiceSessionId id);
|
||||
public signal void uninjected (InjectorPayloadId id);
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.AgentSessionProvider16")]
|
||||
[DBus (name = "re.frida.AgentSessionProvider17")]
|
||||
public interface AgentSessionProvider : Object {
|
||||
public abstract async void open (AgentSessionId id, HashTable<string, Variant> options,
|
||||
Cancellable? cancellable) throws GLib.Error;
|
||||
@@ -52,7 +58,7 @@ namespace Frida {
|
||||
public signal void child_gating_changed (uint subscriber_count);
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.AgentSession16")]
|
||||
[DBus (name = "re.frida.AgentSession17")]
|
||||
public interface AgentSession : Object {
|
||||
public abstract async void close (Cancellable? cancellable) throws GLib.Error;
|
||||
|
||||
@@ -94,7 +100,7 @@ namespace Frida {
|
||||
public signal void candidate_gathering_done ();
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.AgentController16")]
|
||||
[DBus (name = "re.frida.AgentController17")]
|
||||
public interface AgentController : Object {
|
||||
#if !WINDOWS
|
||||
public abstract async HostChildId prepare_to_fork (uint parent_pid, Cancellable? cancellable, out uint parent_injectee_id,
|
||||
@@ -115,7 +121,7 @@ namespace Frida {
|
||||
Cancellable? cancellable) throws GLib.Error;
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.AgentMessageSink16")]
|
||||
[DBus (name = "re.frida.AgentMessageSink17")]
|
||||
public interface AgentMessageSink : Object {
|
||||
public abstract async void post_messages (AgentMessage[] messages, uint batch_id,
|
||||
Cancellable? cancellable) throws GLib.Error;
|
||||
@@ -145,11 +151,16 @@ namespace Frida {
|
||||
DEBUGGER
|
||||
}
|
||||
|
||||
public class AgentMessageTransmitter : Object {
|
||||
public sealed class AgentMessageTransmitter : Object {
|
||||
public signal void closed ();
|
||||
public signal void new_candidates (string[] candidate_sdps);
|
||||
public signal void candidate_gathering_done ();
|
||||
|
||||
public weak AgentSession agent_session {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public uint persist_timeout {
|
||||
get;
|
||||
construct;
|
||||
@@ -198,8 +209,10 @@ namespace Frida {
|
||||
INTERRUPTED
|
||||
}
|
||||
|
||||
public AgentMessageTransmitter (uint persist_timeout, MainContext frida_context, MainContext dbus_context) {
|
||||
public AgentMessageTransmitter (AgentSession agent_session, uint persist_timeout, MainContext frida_context,
|
||||
MainContext dbus_context) {
|
||||
Object (
|
||||
agent_session: agent_session,
|
||||
persist_timeout: persist_timeout,
|
||||
frida_context: frida_context,
|
||||
dbus_context: dbus_context
|
||||
@@ -500,8 +513,7 @@ namespace Frida {
|
||||
nice_connection.on_closed.connect (on_nice_connection_closed);
|
||||
|
||||
try {
|
||||
nice_registration_id = nice_connection.register_object (ObjectPath.AGENT_SESSION,
|
||||
(AgentSession) this);
|
||||
nice_registration_id = nice_connection.register_object (ObjectPath.AGENT_SESSION, agent_session);
|
||||
} catch (IOError io_error) {
|
||||
assert_not_reached ();
|
||||
}
|
||||
@@ -737,13 +749,30 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.TransportBroker16")]
|
||||
[DBus (name = "re.frida.Channel17")]
|
||||
public interface Channel : Object {
|
||||
public abstract async void close (Cancellable? cancellable) throws GLib.Error;
|
||||
public abstract async void input (uint8[] data, Cancellable? cancellable) throws GLib.Error;
|
||||
public signal void output (uint8[] data);
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.ServiceSession17")]
|
||||
public interface ServiceSession : Object {
|
||||
public signal void close ();
|
||||
public signal void message (Variant message);
|
||||
|
||||
public abstract async void activate (Cancellable? cancellable) throws GLib.Error;
|
||||
public abstract async void cancel (Cancellable? cancellable) throws GLib.Error;
|
||||
public abstract async Variant request (Variant parameters, Cancellable? cancellable) throws GLib.Error;
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.TransportBroker17")]
|
||||
public interface TransportBroker : Object {
|
||||
public abstract async void open_tcp_transport (AgentSessionId id, Cancellable? cancellable, out uint16 port,
|
||||
out string token) throws GLib.Error;
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.PortalSession16")]
|
||||
[DBus (name = "re.frida.PortalSession17")]
|
||||
public interface PortalSession : Object {
|
||||
public abstract async void join (HostApplicationInfo app, SpawnStartState current_state,
|
||||
AgentSessionId[] interrupted_sessions, HashTable<string, Variant> options, Cancellable? cancellable,
|
||||
@@ -752,19 +781,19 @@ namespace Frida {
|
||||
public signal void kill ();
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.BusSession16")]
|
||||
[DBus (name = "re.frida.BusSession17")]
|
||||
public interface BusSession : Object {
|
||||
public abstract async void attach (Cancellable? cancellable) throws GLib.Error;
|
||||
public abstract async void post (string json, bool has_data, uint8[] data, Cancellable? cancellable) throws GLib.Error;
|
||||
public signal void message (string json, bool has_data, uint8[] data);
|
||||
}
|
||||
|
||||
[DBus (name = "re.frida.AuthenticationService16")]
|
||||
[DBus (name = "re.frida.AuthenticationService17")]
|
||||
public interface AuthenticationService : Object {
|
||||
public abstract async string authenticate (string token, Cancellable? cancellable) throws GLib.Error;
|
||||
}
|
||||
|
||||
public class StaticAuthenticationService : Object, AuthenticationService {
|
||||
public sealed class StaticAuthenticationService : Object, AuthenticationService {
|
||||
public string token_hash {
|
||||
get;
|
||||
construct;
|
||||
@@ -789,13 +818,13 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class NullAuthenticationService : Object, AuthenticationService {
|
||||
public sealed class NullAuthenticationService : Object, AuthenticationService {
|
||||
public async string authenticate (string token, Cancellable? cancellable) throws Error, IOError {
|
||||
throw new Error.INVALID_OPERATION ("Authentication not expected");
|
||||
}
|
||||
}
|
||||
|
||||
public class UnauthorizedHostSession : Object, HostSession {
|
||||
public sealed class UnauthorizedHostSession : Object, HostSession {
|
||||
public async void ping (uint interval_seconds, Cancellable? cancellable) throws Error, IOError {
|
||||
throw_not_authorized ();
|
||||
}
|
||||
@@ -869,9 +898,17 @@ namespace Frida {
|
||||
Cancellable? cancellable) throws Error, IOError {
|
||||
throw_not_authorized ();
|
||||
}
|
||||
|
||||
public async ChannelId open_channel (string address, Cancellable? cancellable) throws Error, IOError {
|
||||
throw_not_authorized ();
|
||||
}
|
||||
|
||||
public async ServiceSessionId open_service (string address, Cancellable? cancellable) throws Error, IOError {
|
||||
throw_not_authorized ();
|
||||
}
|
||||
}
|
||||
|
||||
public class UnauthorizedPortalSession : Object, PortalSession {
|
||||
public sealed class UnauthorizedPortalSession : Object, PortalSession {
|
||||
public async void join (HostApplicationInfo app, SpawnStartState current_state,
|
||||
AgentSessionId[] interrupted_sessions, HashTable<string, Variant> options,
|
||||
Cancellable? cancellable, out SpawnStartState next_state) throws Error, IOError {
|
||||
@@ -879,7 +916,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class UnauthorizedBusSession : Object, BusSession {
|
||||
public sealed class UnauthorizedBusSession : Object, BusSession {
|
||||
public async void attach (Cancellable? cancellable) throws Error, IOError {
|
||||
throw_not_authorized ();
|
||||
}
|
||||
@@ -1077,7 +1114,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class FrontmostQueryOptions : Object {
|
||||
public sealed class FrontmostQueryOptions : Object {
|
||||
public Scope scope {
|
||||
get;
|
||||
set;
|
||||
@@ -1107,7 +1144,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class ApplicationQueryOptions : Object {
|
||||
public sealed class ApplicationQueryOptions : Object {
|
||||
public Scope scope {
|
||||
get;
|
||||
set;
|
||||
@@ -1165,7 +1202,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class ProcessQueryOptions : Object {
|
||||
public sealed class ProcessQueryOptions : Object {
|
||||
public Scope scope {
|
||||
get;
|
||||
set;
|
||||
@@ -1307,7 +1344,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class SessionOptions : Object {
|
||||
public sealed class SessionOptions : Object {
|
||||
public Realm realm {
|
||||
get;
|
||||
set;
|
||||
@@ -1496,6 +1533,46 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public struct ChannelId {
|
||||
public string handle;
|
||||
|
||||
public ChannelId (string handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public ChannelId.generate () {
|
||||
this.handle = Uuid.string_random ().replace ("-", "");
|
||||
}
|
||||
|
||||
public static uint hash (ChannelId? id) {
|
||||
return id.handle.hash ();
|
||||
}
|
||||
|
||||
public static bool equal (ChannelId? a, ChannelId? b) {
|
||||
return a.handle == b.handle;
|
||||
}
|
||||
}
|
||||
|
||||
public struct ServiceSessionId {
|
||||
public string handle;
|
||||
|
||||
public ServiceSessionId (string handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public ServiceSessionId.generate () {
|
||||
this.handle = Uuid.string_random ().replace ("-", "");
|
||||
}
|
||||
|
||||
public static uint hash (ServiceSessionId? id) {
|
||||
return id.handle.hash ();
|
||||
}
|
||||
|
||||
public static bool equal (ServiceSessionId? a, ServiceSessionId? b) {
|
||||
return a.handle == b.handle;
|
||||
}
|
||||
}
|
||||
|
||||
public struct AgentScriptId {
|
||||
public uint handle;
|
||||
|
||||
@@ -1512,7 +1589,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class ScriptOptions : Object {
|
||||
public sealed class ScriptOptions : Object {
|
||||
public string? name {
|
||||
get;
|
||||
set;
|
||||
@@ -1602,7 +1679,7 @@ namespace Frida {
|
||||
SHARED_MEMORY
|
||||
}
|
||||
|
||||
public class SnapshotOptions : Object {
|
||||
public sealed class SnapshotOptions : Object {
|
||||
public string? warmup_script {
|
||||
get;
|
||||
set;
|
||||
@@ -1677,7 +1754,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class PortalOptions : Object {
|
||||
public sealed class PortalOptions : Object {
|
||||
public TlsCertificate? certificate {
|
||||
get;
|
||||
set;
|
||||
@@ -1740,7 +1817,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class PeerOptions : Object {
|
||||
public sealed class PeerOptions : Object {
|
||||
public string? stun_server {
|
||||
get;
|
||||
set;
|
||||
@@ -1801,7 +1878,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class Relay : Object {
|
||||
public sealed class Relay : Object {
|
||||
public string address {
|
||||
get;
|
||||
construct;
|
||||
@@ -2042,7 +2119,8 @@ namespace Frida {
|
||||
public const string AGENT_SESSION = "/re/frida/AgentSession";
|
||||
public const string AGENT_CONTROLLER = "/re/frida/AgentController";
|
||||
public const string AGENT_MESSAGE_SINK = "/re/frida/AgentMessageSink";
|
||||
public const string CHILD_SESSION = "/re/frida/ChildSession";
|
||||
public const string CHANNEL = "/re/frida/Channel";
|
||||
public const string SERVICE = "/re/frida/Service";
|
||||
public const string TRANSPORT_BROKER = "/re/frida/TransportBroker";
|
||||
public const string PORTAL_SESSION = "/re/frida/PortalSession";
|
||||
public const string BUS_SESSION = "/re/frida/BusSession";
|
||||
@@ -2055,6 +2133,14 @@ namespace Frida {
|
||||
public static string for_agent_message_sink (AgentSessionId id) {
|
||||
return AGENT_MESSAGE_SINK + "/" + id.handle;
|
||||
}
|
||||
|
||||
public static string for_channel (ChannelId id) {
|
||||
return CHANNEL + "/" + id.handle;
|
||||
}
|
||||
|
||||
public static string for_service_session (ServiceSessionId id) {
|
||||
return SERVICE + "/" + id.handle;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Marshal {
|
||||
@@ -2071,4 +2157,28 @@ namespace Frida {
|
||||
return klass.get_value (val).value_nick;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Numeric {
|
||||
public uint int64_hash (int64? val) {
|
||||
uint64 v = (uint64) val.abs ();
|
||||
return (uint) ((v >> 32) ^ (v & 0xffffffffU));
|
||||
}
|
||||
|
||||
public bool int64_equal (int64? val_a, int64? val_b) {
|
||||
int64 a = val_a;
|
||||
int64 b = val_b;
|
||||
return a == b;
|
||||
}
|
||||
|
||||
public uint uint64_hash (uint64? val) {
|
||||
uint64 v = val;
|
||||
return (uint) ((v >> 32) ^ (v & 0xffffffffU));
|
||||
}
|
||||
|
||||
public bool uint64_equal (uint64? val_a, uint64? val_b) {
|
||||
uint64 a = val_a;
|
||||
uint64 b = val_b;
|
||||
return a == b;
|
||||
}
|
||||
}
|
||||
}
|
||||
+610
-587
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,336 @@
|
||||
namespace Frida {
|
||||
public abstract class VirtualStream : IOStream {
|
||||
public override InputStream input_stream {
|
||||
get {
|
||||
return _input_stream;
|
||||
}
|
||||
}
|
||||
|
||||
public override OutputStream output_stream {
|
||||
get {
|
||||
return _output_stream;
|
||||
}
|
||||
}
|
||||
|
||||
public IOCondition pending_io {
|
||||
get {
|
||||
lock (state)
|
||||
return _pending_io;
|
||||
}
|
||||
}
|
||||
|
||||
protected State state = OPEN;
|
||||
|
||||
private VirtualInputStream _input_stream;
|
||||
private VirtualOutputStream _output_stream;
|
||||
|
||||
private IOCondition _pending_io;
|
||||
|
||||
private Gee.Map<unowned Source, IOCondition> sources = new Gee.HashMap<unowned Source, IOCondition> ();
|
||||
|
||||
protected Cancellable io_cancellable = new Cancellable ();
|
||||
|
||||
protected MainContext main_context;
|
||||
|
||||
protected enum State {
|
||||
CREATED,
|
||||
OPENING,
|
||||
OPEN,
|
||||
CLOSED
|
||||
}
|
||||
|
||||
protected delegate void WorkFunc ();
|
||||
|
||||
construct {
|
||||
_input_stream = new VirtualInputStream (this);
|
||||
_output_stream = new VirtualOutputStream (this);
|
||||
|
||||
main_context = MainContext.ref_thread_default ();
|
||||
|
||||
state = query_initial_state ();
|
||||
_pending_io = query_events ();
|
||||
}
|
||||
|
||||
public override void dispose () {
|
||||
_output_stream.detach ();
|
||||
_input_stream.detach ();
|
||||
|
||||
io_cancellable.cancel ();
|
||||
|
||||
base.dispose ();
|
||||
}
|
||||
|
||||
protected virtual State query_initial_state () {
|
||||
return OPEN;
|
||||
}
|
||||
|
||||
protected abstract IOCondition query_events ();
|
||||
|
||||
public override bool close (GLib.Cancellable? cancellable) throws IOError {
|
||||
_close ();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, GLib.Cancellable? cancellable) throws IOError {
|
||||
_close ();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void _close () {
|
||||
if (main_context.is_owner ()) {
|
||||
do_close ();
|
||||
} else {
|
||||
var source = new IdleSource ();
|
||||
source.set_callback (() => {
|
||||
do_close ();
|
||||
return Source.REMOVE;
|
||||
});
|
||||
source.attach (main_context);
|
||||
}
|
||||
}
|
||||
|
||||
private void do_close () {
|
||||
if (state == CLOSED)
|
||||
return;
|
||||
|
||||
handle_close ();
|
||||
}
|
||||
|
||||
protected abstract void handle_close ();
|
||||
|
||||
public virtual void shutdown_read () throws IOError {
|
||||
}
|
||||
|
||||
public virtual void shutdown_write () throws IOError {
|
||||
}
|
||||
|
||||
public abstract ssize_t read (uint8[] buffer) throws IOError;
|
||||
|
||||
public abstract ssize_t write (uint8[] buffer) throws IOError;
|
||||
|
||||
protected void with_state_lock (WorkFunc func) {
|
||||
lock (state)
|
||||
func ();
|
||||
}
|
||||
|
||||
public void register_source (Source source, IOCondition condition) {
|
||||
lock (state)
|
||||
sources[source] = condition | IOCondition.ERR | IOCondition.HUP;
|
||||
}
|
||||
|
||||
public void unregister_source (Source source) {
|
||||
lock (state)
|
||||
sources.unset (source);
|
||||
}
|
||||
|
||||
protected virtual void update_pending_io () {
|
||||
lock (state) {
|
||||
_pending_io = query_events ();
|
||||
|
||||
foreach (var entry in sources.entries) {
|
||||
unowned Source source = entry.key;
|
||||
IOCondition c = entry.value;
|
||||
if ((_pending_io & c) != 0)
|
||||
source.set_ready_time (0);
|
||||
}
|
||||
}
|
||||
|
||||
notify_property ("pending-io");
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class VirtualInputStream : InputStream, PollableInputStream {
|
||||
private weak VirtualStream stream;
|
||||
|
||||
public VirtualInputStream (VirtualStream stream) {
|
||||
Object ();
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
internal void detach () {
|
||||
stream = null;
|
||||
}
|
||||
|
||||
public override bool close (Cancellable? cancellable) throws IOError {
|
||||
if (stream != null)
|
||||
stream.shutdown_read ();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
|
||||
return close (cancellable);
|
||||
}
|
||||
|
||||
public override ssize_t read (uint8[] buffer, Cancellable? cancellable) throws IOError {
|
||||
if (stream == null)
|
||||
return 0;
|
||||
|
||||
if (!is_readable ()) {
|
||||
bool done = false;
|
||||
var mutex = Mutex ();
|
||||
var cond = Cond ();
|
||||
|
||||
ulong io_handler = stream.notify["pending-io"].connect ((obj, pspec) => {
|
||||
if (is_readable ()) {
|
||||
mutex.lock ();
|
||||
done = true;
|
||||
cond.signal ();
|
||||
mutex.unlock ();
|
||||
}
|
||||
});
|
||||
ulong cancellation_handler = 0;
|
||||
if (cancellable != null) {
|
||||
cancellation_handler = cancellable.connect (() => {
|
||||
mutex.lock ();
|
||||
done = true;
|
||||
cond.signal ();
|
||||
mutex.unlock ();
|
||||
});
|
||||
}
|
||||
|
||||
if (!is_readable ()) {
|
||||
mutex.lock ();
|
||||
while (!done)
|
||||
cond.wait (mutex);
|
||||
mutex.unlock ();
|
||||
}
|
||||
|
||||
if (cancellation_handler != 0)
|
||||
cancellable.disconnect (cancellation_handler);
|
||||
stream.disconnect (io_handler);
|
||||
|
||||
cancellable.set_error_if_cancelled ();
|
||||
}
|
||||
|
||||
return stream.read (buffer);
|
||||
}
|
||||
|
||||
public bool can_poll () {
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool is_readable () {
|
||||
if (stream == null)
|
||||
return true;
|
||||
return (stream.pending_io & IOCondition.IN) != 0;
|
||||
}
|
||||
|
||||
public PollableSource create_source (Cancellable? cancellable) {
|
||||
return new PollableSource.full (this, new VirtualIOSource (stream, IOCondition.IN), cancellable);
|
||||
}
|
||||
|
||||
public ssize_t read_nonblocking_fn (uint8[] buffer) throws GLib.Error {
|
||||
if (stream == null)
|
||||
return 0;
|
||||
return stream.read (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class VirtualOutputStream : OutputStream, PollableOutputStream {
|
||||
private weak VirtualStream? stream;
|
||||
|
||||
public VirtualOutputStream (VirtualStream stream) {
|
||||
Object ();
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
internal void detach () {
|
||||
stream = null;
|
||||
}
|
||||
|
||||
public override bool close (Cancellable? cancellable) throws IOError {
|
||||
if (stream != null)
|
||||
stream.shutdown_write ();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool close_async (int io_priority, Cancellable? cancellable) throws GLib.IOError {
|
||||
return close (cancellable);
|
||||
}
|
||||
|
||||
public override bool flush (GLib.Cancellable? cancellable) throws GLib.Error {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async bool flush_async (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override ssize_t write (uint8[] buffer, Cancellable? cancellable) throws IOError {
|
||||
return stream.write (buffer);
|
||||
}
|
||||
|
||||
public bool can_poll () {
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool is_writable () {
|
||||
if (stream == null)
|
||||
return false;
|
||||
return (stream.pending_io & IOCondition.OUT) != 0;
|
||||
}
|
||||
|
||||
public PollableSource create_source (Cancellable? cancellable) {
|
||||
return new PollableSource.full (this, new VirtualIOSource (stream, IOCondition.OUT), cancellable);
|
||||
}
|
||||
|
||||
public ssize_t write_nonblocking_fn (uint8[]? buffer) throws GLib.Error {
|
||||
if (stream == null)
|
||||
throw new IOError.CLOSED ("Virtual is closed");
|
||||
return stream.write (buffer);
|
||||
}
|
||||
|
||||
public PollableReturn writev_nonblocking_fn (OutputVector[] vectors, out size_t bytes_written) throws GLib.Error {
|
||||
assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
private class VirtualIOSource : Source {
|
||||
public VirtualStream? stream;
|
||||
public IOCondition condition;
|
||||
|
||||
public VirtualIOSource (VirtualStream stream, IOCondition condition) {
|
||||
this.stream = stream;
|
||||
this.condition = condition;
|
||||
|
||||
if (stream != null)
|
||||
stream.register_source (this, condition);
|
||||
}
|
||||
|
||||
~VirtualIOSource () {
|
||||
if (stream != null)
|
||||
stream.unregister_source (this);
|
||||
}
|
||||
|
||||
protected override bool prepare (out int timeout) {
|
||||
timeout = -1;
|
||||
return is_ready ();
|
||||
}
|
||||
|
||||
protected override bool check () {
|
||||
return is_ready ();
|
||||
}
|
||||
|
||||
private bool is_ready () {
|
||||
IOCondition pending_io = (stream != null) ? stream.pending_io : IOCondition.IN;
|
||||
return (pending_io & condition) != 0;
|
||||
}
|
||||
|
||||
protected override bool dispatch (SourceFunc? callback) {
|
||||
set_ready_time (-1);
|
||||
|
||||
if (callback == null)
|
||||
return Source.REMOVE;
|
||||
|
||||
return callback ();
|
||||
}
|
||||
|
||||
protected static bool closure_callback (Closure closure) {
|
||||
var return_value = Value (typeof (bool));
|
||||
|
||||
closure.invoke (ref return_value, {});
|
||||
|
||||
return return_value.get_boolean ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
namespace Frida {
|
||||
public interface ObjectBuilder : Object {
|
||||
public abstract unowned ObjectBuilder begin_dictionary ();
|
||||
public abstract unowned ObjectBuilder set_member_name (string name);
|
||||
public abstract unowned ObjectBuilder end_dictionary ();
|
||||
|
||||
public abstract unowned ObjectBuilder begin_array ();
|
||||
public abstract unowned ObjectBuilder end_array ();
|
||||
|
||||
public abstract unowned ObjectBuilder add_null_value ();
|
||||
public abstract unowned ObjectBuilder add_bool_value (bool val);
|
||||
public abstract unowned ObjectBuilder add_int64_value (int64 val);
|
||||
public abstract unowned ObjectBuilder add_uint64_value (uint64 val);
|
||||
public abstract unowned ObjectBuilder add_data_value (Bytes val);
|
||||
public abstract unowned ObjectBuilder add_string_value (string val);
|
||||
public abstract unowned ObjectBuilder add_uuid_value (uint8[] val);
|
||||
public abstract unowned ObjectBuilder add_raw_value (Bytes val);
|
||||
|
||||
public abstract Bytes build ();
|
||||
}
|
||||
|
||||
public interface ObjectReader : Object {
|
||||
public abstract bool has_member (string name) throws Error;
|
||||
public abstract unowned ObjectReader read_member (string name) throws Error;
|
||||
public abstract unowned ObjectReader end_member ();
|
||||
|
||||
public abstract uint count_elements () throws Error;
|
||||
public abstract unowned ObjectReader read_element (uint index) throws Error;
|
||||
public abstract unowned ObjectReader end_element () throws Error;
|
||||
|
||||
public abstract bool get_bool_value () throws Error;
|
||||
public abstract uint8 get_uint8_value () throws Error;
|
||||
public abstract uint16 get_uint16_value () throws Error;
|
||||
public abstract int64 get_int64_value () throws Error;
|
||||
public abstract uint64 get_uint64_value () throws Error;
|
||||
public abstract Bytes get_data_value () throws Error;
|
||||
public abstract unowned string get_string_value () throws Error;
|
||||
public abstract unowned string get_uuid_value () throws Error;
|
||||
}
|
||||
|
||||
public sealed class VariantReader : Object, ObjectReader {
|
||||
public Variant root_object {
|
||||
get {
|
||||
return scopes.peek_head ().val;
|
||||
}
|
||||
}
|
||||
|
||||
public Variant current_object {
|
||||
get {
|
||||
return scopes.peek_tail ().val;
|
||||
}
|
||||
}
|
||||
|
||||
private Gee.Deque<Scope> scopes = new Gee.ArrayQueue<Scope> ();
|
||||
|
||||
public VariantReader (Variant v) {
|
||||
push_scope (v);
|
||||
}
|
||||
|
||||
public bool has_member (string name) throws Error {
|
||||
var scope = peek_scope ();
|
||||
if (scope.dict == null)
|
||||
throw new Error.PROTOCOL ("Dictionary expected, but at %s", scope.val.print (true));
|
||||
return scope.dict.contains (name);
|
||||
}
|
||||
|
||||
public unowned ObjectReader read_member (string name) throws Error {
|
||||
var scope = peek_scope ();
|
||||
if (scope.dict == null)
|
||||
throw new Error.PROTOCOL ("Dictionary expected, but at %s", scope.val.print (true));
|
||||
|
||||
Variant? v = scope.dict.lookup_value (name, null);
|
||||
if (v == null)
|
||||
throw new Error.PROTOCOL ("Key '%s' not found in dictionary: %s", name, scope.val.print (true));
|
||||
|
||||
push_scope (v);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectReader end_member () {
|
||||
pop_scope ();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public uint count_elements () throws Error {
|
||||
var scope = peek_scope ();
|
||||
scope.check_array ();
|
||||
return (uint) scope.val.n_children ();
|
||||
}
|
||||
|
||||
public unowned ObjectReader read_element (uint index) throws Error {
|
||||
var scope = peek_scope ();
|
||||
scope.check_array ();
|
||||
push_scope (scope.val.get_child_value (index).get_variant ());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectReader end_element () throws Error {
|
||||
pop_scope ();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public bool get_bool_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.BOOLEAN).get_boolean ();
|
||||
}
|
||||
|
||||
public uint8 get_uint8_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.BYTE).get_byte ();
|
||||
}
|
||||
|
||||
public uint16 get_uint16_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.UINT16).get_uint16 ();
|
||||
}
|
||||
|
||||
public int64 get_int64_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.INT64).get_int64 ();
|
||||
}
|
||||
|
||||
public uint64 get_uint64_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.UINT64).get_uint64 ();
|
||||
}
|
||||
|
||||
public Bytes get_data_value () throws Error {
|
||||
return peek_scope ().get_value (new VariantType.array (VariantType.BYTE)).get_data_as_bytes ();
|
||||
}
|
||||
|
||||
public unowned string get_string_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.STRING).get_string ();
|
||||
}
|
||||
|
||||
public unowned string get_uuid_value () throws Error {
|
||||
return peek_scope ().get_value (VariantType.STRING).get_string (); // TODO: Use a tuple to avoid ambiguity.
|
||||
}
|
||||
|
||||
private void push_scope (Variant v) {
|
||||
scopes.offer_tail (new Scope (v));
|
||||
}
|
||||
|
||||
private Scope peek_scope () {
|
||||
return scopes.peek_tail ();
|
||||
}
|
||||
|
||||
private Scope pop_scope () {
|
||||
return scopes.poll_tail ();
|
||||
}
|
||||
|
||||
private class Scope {
|
||||
public Variant val;
|
||||
public VariantDict? dict;
|
||||
public bool is_array = false;
|
||||
|
||||
public Scope (Variant v) {
|
||||
val = v;
|
||||
|
||||
VariantType t = v.get_type ();
|
||||
if (t.equal (VariantType.VARDICT))
|
||||
dict = new VariantDict (v);
|
||||
else if (t.is_subtype_of (VariantType.ARRAY))
|
||||
is_array = true;
|
||||
}
|
||||
|
||||
public Variant get_value (VariantType expected_type) throws Error {
|
||||
if (!val.get_type ().equal (expected_type)) {
|
||||
throw new Error.PROTOCOL ("Expected type '%s', got '%s'",
|
||||
(string) expected_type.peek_string (),
|
||||
(string) val.get_type ().peek_string ());
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public void check_array () throws Error {
|
||||
if (!is_array)
|
||||
throw new Error.PROTOCOL ("Array expected, but at %s", val.print (true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class JsonObjectBuilder : Object, ObjectBuilder {
|
||||
private Json.Builder builder = new Json.Builder ();
|
||||
private Gee.Map<string, Bytes> raw_values = new Gee.HashMap<string, Bytes> ();
|
||||
|
||||
public unowned ObjectBuilder begin_dictionary () {
|
||||
builder.begin_object ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder set_member_name (string name) {
|
||||
builder.set_member_name (name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder end_dictionary () {
|
||||
builder.end_object ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder begin_array () {
|
||||
builder.begin_array ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder end_array () {
|
||||
builder.end_array ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_null_value () {
|
||||
builder.add_null_value ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_bool_value (bool val) {
|
||||
builder.add_boolean_value (val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_int64_value (int64 val) {
|
||||
builder.add_int_value (val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_uint64_value (uint64 val) {
|
||||
builder.add_int_value ((int64) val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_data_value (Bytes val) {
|
||||
builder.add_string_value (Base64.encode (val.get_data ()));
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_string_value (string val) {
|
||||
builder.add_string_value (val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_uuid_value (uint8[] val) {
|
||||
assert_not_reached ();
|
||||
}
|
||||
|
||||
public unowned ObjectBuilder add_raw_value (Bytes val) {
|
||||
string uuid = Uuid.string_random ();
|
||||
builder.add_string_value (uuid);
|
||||
raw_values[uuid] = val;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Bytes build () {
|
||||
string json = Json.to_string (builder.get_root (), false);
|
||||
|
||||
foreach (var e in raw_values.entries) {
|
||||
unowned string uuid = e.key;
|
||||
Bytes val = e.value;
|
||||
|
||||
unowned string raw_str = (string) val.get_data ();
|
||||
string str = raw_str[:(long) val.get_size ()];
|
||||
|
||||
json = json.replace ("\"" + uuid + "\"", str);
|
||||
}
|
||||
|
||||
return new Bytes (json.data);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class JsonObjectReader : Object, ObjectReader {
|
||||
private Json.Reader reader;
|
||||
|
||||
public JsonObjectReader (string json) throws Error {
|
||||
try {
|
||||
reader = new Json.Reader (Json.from_string (json));
|
||||
} catch (GLib.Error e) {
|
||||
throw new Error.INVALID_ARGUMENT ("%s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public bool has_member (string name) throws Error {
|
||||
bool result = reader.read_member (name);
|
||||
reader.end_member ();
|
||||
return result;
|
||||
}
|
||||
|
||||
public unowned ObjectReader read_member (string name) throws Error {
|
||||
if (!reader.read_member (name))
|
||||
throw_dict_access_error ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectReader end_member () {
|
||||
reader.end_member ();
|
||||
return this;
|
||||
}
|
||||
|
||||
[NoReturn]
|
||||
private void throw_dict_access_error () throws Error {
|
||||
GLib.Error e = reader.get_error ();
|
||||
reader.end_member ();
|
||||
throw new Error.PROTOCOL ("%s", e.message);
|
||||
}
|
||||
|
||||
public uint count_elements () throws Error {
|
||||
int n = reader.count_elements ();
|
||||
if (n == -1)
|
||||
throw_array_access_error ();
|
||||
return n;
|
||||
}
|
||||
|
||||
public unowned ObjectReader read_element (uint index) throws Error {
|
||||
if (!reader.read_element (index)) {
|
||||
GLib.Error e = reader.get_error ();
|
||||
reader.end_element ();
|
||||
throw new Error.PROTOCOL ("%s", e.message);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned ObjectReader end_element () throws Error {
|
||||
reader.end_element ();
|
||||
return this;
|
||||
}
|
||||
|
||||
[NoReturn]
|
||||
private void throw_array_access_error () throws Error {
|
||||
GLib.Error e = reader.get_error ();
|
||||
reader.end_element ();
|
||||
throw new Error.PROTOCOL ("%s", e.message);
|
||||
}
|
||||
|
||||
public bool get_bool_value () throws Error {
|
||||
bool v = reader.get_boolean_value ();
|
||||
if (!v)
|
||||
maybe_throw_value_access_error ();
|
||||
return v;
|
||||
}
|
||||
|
||||
public uint8 get_uint8_value () throws Error {
|
||||
int64 v = get_int64_value ();
|
||||
if (v < 0 || v > uint8.MAX)
|
||||
throw new Error.PROTOCOL ("Invalid uint8");
|
||||
return (uint8) v;
|
||||
}
|
||||
|
||||
public uint16 get_uint16_value () throws Error {
|
||||
int64 v = get_int64_value ();
|
||||
if (v < 0 || v > uint16.MAX)
|
||||
throw new Error.PROTOCOL ("Invalid uint16");
|
||||
return (uint16) v;
|
||||
}
|
||||
|
||||
public int64 get_int64_value () throws Error {
|
||||
int64 v = reader.get_int_value ();
|
||||
if (v == 0)
|
||||
maybe_throw_value_access_error ();
|
||||
return v;
|
||||
}
|
||||
|
||||
public uint64 get_uint64_value () throws Error {
|
||||
int64 v = get_int64_value ();
|
||||
if (v < 0)
|
||||
throw new Error.PROTOCOL ("Invalid uint64");
|
||||
return v;
|
||||
}
|
||||
|
||||
public Bytes get_data_value () throws Error {
|
||||
return new Bytes (Base64.decode (get_string_value ()));
|
||||
}
|
||||
|
||||
public unowned string get_string_value () throws Error {
|
||||
unowned string? v = reader.get_string_value ();
|
||||
if (v == null)
|
||||
maybe_throw_value_access_error ();
|
||||
return v;
|
||||
}
|
||||
|
||||
public unowned string get_uuid_value () throws Error {
|
||||
return get_string_value ();
|
||||
}
|
||||
|
||||
private void maybe_throw_value_access_error () throws Error {
|
||||
GLib.Error? e = reader.get_error ();
|
||||
if (e == null)
|
||||
return;
|
||||
reader.end_member ();
|
||||
throw new Error.PROTOCOL ("%s", e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
namespace Frida {
|
||||
public sealed class XpcClient : Object {
|
||||
public signal void message (Darwin.Xpc.Object obj);
|
||||
|
||||
public State state {
|
||||
get {
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
|
||||
public Darwin.Xpc.Connection connection {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public Darwin.GCD.DispatchQueue queue {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
private State _state;
|
||||
private string? close_reason;
|
||||
private MainContext main_context;
|
||||
|
||||
public enum State {
|
||||
OPEN,
|
||||
CLOSING,
|
||||
CLOSED,
|
||||
}
|
||||
|
||||
public static XpcClient make_for_mach_service (string name, Darwin.GCD.DispatchQueue queue) {
|
||||
return new XpcClient (Darwin.Xpc.Connection.create_mach_service (name, queue, 0), queue);
|
||||
}
|
||||
|
||||
public XpcClient (Darwin.Xpc.Connection connection, Darwin.GCD.DispatchQueue queue) {
|
||||
Object (connection: connection, queue: queue);
|
||||
}
|
||||
|
||||
construct {
|
||||
main_context = MainContext.ref_thread_default ();
|
||||
|
||||
connection.set_event_handler (on_event);
|
||||
connection.activate ();
|
||||
}
|
||||
|
||||
public override void dispose () {
|
||||
if (close_reason != null) {
|
||||
change_state (CLOSED);
|
||||
} else {
|
||||
change_state (CLOSING);
|
||||
this.ref ();
|
||||
connection.cancel ();
|
||||
}
|
||||
|
||||
base.dispose ();
|
||||
}
|
||||
|
||||
public async Darwin.Xpc.Object request (Darwin.Xpc.Object message, Cancellable? cancellable) throws Error, IOError {
|
||||
Darwin.Xpc.Object? reply = null;
|
||||
connection.send_message_with_reply (message, queue, r => {
|
||||
schedule_on_frida_thread (() => {
|
||||
reply = r;
|
||||
request.callback ();
|
||||
return Source.REMOVE;
|
||||
});
|
||||
});
|
||||
|
||||
var cancel_source = new CancellableSource (cancellable);
|
||||
cancel_source.set_callback (() => {
|
||||
connection.cancel ();
|
||||
return Source.REMOVE;
|
||||
});
|
||||
cancel_source.attach (main_context);
|
||||
|
||||
yield;
|
||||
|
||||
cancel_source.destroy ();
|
||||
|
||||
if (reply.type == Darwin.Xpc.Error.TYPE) {
|
||||
var e = (Darwin.Xpc.Error) reply;
|
||||
throw new Error.NOT_SUPPORTED ("%s", e.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION));
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
public void post (Darwin.Xpc.Object message) throws Error, IOError {
|
||||
connection.send_message (message);
|
||||
}
|
||||
|
||||
private void change_state (State new_state) {
|
||||
_state = new_state;
|
||||
notify_property ("state");
|
||||
}
|
||||
|
||||
private void on_event (Darwin.Xpc.Object obj) {
|
||||
schedule_on_frida_thread (() => {
|
||||
if (obj.type == Darwin.Xpc.Error.TYPE) {
|
||||
var e = (Darwin.Xpc.Error) obj;
|
||||
close_reason = e.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION);
|
||||
switch (state) {
|
||||
case OPEN:
|
||||
change_state (CLOSED);
|
||||
break;
|
||||
case CLOSING:
|
||||
change_state (CLOSED);
|
||||
unref ();
|
||||
break;
|
||||
case CLOSED:
|
||||
assert_not_reached ();
|
||||
}
|
||||
} else {
|
||||
message (obj);
|
||||
}
|
||||
return Source.REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
private void schedule_on_frida_thread (owned SourceFunc function) {
|
||||
var source = new IdleSource ();
|
||||
source.set_callback ((owned) function);
|
||||
source.attach (main_context);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class XpcObjectReader {
|
||||
public Darwin.Xpc.Object root_object {
|
||||
get {
|
||||
return scopes.peek_head ().object;
|
||||
}
|
||||
}
|
||||
|
||||
public Darwin.Xpc.Object current_object {
|
||||
get {
|
||||
return scopes.peek_tail ().object;
|
||||
}
|
||||
}
|
||||
|
||||
public delegate int TranslateErrorFunc (string domain, int code, string description);
|
||||
|
||||
private Gee.Deque<Scope> scopes = new Gee.ArrayQueue<Scope> ();
|
||||
|
||||
public XpcObjectReader (Darwin.Xpc.Object obj) {
|
||||
push_scope (obj);
|
||||
}
|
||||
|
||||
public bool has_member (string name) throws Error {
|
||||
return peek_scope ().get_dictionary ().get_value (name) != null;
|
||||
}
|
||||
|
||||
public bool try_read_member (string name) throws Error {
|
||||
var scope = peek_scope ();
|
||||
var dict = scope.get_dictionary ();
|
||||
var val = dict.get_value (name);
|
||||
if (val == null)
|
||||
return false;
|
||||
|
||||
push_scope (val);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public unowned XpcObjectReader read_member (string name) throws Error {
|
||||
var scope = peek_scope ();
|
||||
var dict = scope.get_dictionary ();
|
||||
var val = dict.get_value (name);
|
||||
if (val == null)
|
||||
throw new Error.PROTOCOL ("Key '%s' not found in dictionary: %s", name, scope.object.to_string ());
|
||||
|
||||
push_scope (val);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned XpcObjectReader end_member () {
|
||||
pop_scope ();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public size_t count_elements () throws Error {
|
||||
return peek_scope ().get_array ().count;
|
||||
}
|
||||
|
||||
public unowned XpcObjectReader read_element (size_t index) throws Error {
|
||||
push_scope (peek_scope ().get_array ().get_value (index));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public unowned XpcObjectReader end_element () throws Error {
|
||||
pop_scope ();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public bool get_bool_value () throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.Bool> (Darwin.Xpc.Bool.TYPE).get_value ();
|
||||
}
|
||||
|
||||
public int64 get_int64_value () throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.Int64> (Darwin.Xpc.Int64.TYPE).get_value ();
|
||||
}
|
||||
|
||||
public uint64 get_uint64_value () throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.UInt64> (Darwin.Xpc.UInt64.TYPE).get_value ();
|
||||
}
|
||||
|
||||
public unowned uint8[] get_data_value () throws Error {
|
||||
var data = peek_scope ().get_object<Darwin.Xpc.Data> (Darwin.Xpc.Data.TYPE);
|
||||
unowned uint8[] buf = (uint8[]) data.get_bytes_ptr ();
|
||||
buf.length = (int) data.get_length ();
|
||||
return buf;
|
||||
}
|
||||
|
||||
public unowned string get_string_value () throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.String> (Darwin.Xpc.String.TYPE).get_string_ptr ();
|
||||
}
|
||||
|
||||
public unowned uint8[] get_uuid_value () throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.Uuid> (Darwin.Xpc.Uuid.TYPE).get_bytes ()[:16];
|
||||
}
|
||||
|
||||
public unowned string get_error_description () throws Error {
|
||||
var error = peek_scope ().get_object<Darwin.Xpc.Error> (Darwin.Xpc.Error.TYPE);
|
||||
return error.get_string (Darwin.Xpc.Error.KEY_DESCRIPTION);
|
||||
}
|
||||
|
||||
public void check_nserror (TranslateErrorFunc translate_error) throws Error {
|
||||
if (!has_member ("error"))
|
||||
return;
|
||||
|
||||
read_member ("error");
|
||||
|
||||
unowned string domain = read_member ("domain").get_string_value ();
|
||||
end_member ();
|
||||
|
||||
var code = (int) read_member ("code").get_int64_value ();
|
||||
end_member ();
|
||||
|
||||
string description = read_member ("userInfo").read_member ("NSLocalizedDescription").get_string_value ();
|
||||
if (description.has_suffix ("."))
|
||||
description = description[:description.length - 1];
|
||||
|
||||
throw (Error) new GLib.Error.literal (
|
||||
Quark.from_string ("frida-error-quark"),
|
||||
translate_error (domain, code, description),
|
||||
description);
|
||||
}
|
||||
|
||||
public unowned Darwin.Xpc.Object get_object_value (Darwin.Xpc.Type expected_type) throws Error {
|
||||
return peek_scope ().get_object<Darwin.Xpc.Object> (expected_type);
|
||||
}
|
||||
|
||||
private void push_scope (Darwin.Xpc.Object obj) {
|
||||
scopes.offer_tail (new Scope (obj));
|
||||
}
|
||||
|
||||
private Scope peek_scope () {
|
||||
return scopes.peek_tail ();
|
||||
}
|
||||
|
||||
private Scope pop_scope () {
|
||||
return scopes.poll_tail ();
|
||||
}
|
||||
|
||||
private class Scope {
|
||||
public Darwin.Xpc.Object object;
|
||||
private unowned Darwin.Xpc.Type type;
|
||||
|
||||
public Scope (Darwin.Xpc.Object obj) {
|
||||
object = obj;
|
||||
type = obj.type;
|
||||
}
|
||||
|
||||
public unowned T get_object<T> (Darwin.Xpc.Type expected_type) throws Error {
|
||||
if (type != expected_type)
|
||||
throw new Error.PROTOCOL ("Expected type '%s', got '%s'", expected_type.name, type.name);
|
||||
return object;
|
||||
}
|
||||
|
||||
public unowned Darwin.Xpc.Array get_array () throws Error {
|
||||
return get_object<Darwin.Xpc.Array> (Darwin.Xpc.Array.TYPE);
|
||||
}
|
||||
|
||||
public unowned Darwin.Xpc.Dictionary get_dictionary () throws Error {
|
||||
return get_object<Darwin.Xpc.Dictionary> (Darwin.Xpc.Dictionary.TYPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+97
-27
@@ -1,5 +1,5 @@
|
||||
namespace Frida.Gadget {
|
||||
private class Config : Object, Json.Serializable {
|
||||
private sealed class Config : Object, Json.Serializable {
|
||||
public Object interaction {
|
||||
get;
|
||||
set;
|
||||
@@ -93,7 +93,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptInteraction : Object, Json.Serializable {
|
||||
private sealed class ScriptInteraction : Object, Json.Serializable {
|
||||
public string path {
|
||||
get;
|
||||
set;
|
||||
@@ -145,7 +145,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptDirectoryInteraction : Object {
|
||||
private sealed class ScriptDirectoryInteraction : Object {
|
||||
public string path {
|
||||
get;
|
||||
set;
|
||||
@@ -164,7 +164,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptConfig : Object, Json.Serializable {
|
||||
private sealed class ScriptConfig : Object, Json.Serializable {
|
||||
public ProcessFilter? filter {
|
||||
get;
|
||||
set;
|
||||
@@ -216,7 +216,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ProcessFilter : Object {
|
||||
private sealed class ProcessFilter : Object {
|
||||
public string[] executables {
|
||||
get;
|
||||
set;
|
||||
@@ -258,7 +258,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ListenInteraction : SocketInteraction {
|
||||
private sealed class ListenInteraction : SocketInteraction {
|
||||
public PortConflictBehavior on_port_conflict {
|
||||
get;
|
||||
set;
|
||||
@@ -287,7 +287,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ConnectInteraction : SocketInteraction, Json.Serializable {
|
||||
private sealed class ConnectInteraction : SocketInteraction, Json.Serializable {
|
||||
public string[]? acl {
|
||||
get;
|
||||
set;
|
||||
@@ -328,7 +328,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class Location : Object {
|
||||
private sealed class Location : Object {
|
||||
public string executable_name {
|
||||
get;
|
||||
construct;
|
||||
@@ -751,7 +751,7 @@ namespace Frida.Gadget {
|
||||
|
||||
string config_data;
|
||||
try {
|
||||
FileUtils.get_contents (config_path, out config_data);
|
||||
load_asset_text (config_path, out config_data);
|
||||
} catch (FileError e) {
|
||||
if (e is FileError.NOENT)
|
||||
return new Config ();
|
||||
@@ -841,6 +841,7 @@ namespace Frida.Gadget {
|
||||
|
||||
private ExitMonitor exit_monitor;
|
||||
private ThreadSuspendMonitor thread_suspend_monitor;
|
||||
private UnwindSitter unwind_sitter;
|
||||
|
||||
private Gum.ScriptBackend? qjs_backend;
|
||||
private Gum.ScriptBackend? v8_backend;
|
||||
@@ -852,6 +853,7 @@ namespace Frida.Gadget {
|
||||
construct {
|
||||
exit_monitor = new ExitMonitor (this, MainContext.default ());
|
||||
thread_suspend_monitor = new ThreadSuspendMonitor (this);
|
||||
unwind_sitter = new UnwindSitter (this);
|
||||
}
|
||||
|
||||
public async void start () throws Error, IOError {
|
||||
@@ -986,7 +988,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptRunner : BaseController {
|
||||
private sealed class ScriptRunner : BaseController {
|
||||
private ScriptEngine engine;
|
||||
private Script script;
|
||||
|
||||
@@ -1034,7 +1036,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptDirectoryRunner : BaseController {
|
||||
private sealed class ScriptDirectoryRunner : BaseController {
|
||||
public string directory_path {
|
||||
get;
|
||||
construct;
|
||||
@@ -1224,7 +1226,7 @@ namespace Frida.Gadget {
|
||||
private ScriptConfig load_config (string path) throws Error {
|
||||
string data;
|
||||
try {
|
||||
FileUtils.get_contents (path, out data);
|
||||
load_asset_text (path, out data);
|
||||
} catch (FileError e) {
|
||||
if (e is FileError.NOENT)
|
||||
return new ScriptConfig ();
|
||||
@@ -1239,8 +1241,14 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class Script : Object, RpcPeer {
|
||||
private const uint8 QUICKJS_BYTECODE_MAGIC = 0x02;
|
||||
private sealed class Script : Object, RpcPeer {
|
||||
private const uint8 QUICKJS_BYTECODE_MAGIC =
|
||||
#if BIG_ENDIAN
|
||||
0x42
|
||||
#else
|
||||
0x02
|
||||
#endif
|
||||
;
|
||||
|
||||
public enum ChangeBehavior {
|
||||
IGNORE,
|
||||
@@ -1347,9 +1355,9 @@ namespace Frida.Gadget {
|
||||
try {
|
||||
var path = this.path;
|
||||
|
||||
uint8[] contents;
|
||||
Bytes contents;
|
||||
try {
|
||||
FileUtils.get_data (path, out contents);
|
||||
load_asset_bytes (path, out contents);
|
||||
} catch (FileError e) {
|
||||
throw new Error.INVALID_ARGUMENT ("%s", e.message);
|
||||
}
|
||||
@@ -1358,11 +1366,10 @@ namespace Frida.Gadget {
|
||||
options.name = Path.get_basename (path).split (".", 2)[0];
|
||||
|
||||
ScriptEngine.ScriptInstance instance;
|
||||
if (contents.length > 0 && contents[0] == QUICKJS_BYTECODE_MAGIC) {
|
||||
instance = yield engine.create_script (null, new Bytes (contents), options);
|
||||
} else {
|
||||
instance = yield engine.create_script ((string) contents, null, options);
|
||||
}
|
||||
if (contents.length > 0 && contents[0] == QUICKJS_BYTECODE_MAGIC)
|
||||
instance = yield engine.create_script (null, contents, options);
|
||||
else
|
||||
instance = yield engine.create_script ((string) contents.get_data (), null, options);
|
||||
|
||||
if (id.handle != 0)
|
||||
yield engine.destroy_script (id);
|
||||
@@ -1379,7 +1386,7 @@ namespace Frida.Gadget {
|
||||
var stage = new Json.Node.alloc ().init_string ((peek_state () == State.CREATED) ? "early" : "late");
|
||||
|
||||
try {
|
||||
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null);
|
||||
yield rpc_client.call ("init", new Json.Node[] { stage, parameters }, null, null);
|
||||
} catch (GLib.Error e) {
|
||||
}
|
||||
}
|
||||
@@ -1447,12 +1454,12 @@ namespace Frida.Gadget {
|
||||
return true;
|
||||
}
|
||||
|
||||
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
|
||||
engine.post_to_script (id, json);
|
||||
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
|
||||
engine.post_to_script (id, json, data);
|
||||
}
|
||||
}
|
||||
|
||||
private class ControlServer : BaseController {
|
||||
private sealed class ControlServer : BaseController {
|
||||
public EndpointParameters endpoint_params {
|
||||
get;
|
||||
construct;
|
||||
@@ -1495,7 +1502,8 @@ namespace Frida.Gadget {
|
||||
var endpoint_params = new EndpointParameters (interaction.address, interaction.port,
|
||||
parse_certificate (interaction.certificate, location), interaction.origin, auth_service, asset_root);
|
||||
|
||||
service = new WebService (endpoint_params, CONTROL, interaction.on_port_conflict);
|
||||
service = new WebService (endpoint_params, WebServiceFlavor.CONTROL, interaction.on_port_conflict,
|
||||
new TunnelInterfaceObserver ());
|
||||
service.incoming.connect (on_incoming_connection);
|
||||
yield service.start (io_cancellable);
|
||||
}
|
||||
@@ -1925,6 +1933,14 @@ namespace Frida.Gadget {
|
||||
throw new Error.NOT_SUPPORTED ("Unable to inject libraries when embedded");
|
||||
}
|
||||
|
||||
public async ChannelId open_channel (string address, Cancellable? cancellable) throws Error, IOError {
|
||||
throw new Error.NOT_SUPPORTED ("Unable to open channels when embedded");
|
||||
}
|
||||
|
||||
public async ServiceSessionId open_service (string address, Cancellable? cancellable) throws Error, IOError {
|
||||
throw new Error.NOT_SUPPORTED ("Unable to open services when embedded");
|
||||
}
|
||||
|
||||
private void validate_pid (uint pid) throws Error {
|
||||
if (pid != this_process.pid)
|
||||
throw new Error.NOT_SUPPORTED ("Unable to act on other processes when embedded");
|
||||
@@ -1956,7 +1972,7 @@ namespace Frida.Gadget {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClusterClient : BaseController {
|
||||
private sealed class ClusterClient : BaseController {
|
||||
public SocketConnectable connectable {
|
||||
get;
|
||||
construct;
|
||||
@@ -2073,6 +2089,60 @@ namespace Frida.Gadget {
|
||||
}
|
||||
#endif
|
||||
|
||||
private void load_asset_text (string filename, out string text) throws FileError {
|
||||
Bytes raw_contents;
|
||||
load_asset_bytes (filename, out raw_contents);
|
||||
|
||||
unowned string str = (string) raw_contents.get_data ();
|
||||
if (!str.validate ())
|
||||
throw new FileError.FAILED ("%s: invalid UTF-8", filename);
|
||||
|
||||
text = str;
|
||||
}
|
||||
|
||||
private void load_asset_bytes (string filename, out Bytes bytes) throws FileError {
|
||||
#if ANDROID
|
||||
if (maybe_load_asset_bytes_from_apk (filename, out bytes))
|
||||
return;
|
||||
#endif
|
||||
|
||||
uint8[] data;
|
||||
FileUtils.get_data (filename, out data);
|
||||
bytes = new Bytes.take ((owned) data);
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
private bool maybe_load_asset_bytes_from_apk (string filename, out Bytes contents) throws FileError {
|
||||
contents = null;
|
||||
|
||||
var tokens = filename.split ("!", 2);
|
||||
if (tokens.length != 2 || !tokens[0].has_suffix (".apk"))
|
||||
return false;
|
||||
unowned string apk_path = tokens[0];
|
||||
unowned string file_path = tokens[1];
|
||||
|
||||
var reader = Minizip.Reader.create ();
|
||||
try {
|
||||
if (reader.open_file (apk_path) != OK)
|
||||
throw new FileError.FAILED ("Unable to open APK");
|
||||
|
||||
if (reader.locate_entry (file_path[1:], true) != OK)
|
||||
throw new FileError.FAILED ("Unable to locate %s inside APK", file_path);
|
||||
|
||||
var size = reader.entry_save_buffer_length ();
|
||||
var data = new uint8[size + 1];
|
||||
if (reader.entry_save_buffer (data[:size]) != OK)
|
||||
throw new FileError.FAILED ("Unable to extract %s from APK", file_path);
|
||||
|
||||
contents = new Bytes.take ((owned) data);
|
||||
return true;
|
||||
} finally {
|
||||
reader.close ();
|
||||
Minizip.Reader.destroy (ref reader);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private Json.Node make_empty_json_object () {
|
||||
return new Json.Node.alloc ().init_object (new Json.Object ());
|
||||
}
|
||||
|
||||
+44
-36
@@ -14,11 +14,13 @@ endif
|
||||
|
||||
platform_deps = []
|
||||
|
||||
extra_vala_args = []
|
||||
extra_objc_args = []
|
||||
extra_link_args = []
|
||||
extra_link_depends = []
|
||||
|
||||
if host_os_family != 'windows'
|
||||
extra_vala_args += '--pkg=gio-unix-2.0'
|
||||
platform_deps += gio_unix_dep
|
||||
endif
|
||||
|
||||
@@ -27,17 +29,24 @@ if host_os_family == 'darwin'
|
||||
extra_link_args += '-Wl,-framework,Foundation'
|
||||
endif
|
||||
|
||||
if host_os == 'android'
|
||||
extra_vala_args += '--pkg=minizip'
|
||||
platform_deps += minizip_dep
|
||||
endif
|
||||
|
||||
if host_os_family == 'windows'
|
||||
symfile = 'frida-gadget.symbols'
|
||||
extra_link_args += '-Wl,--retain-symbols-file,' + (meson.current_source_dir() / symfile)
|
||||
extra_link_depends += symfile
|
||||
if host_toolchain != 'microsoft'
|
||||
symfile = 'frida-gadget.symbols'
|
||||
extra_link_args += '-Wl,--retain-symbols-file,' + meson.current_source_dir() / symfile
|
||||
extra_link_depends += symfile
|
||||
endif
|
||||
elif host_os_family == 'darwin'
|
||||
symlist = 'frida-gadget.symbols'
|
||||
extra_link_args += '-Wl,-exported_symbols_list,' + (meson.current_source_dir() / symlist)
|
||||
extra_link_args += '-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist
|
||||
extra_link_depends += symlist
|
||||
else
|
||||
symscript = 'frida-gadget.version'
|
||||
extra_link_args += '-Wl,--version-script,' + (meson.current_source_dir() / symscript)
|
||||
extra_link_args += '-Wl,--version-script,' + meson.current_source_dir() / symscript
|
||||
extra_link_depends += symscript
|
||||
endif
|
||||
|
||||
@@ -46,15 +55,17 @@ if host_os_family in ['linux', 'qnx']
|
||||
extra_link_args += ['-Wl,-Bsymbolic']
|
||||
endif
|
||||
|
||||
raw_gadget = shared_library('frida-gadget', gadget_sources,
|
||||
raw_gadget = shared_library('frida-gadget-raw', gadget_sources,
|
||||
name_prefix: 'lib',
|
||||
vala_args: [base_vala_args, payload_vala_args, extra_vala_args],
|
||||
vala_header: 'frida-gadget.h',
|
||||
c_args: frida_component_cflags,
|
||||
objc_args: extra_objc_args,
|
||||
link_args: extra_link_args,
|
||||
link_depends: extra_link_depends,
|
||||
vs_module_defs: 'frida-gadget.def',
|
||||
override_options: ['b_asneeded=true'],
|
||||
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep, tls_provider_dep, payload_dep] + platform_deps,
|
||||
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep, netif_dep, tls_provider_dep, payload_dep] + platform_deps,
|
||||
)
|
||||
|
||||
operations = [
|
||||
@@ -67,30 +78,14 @@ if host_os_family != 'darwin'
|
||||
'--move', 'destructor', 'frida_on_unload', 'last',
|
||||
]
|
||||
endif
|
||||
if get_option('strip')
|
||||
operations += ['--strip', '>>>', strip, '<<<']
|
||||
endif
|
||||
|
||||
if host_machine.endian() == 'little'
|
||||
endian_option = ['--endian', 'little']
|
||||
else
|
||||
endian_option = ['--endian', 'big']
|
||||
endif
|
||||
|
||||
modulated_gadget = custom_target('frida-gadget-modulated',
|
||||
input: raw_gadget,
|
||||
output: 'libfrida-gadget-modulated' + shlib_suffix,
|
||||
command: [
|
||||
modulate,
|
||||
'@INPUT@',
|
||||
] + operations + endian_option + [
|
||||
'--output', '@OUTPUT@',
|
||||
'--nm', nm,
|
||||
'--readelf', readelf,
|
||||
'--otool', otool,
|
||||
],
|
||||
command: modulate + operations,
|
||||
)
|
||||
|
||||
need_universal_gadget = host_os_family == 'darwin' and gadget_compat != ''
|
||||
|
||||
if host_os == 'macos'
|
||||
identity = '@executable_path/../Frameworks/FridaGadget.dylib'
|
||||
elif host_os in ['ios', 'tvos']
|
||||
@@ -98,16 +93,29 @@ elif host_os in ['ios', 'tvos']
|
||||
else
|
||||
identity = gadget_name
|
||||
endif
|
||||
|
||||
custom_target('frida-gadget',
|
||||
gadget_for_host_arch = custom_target('frida-gadget',
|
||||
input: modulated_gadget,
|
||||
output: gadget_name,
|
||||
command: [
|
||||
post_process_module,
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
identity,
|
||||
],
|
||||
install: true,
|
||||
output: need_universal_gadget ? f'@gadget_name@-@host_abi@' : gadget_name,
|
||||
command: post_process + ['shared-library', identity],
|
||||
install: not need_universal_gadget,
|
||||
install_dir: asset_dir,
|
||||
)
|
||||
|
||||
if need_universal_gadget
|
||||
gadget = custom_target('frida-gadget-universal',
|
||||
input: gadget_for_host_arch,
|
||||
output: gadget_name,
|
||||
command: [
|
||||
lipo,
|
||||
'@INPUT@',
|
||||
gadget_compat,
|
||||
'-create',
|
||||
'-output', meson.current_build_dir() / gadget_name,
|
||||
],
|
||||
depends: gadget_depends,
|
||||
install: true,
|
||||
install_dir: asset_dir,
|
||||
)
|
||||
else
|
||||
gadget = gadget_for_host_arch
|
||||
endif
|
||||
+7
-2
@@ -2,7 +2,12 @@ if host_os == 'android'
|
||||
subdir('selinux')
|
||||
endif
|
||||
subdir('base')
|
||||
subdir('netif')
|
||||
subdir('pipe')
|
||||
subdir('payload')
|
||||
subdir('agent')
|
||||
subdir('gadget')
|
||||
if have_local_backend
|
||||
subdir('agent')
|
||||
endif
|
||||
if build_gadget
|
||||
subdir('gadget')
|
||||
endif
|
||||
@@ -0,0 +1,28 @@
|
||||
netif_sources = [
|
||||
'tunnel-interface-observer.vala',
|
||||
]
|
||||
|
||||
extra_vala_args = []
|
||||
extra_link_args = []
|
||||
|
||||
if host_os in ['ios', 'tvos']
|
||||
extra_vala_args += [
|
||||
'--pkg=corefoundation',
|
||||
'--pkg=darwin-gcd',
|
||||
'--pkg=darwin-systemconfiguration',
|
||||
]
|
||||
extra_link_args += '-Wl,-framework,SystemConfiguration'
|
||||
endif
|
||||
|
||||
netif = static_library('frida-netif', netif_sources,
|
||||
c_args: frida_component_cflags,
|
||||
vala_args: [base_vala_args, extra_vala_args],
|
||||
dependencies: [base_dep, gee_dep],
|
||||
)
|
||||
|
||||
netif_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
link_args: extra_link_args,
|
||||
link_with: netif,
|
||||
dependencies: base_dep,
|
||||
)
|
||||
@@ -0,0 +1,99 @@
|
||||
public sealed class Frida.TunnelInterfaceObserver : Object, DynamicInterfaceObserver {
|
||||
#if IOS || TVOS
|
||||
private Gee.Map<string, DynamicInterface> interfaces = new Gee.HashMap<string, DynamicInterface> ();
|
||||
|
||||
private Darwin.SystemConfiguration.DynamicStore? store;
|
||||
private Darwin.GCD.DispatchQueue event_queue =
|
||||
new Darwin.GCD.DispatchQueue ("re.frida.endpoint-enumerator", Darwin.GCD.DispatchQueueAttr.SERIAL);
|
||||
|
||||
private MainContext? main_context;
|
||||
|
||||
public override void dispose () {
|
||||
if (store != null) {
|
||||
store.set_dispatch_queue (null);
|
||||
store = null;
|
||||
ref ();
|
||||
event_queue.dispatch_async (do_dispose);
|
||||
}
|
||||
|
||||
base.dispose ();
|
||||
}
|
||||
|
||||
private void do_dispose () {
|
||||
unref ();
|
||||
}
|
||||
|
||||
public void start () {
|
||||
main_context = MainContext.ref_thread_default ();
|
||||
|
||||
Darwin.SystemConfiguration.DynamicStoreContext context = { 0, };
|
||||
context.info = this;
|
||||
store = new Darwin.SystemConfiguration.DynamicStore (null, CoreFoundation.String.make ("Frida"),
|
||||
on_interfaces_changed_wrapper, context);
|
||||
|
||||
var pattern = CoreFoundation.String.make ("State:/Network/Interface/utun.*/IPv6");
|
||||
var patterns = new CoreFoundation.Array (null, ((CoreFoundation.Type[]) &pattern)[:1]);
|
||||
store.set_notification_keys (null, patterns);
|
||||
|
||||
store.set_dispatch_queue (event_queue);
|
||||
|
||||
var initial_keys = store.copy_key_list (pattern);
|
||||
if (initial_keys != null)
|
||||
handle_interface_changes (initial_keys);
|
||||
}
|
||||
|
||||
private static void on_interfaces_changed_wrapper (Darwin.SystemConfiguration.DynamicStore store,
|
||||
CoreFoundation.Array changed_keys, void * info) {
|
||||
unowned TunnelInterfaceObserver enumerator = (TunnelInterfaceObserver) info;
|
||||
enumerator.on_interfaces_changed (changed_keys);
|
||||
}
|
||||
|
||||
private void on_interfaces_changed (CoreFoundation.Array changed_keys) {
|
||||
schedule_on_frida_thread (() => {
|
||||
if (store != null)
|
||||
handle_interface_changes (changed_keys);
|
||||
return Source.REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
private void handle_interface_changes (CoreFoundation.Array changed_keys) {
|
||||
var addresses_str = CoreFoundation.String.make ("Addresses");
|
||||
|
||||
foreach (var key in CFArray.wrap<CoreFoundation.String> (changed_keys)) {
|
||||
string name = key.to_string ().split ("/")[3];
|
||||
|
||||
var val = (CoreFoundation.Dictionary) store.copy_value (key);
|
||||
if (val != null) {
|
||||
InetAddress? address = null;
|
||||
foreach (var raw_address in CFArray.wrap<CoreFoundation.String> (val[addresses_str])) {
|
||||
var str = raw_address.to_string ();
|
||||
bool is_reserved_ipv6_range = str.has_prefix ("fc") || str.has_prefix ("fd");
|
||||
bool is_tunnel = is_reserved_ipv6_range && str.has_suffix ("::1");
|
||||
if (is_tunnel) {
|
||||
address = new InetAddress.from_string (str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (address != null && !interfaces.has_key (name)) {
|
||||
var iface = new DynamicInterface (name, address);
|
||||
interfaces[name] = iface;
|
||||
interface_attached (iface);
|
||||
}
|
||||
} else {
|
||||
DynamicInterface iface;
|
||||
if (interfaces.unset (name, out iface))
|
||||
interface_detached (iface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void schedule_on_frida_thread (owned SourceFunc function) {
|
||||
var source = new IdleSource ();
|
||||
source.set_callback ((owned) function);
|
||||
source.attach (main_context);
|
||||
}
|
||||
#else
|
||||
public void start () {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace Frida {
|
||||
script_engine.message_from_script.connect (on_message_from_script);
|
||||
script_engine.message_from_debugger.connect (on_message_from_debugger);
|
||||
|
||||
transmitter = new AgentMessageTransmitter (persist_timeout, frida_context, dbus_context);
|
||||
transmitter = new AgentMessageTransmitter (this, persist_timeout, frida_context, dbus_context);
|
||||
transmitter.closed.connect (on_transmitter_closed);
|
||||
transmitter.new_candidates.connect (on_transmitter_new_candidates);
|
||||
transmitter.candidate_gathering_done.connect (on_transmitter_candidate_gathering_done);
|
||||
|
||||
+33
-30
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class ThreadIgnoreScope {
|
||||
public sealed class ThreadIgnoreScope {
|
||||
public enum Kind {
|
||||
APPLICATION_THREAD,
|
||||
FRIDA_THREAD
|
||||
@@ -43,7 +43,7 @@ namespace Frida {
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
public class ThreadCountCloaker : Object {
|
||||
public sealed class ThreadCountCloaker : Object {
|
||||
private ReadFunc * read_slot;
|
||||
private static ReadFunc old_read_impl;
|
||||
|
||||
@@ -53,15 +53,18 @@ namespace Frida {
|
||||
private delegate ssize_t ReadFunc (int fd, void * buf, size_t count);
|
||||
|
||||
construct {
|
||||
Gum.Module.enumerate_imports ("libart.so", imp => {
|
||||
if (imp.name == "read") {
|
||||
read_slot = (ReadFunc *) imp.slot;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (read_slot != null)
|
||||
old_read_impl = update_read_slot (on_read);
|
||||
var art = Gum.Process.find_module_by_name ("libart.so");
|
||||
if (art != null) {
|
||||
art.enumerate_imports (imp => {
|
||||
if (imp.name == "read") {
|
||||
read_slot = (ReadFunc *) imp.slot;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (read_slot != null)
|
||||
old_read_impl = update_read_slot (on_read);
|
||||
}
|
||||
}
|
||||
|
||||
~ThreadCountCloaker () {
|
||||
@@ -153,12 +156,12 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
#else
|
||||
public class ThreadCountCloaker : Object {
|
||||
public sealed class ThreadCountCloaker : Object {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX
|
||||
public class ThreadListCloaker : Object, DirListFilter {
|
||||
public sealed class ThreadListCloaker : Object, DirListFilter {
|
||||
private string our_dir_by_pid;
|
||||
private DirListCloaker cloaker;
|
||||
|
||||
@@ -177,7 +180,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
public class FDListCloaker : Object, DirListFilter {
|
||||
public sealed class FDListCloaker : Object, DirListFilter {
|
||||
private string our_dir_by_pid;
|
||||
private DirListCloaker cloaker;
|
||||
|
||||
@@ -196,7 +199,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
|
||||
private class DirListCloaker : Object {
|
||||
private sealed class DirListCloaker : Object {
|
||||
public weak DirListFilter filter {
|
||||
get;
|
||||
construct;
|
||||
@@ -212,38 +215,38 @@ namespace Frida {
|
||||
construct {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
unowned string libc = Gum.Process.query_libc_name ();
|
||||
var libc = Gum.Process.get_libc_module ();
|
||||
|
||||
var open_listener = new OpenDirListener (this);
|
||||
listeners.add (open_listener);
|
||||
interceptor.attach (Gum.Module.find_export_by_name (libc, "opendir"), open_listener);
|
||||
interceptor.attach ((void *) libc.find_export_by_name ("opendir"), open_listener);
|
||||
|
||||
var close_listener = new CloseDirListener (this);
|
||||
listeners.add (close_listener);
|
||||
interceptor.attach (Gum.Module.find_export_by_name (libc, "closedir"), close_listener);
|
||||
interceptor.attach ((void *) libc.find_export_by_name ("closedir"), close_listener);
|
||||
|
||||
var readdir_impl = Gum.Module.find_export_by_name (libc, "readdir");
|
||||
var readdir_impl = libc.find_export_by_name ("readdir");
|
||||
var readdir_listener = new ReadDirListener (this, LEGACY);
|
||||
listeners.add (readdir_listener);
|
||||
interceptor.attach (readdir_impl, readdir_listener);
|
||||
interceptor.attach ((void *) readdir_impl, readdir_listener);
|
||||
|
||||
var readdir64_impl = Gum.Module.find_export_by_name (libc, "readdir64");
|
||||
if (readdir64_impl != null && readdir64_impl != readdir_impl) {
|
||||
var readdir64_impl = libc.find_export_by_name ("readdir64");
|
||||
if (readdir64_impl != 0 && readdir64_impl != readdir_impl) {
|
||||
var listener = new ReadDirListener (this, MODERN);
|
||||
listeners.add (listener);
|
||||
interceptor.attach (readdir64_impl, listener);
|
||||
interceptor.attach ((void *) readdir64_impl, listener);
|
||||
}
|
||||
|
||||
var readdir_r_impl = Gum.Module.find_export_by_name (libc, "readdir_r");
|
||||
var readdir_r_impl = libc.find_export_by_name ("readdir_r");
|
||||
var readdir_r_listener = new ReadDirRListener (this, LEGACY);
|
||||
listeners.add (readdir_r_listener);
|
||||
interceptor.attach (readdir_r_impl, readdir_r_listener);
|
||||
interceptor.attach ((void *) readdir_r_impl, readdir_r_listener);
|
||||
|
||||
var readdir64_r_impl = Gum.Module.find_export_by_name (libc, "readdir64_r");
|
||||
if (readdir64_r_impl != null && readdir64_r_impl != readdir_r_impl) {
|
||||
var readdir64_r_impl = libc.find_export_by_name ("readdir64_r");
|
||||
if (readdir64_r_impl != 0 && readdir64_r_impl != readdir_r_impl) {
|
||||
var listener = new ReadDirRListener (this, MODERN);
|
||||
listeners.add (listener);
|
||||
interceptor.attach (readdir64_r_impl, listener);
|
||||
interceptor.attach ((void *) readdir64_r_impl, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,10 +467,10 @@ namespace Frida {
|
||||
public abstract bool matches_file (string name);
|
||||
}
|
||||
#else
|
||||
public class ThreadListCloaker : Object {
|
||||
public sealed class ThreadListCloaker : Object {
|
||||
}
|
||||
|
||||
public class FDListCloaker : Object {
|
||||
public sealed class FDListCloaker : Object {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class ExitMonitor : Object, Gum.InvocationListener {
|
||||
public sealed class ExitMonitor : Object, Gum.InvocationListener {
|
||||
public weak ExitHandler handler {
|
||||
get;
|
||||
construct;
|
||||
@@ -32,16 +32,17 @@ namespace Frida {
|
||||
unowned Gum.InvocationListener listener = this;
|
||||
|
||||
#if WINDOWS
|
||||
interceptor.attach (Gum.Module.find_export_by_name ("kernel32.dll", "ExitProcess"), listener);
|
||||
interceptor.attach ((void *) Gum.Process.find_module_by_name ("kernel32.dll").find_export_by_name ("ExitProcess"),
|
||||
listener);
|
||||
#else
|
||||
unowned string libc = Gum.Process.query_libc_name ();
|
||||
var libc = Gum.Process.get_libc_module ();
|
||||
const string[] apis = {
|
||||
"exit",
|
||||
"_exit",
|
||||
"abort",
|
||||
};
|
||||
foreach (var symbol in apis) {
|
||||
interceptor.attach (Gum.Module.find_export_by_name (libc, symbol), listener);
|
||||
interceptor.attach ((void *) libc.find_export_by_name (symbol), listener);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Frida {
|
||||
#if WINDOWS
|
||||
public class FileDescriptorGuard : Object {
|
||||
public sealed class FileDescriptorGuard : Object {
|
||||
public Gum.MemoryRange agent_range {
|
||||
get;
|
||||
construct;
|
||||
@@ -11,7 +11,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
#else
|
||||
public class FileDescriptorGuard : Object {
|
||||
public sealed class FileDescriptorGuard : Object {
|
||||
public Gum.MemoryRange agent_range {
|
||||
get;
|
||||
construct;
|
||||
@@ -26,9 +26,9 @@ namespace Frida {
|
||||
construct {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
var close = Gum.Module.find_export_by_name (Gum.Process.query_libc_name (), "close");
|
||||
var close = Gum.Process.get_libc_module ().find_export_by_name ("close");
|
||||
close_listener = new CloseListener (this);
|
||||
interceptor.attach (close, close_listener);
|
||||
interceptor.attach ((void *) close, close_listener);
|
||||
}
|
||||
|
||||
~FileDescriptorGuard () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Frida {
|
||||
#if WINDOWS
|
||||
public class FileDescriptorTablePadder {
|
||||
public sealed class FileDescriptorTablePadder {
|
||||
public static FileDescriptorTablePadder obtain () {
|
||||
return new FileDescriptorTablePadder ();
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
#else
|
||||
public class FileDescriptorTablePadder {
|
||||
public sealed class FileDescriptorTablePadder {
|
||||
private const int MIN_TABLE_SIZE = 32;
|
||||
|
||||
private static unowned FileDescriptorTablePadder shared_instance = null;
|
||||
@@ -67,7 +67,7 @@ namespace Frida {
|
||||
int result = -1;
|
||||
#if LINUX
|
||||
do {
|
||||
result = Linux.dup3 (fd, pair[0], Posix.FD_CLOEXEC);
|
||||
result = LibcShim.dup3 (fd, pair[0], Posix.FD_CLOEXEC);
|
||||
} while (result == -1 && Posix.errno == Posix.EINTR);
|
||||
#else
|
||||
do {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Frida {
|
||||
#if WINDOWS
|
||||
public class ForkMonitor : Object {
|
||||
public sealed class ForkMonitor : Object {
|
||||
public weak ForkHandler handler {
|
||||
get;
|
||||
construct;
|
||||
@@ -11,7 +11,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
#else
|
||||
public class ForkMonitor : Object, Gum.InvocationListener {
|
||||
public sealed class ForkMonitor : Object, Gum.InvocationListener {
|
||||
public weak ForkHandler handler {
|
||||
get;
|
||||
construct;
|
||||
@@ -45,9 +45,9 @@ namespace Frida {
|
||||
}
|
||||
|
||||
static construct {
|
||||
unowned string libc = Gum.Process.query_libc_name ();
|
||||
fork_impl = Gum.Module.find_export_by_name (libc, "fork");
|
||||
vfork_impl = Gum.Module.find_export_by_name (libc, "vfork");
|
||||
var libc = Gum.Process.get_libc_module ();
|
||||
fork_impl = (void *) libc.find_export_by_name ("fork");
|
||||
vfork_impl = (void *) libc.find_export_by_name ("vfork");
|
||||
}
|
||||
|
||||
construct {
|
||||
@@ -61,15 +61,21 @@ namespace Frida {
|
||||
string cmdline;
|
||||
FileUtils.get_contents ("/proc/self/cmdline", out cmdline);
|
||||
if (cmdline == "zygote" || cmdline == "zygote64" || cmdline == "usap32" || cmdline == "usap64") {
|
||||
var set_argv0 = Gum.Module.find_export_by_name ("libandroid_runtime.so", "_Z27android_os_Process_setArgV0P7_JNIEnvP8_jobjectP8_jstring");
|
||||
if (set_argv0 != null) {
|
||||
interceptor.attach (set_argv0, listener, (void *) HookId.SET_ARGV0);
|
||||
child_recovery_behavior = DEFERRED_UNTIL_SET_ARGV0;
|
||||
var runtime = Gum.Process.find_module_by_name ("libandroid_runtime.so");
|
||||
if (runtime != null) {
|
||||
var set_argv0 = (void *) runtime.find_export_by_name ("_Z27android_os_Process_setArgV0P7_JNIEnvP8_jobjectP8_jstring");
|
||||
if (set_argv0 != null) {
|
||||
interceptor.attach (set_argv0, listener, (void *) HookId.SET_ARGV0);
|
||||
child_recovery_behavior = DEFERRED_UNTIL_SET_ARGV0;
|
||||
}
|
||||
}
|
||||
|
||||
var setcontext = Gum.Module.find_export_by_name ("libselinux.so", "selinux_android_setcontext");
|
||||
if (setcontext != null)
|
||||
interceptor.attach (setcontext, listener, (void *) HookId.SET_CTX);
|
||||
var selinux = Gum.Process.find_module_by_name ("libselinux.so");
|
||||
if (selinux != null) {
|
||||
var setcontext = (void *) selinux.find_export_by_name ("selinux_android_setcontext");
|
||||
if (setcontext != null)
|
||||
interceptor.attach (setcontext, listener, (void *) HookId.SET_CTX);
|
||||
}
|
||||
}
|
||||
} catch (FileError e) {
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{26F21663-D1B3-46E4-ACB6-115ED9CE086C}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-payload-32</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-payload-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-32.vcxproj">
|
||||
<Project>{8381538f-3cb5-480b-bfa4-960299af6485}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\frida-gum\gum-32.vcxproj">
|
||||
<Project>{b31c7d42-54b6-49bb-b30c-11745c48b062}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)process.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="process-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="spawn-monitor-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="thread-suspend-monitor-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libc-shim.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)cloak.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)exit-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fd-guard.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fdt-padder.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fork-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)script-engine.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)spawn-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)base-agent-session.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)portal-client.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="process.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-payload.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cloak.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="exit-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fd-guard.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fdt-padder.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fork-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="script-engine.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="spawn-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="thread-suspend-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="base-agent-session.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="portal-client.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{26CCF317-ACE8-4CD6-BDDE-FFED1AA2FADD}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-payload-64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-payload-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\frida-gum\bindings\gumjs\gumjs-64.vcxproj">
|
||||
<Project>{0b39885e-731c-4a45-a7de-44cbdbbf0067}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\frida-gum\gum-64.vcxproj">
|
||||
<Project>{dc30a450-95bc-4476-a2f9-45100562424e}</Project>
|
||||
<Private>false</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)process.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="process-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="spawn-monitor-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="thread-suspend-monitor-glue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libc-shim.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)cloak.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)exit-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fd-guard.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fdt-padder.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fork-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)script-engine.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)spawn-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)base-agent-session.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)portal-client.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="process.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-payload.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cloak.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="exit-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fd-guard.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fdt-padder.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="fork-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="script-engine.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="spawn-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="thread-suspend-monitor.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="base-agent-session.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="portal-client.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="process.vala">
|
||||
<Message>Compiling vala code</Message>
|
||||
<Command>"$(ValaCompiler)" process.vala base-agent-session.vala script-engine.vala portal-client.vala fork-monitor.vala spawn-monitor.vala thread-suspend-monitor.vala exit-monitor.vala cloak.vala fd-guard.vala fdt-padder.vala --ccode --directory=$(IntDir) --library=frida-payload --header=$(IntDir)frida-payload.h --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" $(ValaFlags) $(FridaCoreValaFlags) --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-gum-1.0 --pkg=frida-gumjs-1.0 --pkg=frida-base || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs>$(ValaCompiler);base-agent-session.vala;script-engine.vala;portal-client.vala;fork-monitor.vala;spawn-monitor.vala;thread-suspend-monitor.vala;exit-monitor.vala;cloak.vala;fd-guard.vala;fdt-padder.vala;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<None Include="base-agent-session.vala" />
|
||||
<None Include="script-engine.vala" />
|
||||
<None Include="portal-client.vala" />
|
||||
<None Include="fork-monitor.vala" />
|
||||
<None Include="spawn-monitor.vala" />
|
||||
<None Include="thread-suspend-monitor.vala" />
|
||||
<None Include="exit-monitor.vala" />
|
||||
<None Include="cloak.vala" />
|
||||
<None Include="fd-guard.vala" />
|
||||
<None Include="fdt-padder.vala" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-payload.h" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)process.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="process-glue.c" />
|
||||
<ClCompile Include="$(IntDir)base-agent-session.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)script-engine.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)portal-client.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fork-monitor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)spawn-monitor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="spawn-monitor-glue.c" />
|
||||
<ClCompile Include="$(IntDir)thread-suspend-monitor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="thread-suspend-monitor-glue.c" />
|
||||
<ClCompile Include="$(IntDir)exit-monitor.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)cloak.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fd-guard.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)fdt-padder.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libc-shim.c" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,4 +1,5 @@
|
||||
#define FRIDA_PRINTF_BUFFER_SIZE (512 * 1024)
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <errno.h>
|
||||
#include <gum/gum.h>
|
||||
@@ -24,6 +25,24 @@ frida_run_atexit_handlers (void)
|
||||
{
|
||||
}
|
||||
|
||||
# ifdef HAVE_ASAN
|
||||
|
||||
__attribute__ ((constructor)) static void
|
||||
frida_init_memory (void)
|
||||
{
|
||||
asm volatile ("");
|
||||
}
|
||||
|
||||
# ifndef HAVE_DARWIN
|
||||
__attribute__ ((destructor)) static void
|
||||
frida_deinit_memory (void)
|
||||
{
|
||||
asm volatile ("");
|
||||
}
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
#define FRIDA_SHIM_LOCK() gum_spinlock_acquire (&frida_shim_lock)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __FRIDA_LIBC_SHIM_H__
|
||||
#define __FRIDA_LIBC_SHIM_H__
|
||||
|
||||
#ifdef HAVE_LINUX
|
||||
int dup3 (int oldfd, int newfd, int flags);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,6 @@
|
||||
[CCode (cheader_filename = "libc-shim.h", lower_case_cprefix = "", gir_namespace = "FridaLibcShim", gir_version = "1.0")]
|
||||
namespace Frida.LibcShim {
|
||||
#if LINUX
|
||||
public int dup3 (int oldfd, int newfd, int flags);
|
||||
#endif
|
||||
}
|
||||
+19
-3
@@ -9,6 +9,8 @@ payload_sources = [
|
||||
'spawn-monitor-glue.c',
|
||||
'thread-suspend-monitor.vala',
|
||||
'thread-suspend-monitor-glue.c',
|
||||
'unwind-sitter.vala',
|
||||
'unwind-sitter-glue.c',
|
||||
'exit-monitor.vala',
|
||||
'cloak.vala',
|
||||
'fd-guard.vala',
|
||||
@@ -20,20 +22,31 @@ if host_os_family == 'linux'
|
||||
payload_sources += 'syscall-linux-@[email protected]'.format(host_arch)
|
||||
endif
|
||||
|
||||
extra_c_args = []
|
||||
extra_vala_args = []
|
||||
if host_os_family != 'windows'
|
||||
extra_vala_args += ['--pkg=posix']
|
||||
endif
|
||||
if host_os_family == 'darwin'
|
||||
# FIXME: Remove this once glib-2.0.vapi provides a GLib.Private binding not involving deprecated APIs.
|
||||
extra_c_args += ['-UGLIB_VERSION_MIN_REQUIRED', '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_30']
|
||||
extra_vala_args += ['--pkg=frida-gum-darwin-1.0']
|
||||
endif
|
||||
if host_os_family == 'linux'
|
||||
extra_vala_args += ['--pkg=linux']
|
||||
endif
|
||||
|
||||
payload_vala_args = gum_vala_args + gumjs_vala_args
|
||||
|
||||
payload = static_library('frida-payload-' + api_version, payload_sources,
|
||||
c_args: frida_component_cflags,
|
||||
vala_args: extra_vala_args,
|
||||
c_args: [frida_component_cflags, extra_c_args],
|
||||
vala_args: [
|
||||
'--vapidir=' + meson.current_source_dir(),
|
||||
'--pkg=libc-shim',
|
||||
payload_vala_args,
|
||||
base_vala_args,
|
||||
extra_vala_args,
|
||||
],
|
||||
vala_header: 'frida-payload.h',
|
||||
vala_vapi: f'frida-payload-@[email protected]',
|
||||
dependencies: [gio_dep, gee_dep, json_glib_dep, gum_dep, gumjs_dep, base_dep],
|
||||
@@ -48,5 +61,8 @@ payload_dep = declare_dependency(
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(payload,
|
||||
description: 'Frida payload library intended for static linking into payloads',
|
||||
filebase: f'frida-payload-@api_version@',
|
||||
name: 'Frida Payload Library',
|
||||
version: frida_version,
|
||||
description: 'Building blocks commonly needed to implement payloads',
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class PortalClient : Object, AgentSessionProvider {
|
||||
public sealed class PortalClient : Object, AgentSessionProvider {
|
||||
public signal void resume ();
|
||||
public signal void kill ();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class ScriptEngine : Object {
|
||||
public sealed class ScriptEngine : Object {
|
||||
public signal void message_from_script (AgentScriptId script_id, string json, Bytes? data);
|
||||
public signal void message_from_debugger (AgentScriptId script_id, string message);
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace Frida {
|
||||
source.attach (Gum.ScriptBackend.get_scheduler ().get_js_context ());
|
||||
}
|
||||
|
||||
public class ScriptInstance : Object, RpcPeer {
|
||||
public sealed class ScriptInstance : Object, RpcPeer {
|
||||
public signal void closed ();
|
||||
public signal void message (string json, Bytes? data);
|
||||
public signal void debug_message (string message);
|
||||
@@ -420,7 +420,7 @@ namespace Frida {
|
||||
var reason_value = new Json.Node.alloc ().init_string (reason.to_nick ());
|
||||
|
||||
try {
|
||||
yield rpc_client.call ("dispose", new Json.Node[] { reason_value }, null);
|
||||
yield rpc_client.call ("dispose", new Json.Node[] { reason_value }, null, null);
|
||||
} catch (GLib.Error e) {
|
||||
}
|
||||
|
||||
@@ -467,10 +467,10 @@ namespace Frida {
|
||||
this.debug_message (message);
|
||||
}
|
||||
|
||||
private async void post_rpc_message (string json, Cancellable? cancellable) throws Error, IOError {
|
||||
private async void post_rpc_message (string json, Bytes? data, Cancellable? cancellable) throws Error, IOError {
|
||||
if (script == null)
|
||||
throw new Error.INVALID_OPERATION ("Script is destroyed");
|
||||
script.post (json);
|
||||
script.post (json, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class SpawnMonitor : Object, Gum.InvocationListener {
|
||||
public sealed class SpawnMonitor : Object, Gum.InvocationListener {
|
||||
public weak SpawnHandler handler {
|
||||
get;
|
||||
construct;
|
||||
@@ -27,7 +27,7 @@ namespace Frida {
|
||||
|
||||
private void * execve;
|
||||
|
||||
private Private posix_spawn_caller_is_internal = new Private ();
|
||||
private static Private posix_spawn_caller_is_internal = new Private ();
|
||||
#endif
|
||||
|
||||
public SpawnMonitor (SpawnHandler handler, MainContext main_context) {
|
||||
@@ -38,27 +38,36 @@ namespace Frida {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
#if WINDOWS
|
||||
var create_process_internal = Gum.Module.find_export_by_name ("kernelbase.dll", "CreateProcessInternalW");
|
||||
if (create_process_internal == null)
|
||||
create_process_internal = Gum.Module.find_export_by_name ("kernel32.dll", "CreateProcessInternalW");
|
||||
assert (create_process_internal != null);
|
||||
interceptor.attach (create_process_internal, this);
|
||||
var kernelbase = Gum.Process.find_module_by_name ("kernelbase.dll");
|
||||
var create_process_internal = (kernelbase != null) ? kernelbase.find_export_by_name ("CreateProcessInternalW") : 0;
|
||||
if (create_process_internal == 0) {
|
||||
create_process_internal = Gum.Process.find_module_by_name ("kernel32.dll")
|
||||
.find_export_by_name ("CreateProcessInternalW");
|
||||
}
|
||||
assert (create_process_internal != 0);
|
||||
interceptor.attach ((void *) create_process_internal, this);
|
||||
#else
|
||||
unowned string libc = Gum.Process.query_libc_name ();
|
||||
var libc = Gum.Process.get_libc_module ();
|
||||
#if DARWIN
|
||||
posix_spawn = (PosixSpawnFunc) Gum.Module.find_export_by_name (libc, "posix_spawn");
|
||||
posix_spawnattr_init = (PosixSpawnAttrInitFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_init");
|
||||
posix_spawnattr_destroy = (PosixSpawnAttrDestroyFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_destroy");
|
||||
posix_spawnattr_getflags = (PosixSpawnAttrSetFlagsFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_getflags");
|
||||
posix_spawnattr_setflags = (PosixSpawnAttrSetFlagsFunc) Gum.Module.find_export_by_name (libc, "posix_spawnattr_setflags");
|
||||
posix_spawn = (PosixSpawnFunc) libc.find_export_by_name ("posix_spawn");
|
||||
posix_spawnattr_init = (PosixSpawnAttrInitFunc) libc.find_export_by_name ("posix_spawnattr_init");
|
||||
posix_spawnattr_destroy = (PosixSpawnAttrDestroyFunc) libc.find_export_by_name ("posix_spawnattr_destroy");
|
||||
posix_spawnattr_getflags = (PosixSpawnAttrSetFlagsFunc) libc.find_export_by_name ("posix_spawnattr_getflags");
|
||||
posix_spawnattr_setflags = (PosixSpawnAttrSetFlagsFunc) libc.find_export_by_name ("posix_spawnattr_setflags");
|
||||
|
||||
execve = Gum.Module.find_export_by_name (libc, "execve");
|
||||
execve = (void *) libc.find_export_by_name ("execve");
|
||||
|
||||
interceptor.attach ((void *) posix_spawn, this);
|
||||
|
||||
interceptor.replace (execve, (void *) replacement_execve, this);
|
||||
#else
|
||||
interceptor.attach (Gum.Module.find_export_by_name (libc, "execve"), this);
|
||||
Gum.Address execve = 0;
|
||||
#if ANDROID
|
||||
execve = libc.find_symbol_by_name ("__execve");
|
||||
#endif
|
||||
if (execve == 0)
|
||||
execve = libc.find_export_by_name ("execve");
|
||||
interceptor.attach ((void *) execve, this);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace Frida {
|
||||
#if DARWIN
|
||||
public class ThreadSuspendMonitor : Object {
|
||||
public sealed class ThreadSuspendMonitor : Object {
|
||||
public weak ProcessInvader invader {
|
||||
get;
|
||||
construct;
|
||||
@@ -26,9 +26,10 @@ namespace Frida {
|
||||
construct {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
task_threads = (TaskThreadsFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "task_threads");
|
||||
thread_suspend = (ThreadSuspendFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "thread_suspend");
|
||||
thread_resume = (ThreadResumeFunc) Gum.Module.find_export_by_name (LIBSYSTEM_KERNEL, "thread_resume");
|
||||
var kernel = Gum.Process.find_module_by_name (LIBSYSTEM_KERNEL);
|
||||
task_threads = (TaskThreadsFunc) kernel.find_export_by_name ("task_threads");
|
||||
thread_suspend = (ThreadSuspendFunc) kernel.find_export_by_name ("thread_suspend");
|
||||
thread_resume = (ThreadResumeFunc) kernel.find_export_by_name ("thread_resume");
|
||||
|
||||
interceptor.replace ((void *) task_threads, (void *) replacement_task_threads, this);
|
||||
interceptor.replace ((void *) thread_suspend, (void *) replacement_thread_suspend, this);
|
||||
@@ -84,14 +85,19 @@ namespace Frida {
|
||||
if (script_backend == null || thread_id == caller_thread_id)
|
||||
return thread_suspend (thread_id);
|
||||
|
||||
int result = 0;
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
int result = 0;
|
||||
while (true) {
|
||||
script_backend.with_lock_held (() => {
|
||||
result = thread_suspend (thread_id);
|
||||
interceptor.with_lock_held (() => {
|
||||
Gum.Cloak.with_lock_held (() => {
|
||||
result = thread_suspend (thread_id);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if (result != 0 || !script_backend.is_locked ())
|
||||
if (result != 0 || (!script_backend.is_locked () && !Gum.Cloak.is_locked () && !interceptor.is_locked ()))
|
||||
break;
|
||||
|
||||
if (thread_resume (thread_id) != 0)
|
||||
@@ -125,7 +131,7 @@ namespace Frida {
|
||||
}
|
||||
}
|
||||
#else
|
||||
public class ThreadSuspendMonitor : Object {
|
||||
public sealed class ThreadSuspendMonitor : Object {
|
||||
public weak ProcessInvader invader {
|
||||
get;
|
||||
construct;
|
||||
|
||||
@@ -0,0 +1,529 @@
|
||||
#include "frida-payload.h"
|
||||
|
||||
#ifdef HAVE_DARWIN
|
||||
|
||||
#include <capstone.h>
|
||||
#include <gum/gumdarwin.h>
|
||||
#include <gum/gummemory.h>
|
||||
#include <ptrauth.h>
|
||||
|
||||
#define FRIDA_MH_MAGIC_64 0xfeedfacf
|
||||
#define FRIDA_LIBUNWIND_PATH "/usr/lib/system/libunwind.dylib"
|
||||
#define FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_SET_INFO 0x68
|
||||
#define FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_GET_REG 0x18
|
||||
#define FRIDA_FP_TO_SP(fp) (fp + 0x10)
|
||||
#ifdef HAVE_ARM64
|
||||
# define FRIDA_UNWIND_CURSOR_unwindInfoMissing 0x268
|
||||
# define FRIDA_UNWAARCH64_X29 29
|
||||
# define FRIDA_STRIP_MASK 0x0000007fffffffffULL
|
||||
#else
|
||||
# define FRIDA_UNWIND_CURSOR_unwindInfoMissing 0x100
|
||||
# define FRIDA_UNWX86_64_RBP 6
|
||||
#endif
|
||||
|
||||
typedef struct _FridaFillInfoContext FridaFillInfoContext;
|
||||
typedef struct _FridaDyldUnwindSections FridaDyldUnwindSections;
|
||||
typedef struct _FridaCreateArgs FridaCreateArgs;
|
||||
typedef struct _FridaUnwindHookState FridaUnwindHookState;
|
||||
|
||||
struct _FridaFillInfoContext
|
||||
{
|
||||
FridaDyldUnwindSections * info;
|
||||
guint missing_info;
|
||||
};
|
||||
|
||||
struct _FridaDyldUnwindSections
|
||||
{
|
||||
const void * mh;
|
||||
const void * dwarf_section;
|
||||
uintptr_t dwarf_section_length;
|
||||
const void * compact_unwind_section;
|
||||
uintptr_t compact_unwind_section_length;
|
||||
};
|
||||
|
||||
struct _FridaCreateArgs
|
||||
{
|
||||
GumAddress range_start;
|
||||
GumAddress range_end;
|
||||
};
|
||||
|
||||
struct _FridaUnwindHookState
|
||||
{
|
||||
gpointer vtable;
|
||||
gssize shift;
|
||||
gpointer * set_info_slot;
|
||||
gpointer set_info_original;
|
||||
void (* set_info) (gpointer cursor, gint is_return_address);
|
||||
gpointer (* get_reg) (gpointer cursor, gint reg);
|
||||
GumInterceptor * interceptor;
|
||||
};
|
||||
|
||||
#if __has_feature (ptrauth_calls)
|
||||
# define FRIDA_RESIGN_PTR(x) GSIZE_TO_POINTER (gum_sign_code_address (gum_strip_code_address (GUM_ADDRESS (x))))
|
||||
#else
|
||||
# define FRIDA_RESIGN_PTR(x) (x)
|
||||
#endif
|
||||
|
||||
static FridaDyldUnwindSections * frida_get_cached_sections (GumAddress range_start, GumAddress range_end);
|
||||
static FridaDyldUnwindSections * frida_create_cached_sections (FridaCreateArgs * args);
|
||||
static gboolean frida_fill_info (const GumDarwinSectionDetails * details, FridaFillInfoContext * ctx);
|
||||
static void frida_unwind_cursor_set_info_replacement (gpointer cursor, gint is_return_address);
|
||||
static gpointer frida_find_vtable (void);
|
||||
static gboolean frida_compute_vtable_shift (gpointer vtable, gssize * shift);
|
||||
#ifdef HAVE_ARM64
|
||||
static gboolean frida_find_bss_range (const GumSectionDetails * details, GumMemoryRange * range);
|
||||
#else
|
||||
static gboolean frida_is_empty_function (GumAddress address);
|
||||
static gboolean frida_has_first_match (GumAddress address, gsize size, gboolean * matches);
|
||||
#endif
|
||||
|
||||
static FridaUnwindHookState * state = NULL;
|
||||
|
||||
void
|
||||
_frida_unwind_sitter_fill_unwind_sections (GumAddress invader_start, GumAddress invader_end, void * info)
|
||||
{
|
||||
FridaDyldUnwindSections * unwind_sections = info;
|
||||
FridaDyldUnwindSections * cached;
|
||||
|
||||
cached = frida_get_cached_sections (invader_start, invader_end);
|
||||
if (cached == NULL)
|
||||
return;
|
||||
|
||||
memcpy (unwind_sections, cached, sizeof (FridaDyldUnwindSections));
|
||||
}
|
||||
|
||||
void
|
||||
_frida_unwind_sitter_hook_libunwind (void)
|
||||
{
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
gpointer * set_info_slot;
|
||||
gpointer get_reg_impl;
|
||||
|
||||
if (state != NULL)
|
||||
return;
|
||||
|
||||
state = g_slice_new0 (FridaUnwindHookState);
|
||||
if (state == NULL)
|
||||
return;
|
||||
|
||||
state->vtable = frida_find_vtable ();
|
||||
if (state->vtable == NULL)
|
||||
goto unsupported_version;
|
||||
|
||||
if (!frida_compute_vtable_shift (state->vtable, &state->shift))
|
||||
goto unsupported_version;
|
||||
|
||||
set_info_slot = (gpointer *) (GUM_ADDRESS (state->vtable) + FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_SET_INFO + state->shift);
|
||||
get_reg_impl = *(gpointer *) (GUM_ADDRESS (state->vtable) + FRIDA_UNWIND_CURSOR_VTABLE_OFFSET_GET_REG + state->shift);
|
||||
|
||||
state->set_info_slot = set_info_slot;
|
||||
state->set_info_original = *set_info_slot;
|
||||
state->set_info = FRIDA_RESIGN_PTR (state->set_info_original);
|
||||
state->get_reg = FRIDA_RESIGN_PTR (get_reg_impl);
|
||||
|
||||
state->interceptor = gum_interceptor_obtain ();
|
||||
|
||||
if (gum_interceptor_replace (state->interceptor, state->set_info_original, frida_unwind_cursor_set_info_replacement, NULL, NULL)
|
||||
!= GUM_REPLACE_OK)
|
||||
goto unsupported_version;
|
||||
|
||||
return;
|
||||
|
||||
unsupported_version:
|
||||
g_slice_free (FridaUnwindHookState, state);
|
||||
state = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
_frida_unwind_sitter_unhook_libunwind (void)
|
||||
{
|
||||
if (state == NULL)
|
||||
return;
|
||||
|
||||
gum_interceptor_revert (state->interceptor, state->set_info_original);
|
||||
|
||||
g_object_unref (state->interceptor);
|
||||
|
||||
g_slice_free (FridaUnwindHookState, state);
|
||||
state = NULL;
|
||||
}
|
||||
|
||||
static FridaDyldUnwindSections *
|
||||
frida_get_cached_sections (GumAddress range_start, GumAddress range_end)
|
||||
{
|
||||
static GOnce get_sections_once = G_ONCE_INIT;
|
||||
FridaCreateArgs args;
|
||||
|
||||
args.range_start = range_start;
|
||||
args.range_end = range_end;
|
||||
|
||||
g_once (&get_sections_once, (GThreadFunc) frida_create_cached_sections, &args);
|
||||
|
||||
return (FridaDyldUnwindSections *) get_sections_once.retval;
|
||||
}
|
||||
|
||||
static FridaDyldUnwindSections *
|
||||
frida_create_cached_sections (FridaCreateArgs * args)
|
||||
{
|
||||
FridaDyldUnwindSections * cached_sections;
|
||||
gsize page_size;
|
||||
gpointer header;
|
||||
GumPageProtection prot;
|
||||
GumDarwinModule * module;
|
||||
FridaFillInfoContext ctx;
|
||||
|
||||
page_size = gum_query_page_size ();
|
||||
header = GSIZE_TO_POINTER (args->range_start);
|
||||
|
||||
while ((gum_memory_query_protection (header, &prot) && (prot & GUM_PAGE_READ) == 0) ||
|
||||
(*(guint32 *) header != FRIDA_MH_MAGIC_64 && header + 4 <= GSIZE_TO_POINTER (args->range_end)))
|
||||
{
|
||||
header += page_size;
|
||||
}
|
||||
if (*(guint32 *) header != FRIDA_MH_MAGIC_64)
|
||||
return NULL;
|
||||
|
||||
cached_sections = g_slice_new0 (FridaDyldUnwindSections);
|
||||
cached_sections->mh = header;
|
||||
|
||||
module = gum_darwin_module_new_from_memory ("Frida", mach_task_self (), GPOINTER_TO_SIZE (header), GUM_DARWIN_MODULE_FLAGS_NONE, NULL);
|
||||
if (module == NULL)
|
||||
return cached_sections;
|
||||
|
||||
ctx.info = cached_sections;
|
||||
ctx.missing_info = 2;
|
||||
gum_darwin_module_enumerate_sections (module, (GumFoundDarwinSectionFunc) frida_fill_info, &ctx);
|
||||
|
||||
g_object_unref (module);
|
||||
|
||||
return cached_sections;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
frida_fill_info (const GumDarwinSectionDetails * details, FridaFillInfoContext * ctx)
|
||||
{
|
||||
if (strcmp ("__TEXT", details->segment_name) != 0)
|
||||
return TRUE;
|
||||
|
||||
if (strcmp ("__eh_frame", details->section_name) == 0)
|
||||
{
|
||||
ctx->missing_info--;
|
||||
ctx->info->dwarf_section = GSIZE_TO_POINTER (details->vm_address);
|
||||
ctx->info->dwarf_section_length = details->size;
|
||||
}
|
||||
else if (strcmp ("__unwind_info", details->section_name) == 0)
|
||||
{
|
||||
ctx->missing_info--;
|
||||
ctx->info->compact_unwind_section = GSIZE_TO_POINTER (details->vm_address);
|
||||
ctx->info->compact_unwind_section_length = details->size;
|
||||
}
|
||||
|
||||
return ctx->missing_info > 0;
|
||||
}
|
||||
|
||||
static void
|
||||
frida_unwind_cursor_set_info_replacement (gpointer self, gint is_return_address)
|
||||
{
|
||||
gboolean missing_info;
|
||||
GumAddress fp, stored_pc;
|
||||
gpointer * stored_pc_slot;
|
||||
#if defined (HAVE_ARM64) && !__has_feature (ptrauth_calls)
|
||||
gboolean was_signed = FALSE;
|
||||
#endif
|
||||
|
||||
if (state == NULL)
|
||||
return;
|
||||
|
||||
state->set_info (self, is_return_address);
|
||||
|
||||
#ifdef HAVE_ARM64
|
||||
fp = GUM_ADDRESS (state->get_reg (self, FRIDA_UNWAARCH64_X29));
|
||||
#else
|
||||
fp = GUM_ADDRESS (state->get_reg (self, FRIDA_UNWX86_64_RBP));
|
||||
#endif
|
||||
if (fp == 0 || fp == -1)
|
||||
return;
|
||||
|
||||
missing_info = *((guint8 *) self + FRIDA_UNWIND_CURSOR_unwindInfoMissing);
|
||||
|
||||
stored_pc_slot = GSIZE_TO_POINTER (fp + GLIB_SIZEOF_VOID_P);
|
||||
stored_pc = GUM_ADDRESS (*stored_pc_slot);
|
||||
#if __has_feature (ptrauth_calls)
|
||||
stored_pc = gum_strip_code_address (stored_pc);
|
||||
#elif defined (HAVE_ARM64)
|
||||
was_signed = (stored_pc & ~FRIDA_STRIP_MASK) != 0ULL;
|
||||
if (was_signed)
|
||||
stored_pc &= FRIDA_STRIP_MASK;
|
||||
#endif
|
||||
|
||||
if (!missing_info)
|
||||
{
|
||||
GumAddress translated;
|
||||
|
||||
translated = GUM_ADDRESS (gum_invocation_stack_translate (gum_interceptor_get_current_stack (), GSIZE_TO_POINTER (stored_pc)));
|
||||
if (translated != stored_pc)
|
||||
{
|
||||
#if __has_feature (ptrauth_calls)
|
||||
*stored_pc_slot = ptrauth_sign_unauthenticated (
|
||||
ptrauth_strip (GSIZE_TO_POINTER (translated), ptrauth_key_asia), ptrauth_key_asib, FRIDA_FP_TO_SP (fp));
|
||||
#elif defined (HAVE_ARM64)
|
||||
if (was_signed)
|
||||
{
|
||||
GumAddress resigned;
|
||||
|
||||
asm volatile (
|
||||
"mov x17, %1\n\t"
|
||||
"mov x16, %2\n\t"
|
||||
".byte 0x5f, 0x21, 0x03, 0xd5\n\t" /* pacib1716 */
|
||||
"mov %0, x17\n\t"
|
||||
: "=r" (resigned)
|
||||
: "r" (translated & FRIDA_STRIP_MASK),
|
||||
"r" (FRIDA_FP_TO_SP (fp))
|
||||
: "x16", "x17"
|
||||
);
|
||||
|
||||
*stored_pc_slot = GSIZE_TO_POINTER (resigned);
|
||||
}
|
||||
else
|
||||
{
|
||||
*stored_pc_slot = GSIZE_TO_POINTER (translated);
|
||||
}
|
||||
#else
|
||||
*stored_pc_slot = GSIZE_TO_POINTER (translated);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gpointer
|
||||
frida_find_vtable (void)
|
||||
{
|
||||
GumAddress result = 0;
|
||||
GumModule * libunwind;
|
||||
GumAddress export;
|
||||
uint64_t address;
|
||||
G_GNUC_UNUSED cs_err err;
|
||||
csh capstone;
|
||||
cs_insn * insn = NULL;
|
||||
const uint8_t * code;
|
||||
size_t size;
|
||||
const size_t max_size = 2048;
|
||||
|
||||
libunwind = gum_process_find_module_by_name (FRIDA_LIBUNWIND_PATH);
|
||||
if (libunwind == NULL)
|
||||
goto beach;
|
||||
|
||||
export = gum_module_find_export_by_name (libunwind, "unw_init_local");
|
||||
if (export == 0)
|
||||
export = gum_module_find_export_by_name (libunwind, "_Unwind_RaiseException");
|
||||
if (export == 0)
|
||||
goto beach;
|
||||
export = gum_strip_code_address (export);
|
||||
address = export;
|
||||
|
||||
#ifdef HAVE_ARM64
|
||||
cs_arch_register_arm64 ();
|
||||
err = cs_open (CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &capstone);
|
||||
#else
|
||||
cs_arch_register_x86 ();
|
||||
err = cs_open (CS_ARCH_X86, CS_MODE_64, &capstone);
|
||||
#endif
|
||||
g_assert (err == CS_ERR_OK);
|
||||
|
||||
err = cs_option (capstone, CS_OPT_DETAIL, CS_OPT_ON);
|
||||
g_assert (err == CS_ERR_OK);
|
||||
|
||||
insn = cs_malloc (capstone);
|
||||
code = GSIZE_TO_POINTER (export);
|
||||
size = max_size;
|
||||
|
||||
#ifdef HAVE_ARM64
|
||||
{
|
||||
GumAddress last_adrp;
|
||||
guint last_adrp_reg;
|
||||
GumMemoryRange bss_range;
|
||||
|
||||
bss_range.base_address = 0;
|
||||
gum_module_enumerate_sections (libunwind, (GumFoundSectionFunc) frida_find_bss_range, &bss_range);
|
||||
|
||||
while (cs_disasm_iter (capstone, &code, &size, &address, insn))
|
||||
{
|
||||
if (insn->id == ARM64_INS_RET || insn->id == ARM64_INS_RETAA || insn->id == ARM64_INS_RETAB)
|
||||
break;
|
||||
if (insn->id == ARM64_INS_ADRP)
|
||||
{
|
||||
if (result != 0)
|
||||
break;
|
||||
last_adrp = (GumAddress) insn->detail->arm64.operands[1].imm;
|
||||
last_adrp_reg = insn->detail->arm64.operands[0].reg;
|
||||
}
|
||||
else if (insn->id == ARM64_INS_ADD && insn->detail->arm64.operands[0].reg == last_adrp_reg)
|
||||
{
|
||||
GumAddress candidate;
|
||||
gboolean is_bss;
|
||||
|
||||
candidate = last_adrp + (GumAddress) insn->detail->arm64.operands[2].imm;
|
||||
|
||||
is_bss = bss_range.base_address != 0 &&
|
||||
bss_range.base_address <= candidate &&
|
||||
candidate < bss_range.base_address + bss_range.size;
|
||||
if (!is_bss)
|
||||
{
|
||||
if (result == 0)
|
||||
{
|
||||
result = candidate;
|
||||
last_adrp = candidate;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = candidate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (result != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
while (cs_disasm_iter (capstone, &code, &size, &address, insn))
|
||||
{
|
||||
if (insn->id == X86_INS_RET)
|
||||
break;
|
||||
if (insn->id == X86_INS_LEA)
|
||||
{
|
||||
const cs_x86_op * op = &insn->detail->x86.operands[1];
|
||||
if (op->type == X86_OP_MEM && op->mem.base == X86_REG_RIP)
|
||||
{
|
||||
result = address + op->mem.disp * op->mem.scale;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (insn != NULL)
|
||||
cs_free (insn, 1);
|
||||
cs_close (&capstone);
|
||||
|
||||
beach:
|
||||
g_clear_object (&libunwind);
|
||||
|
||||
return GSIZE_TO_POINTER (result);
|
||||
}
|
||||
|
||||
#ifdef HAVE_ARM64
|
||||
|
||||
static gboolean
|
||||
frida_find_bss_range (const GumSectionDetails * details, GumMemoryRange * range)
|
||||
{
|
||||
if (strcmp (details->name, "__bss") == 0)
|
||||
{
|
||||
range->base_address = details->address;
|
||||
range->size = details->size;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
frida_compute_vtable_shift (gpointer vtable, gssize * shift)
|
||||
{
|
||||
gboolean result = FALSE;
|
||||
G_GNUC_UNUSED cs_err err;
|
||||
csh capstone;
|
||||
cs_insn * insn = NULL;
|
||||
const uint8_t * code;
|
||||
uint64_t address;
|
||||
size_t size = 4;
|
||||
|
||||
cs_arch_register_arm64 ();
|
||||
err = cs_open (CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &capstone);
|
||||
g_assert (err == CS_ERR_OK);
|
||||
|
||||
insn = cs_malloc (capstone);
|
||||
code = gum_strip_code_pointer (*(gpointer *) vtable);
|
||||
address = GPOINTER_TO_SIZE (code);
|
||||
|
||||
if (cs_disasm_iter (capstone, &code, &size, &address, insn))
|
||||
{
|
||||
if (insn->id == ARM64_INS_RET || insn->id == ARM64_INS_RETAA || insn->id == ARM64_INS_RETAB)
|
||||
*shift = 0;
|
||||
else
|
||||
*shift = -2 * GLIB_SIZEOF_VOID_P;
|
||||
|
||||
result = TRUE;
|
||||
}
|
||||
|
||||
if (insn != NULL)
|
||||
cs_free (insn, 1);
|
||||
cs_close (&capstone);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static gboolean
|
||||
frida_compute_vtable_shift (gpointer vtable, gssize * shift)
|
||||
{
|
||||
GumAddress cursor = GPOINTER_TO_SIZE (vtable);
|
||||
GumAddress error = cursor + 16 * GLIB_SIZEOF_VOID_P;
|
||||
|
||||
while (cursor < error && *(gpointer *) GSIZE_TO_POINTER (cursor) == NULL)
|
||||
cursor += GLIB_SIZEOF_VOID_P;
|
||||
if (cursor == error)
|
||||
return FALSE;
|
||||
|
||||
if (frida_is_empty_function (GUM_ADDRESS (*(gpointer *) GSIZE_TO_POINTER (cursor))) &&
|
||||
frida_is_empty_function (GUM_ADDRESS (*(gpointer *) GSIZE_TO_POINTER (cursor + GLIB_SIZEOF_VOID_P))))
|
||||
{
|
||||
*shift = cursor - GPOINTER_TO_SIZE (vtable);
|
||||
}
|
||||
else
|
||||
{
|
||||
*shift = cursor - GPOINTER_TO_SIZE (vtable) - 2 * GLIB_SIZEOF_VOID_P;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
frida_is_empty_function (GumAddress address)
|
||||
{
|
||||
gboolean matches = FALSE;
|
||||
GumMemoryRange range;
|
||||
GumMatchPattern * pattern;
|
||||
|
||||
range.base_address = address;
|
||||
range.size = 6;
|
||||
|
||||
/*
|
||||
* 55 push rbp
|
||||
* 4889e5 mov rbp, rsp
|
||||
* 5d pop rbp
|
||||
* c3 ret
|
||||
*/
|
||||
pattern = gum_match_pattern_new_from_string ("55 48 89 e5 5d c3");
|
||||
|
||||
gum_memory_scan (&range, pattern, (GumMemoryScanMatchFunc) frida_has_first_match, &matches);
|
||||
|
||||
gum_match_pattern_unref (pattern);
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
frida_has_first_match (GumAddress address, gsize size, gboolean * matches)
|
||||
{
|
||||
*matches = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,76 @@
|
||||
namespace Frida {
|
||||
#if DARWIN
|
||||
public sealed class UnwindSitter : Object {
|
||||
public weak ProcessInvader invader {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
private DyldFindUnwindSectionsFunc dyld_find_unwind_sections;
|
||||
|
||||
private const string LIBDYLD = "/usr/lib/system/libdyld.dylib";
|
||||
|
||||
[CCode (has_target = false)]
|
||||
private delegate int DyldFindUnwindSectionsFunc (void * addr, void * info);
|
||||
|
||||
public UnwindSitter (ProcessInvader invader) {
|
||||
Object (invader: invader);
|
||||
}
|
||||
|
||||
construct {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
dyld_find_unwind_sections = (DyldFindUnwindSectionsFunc)
|
||||
Gum.Process.find_module_by_name (LIBDYLD).find_export_by_name ("_dyld_find_unwind_sections");
|
||||
|
||||
interceptor.replace ((void *) dyld_find_unwind_sections, (void *) replacement_dyld_find_unwind_sections, this);
|
||||
|
||||
_hook_libunwind ();
|
||||
}
|
||||
|
||||
public override void dispose () {
|
||||
var interceptor = Gum.Interceptor.obtain ();
|
||||
|
||||
_unhook_libunwind ();
|
||||
interceptor.revert ((void *) dyld_find_unwind_sections);
|
||||
|
||||
base.dispose ();
|
||||
}
|
||||
|
||||
private static int replacement_dyld_find_unwind_sections (void * addr, void * info) {
|
||||
unowned Gum.InvocationContext context = Gum.Interceptor.get_current_invocation ();
|
||||
unowned UnwindSitter sitter = (UnwindSitter) context.get_replacement_data ();
|
||||
|
||||
Gum.MemoryRange range = sitter.invader.get_memory_range ();
|
||||
var range_end = range.base_address + range.size;
|
||||
|
||||
var address = Gum.Address.from_pointer (addr);
|
||||
#if ARM64
|
||||
address &= 0x7ffffffffULL;
|
||||
#endif
|
||||
var is_ours = address >= range.base_address && address < range_end;
|
||||
if (!is_ours)
|
||||
return sitter.dyld_find_unwind_sections (addr, info);
|
||||
|
||||
_fill_unwind_sections (range.base_address, range_end, info);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public extern static void _fill_unwind_sections (Gum.Address invader_start, Gum.Address invader_end, void * info);
|
||||
public extern static void _hook_libunwind ();
|
||||
public extern static void _unhook_libunwind ();
|
||||
}
|
||||
#else
|
||||
public sealed class UnwindSitter : Object {
|
||||
public weak ProcessInvader invader {
|
||||
get;
|
||||
construct;
|
||||
}
|
||||
|
||||
public UnwindSitter (ProcessInvader invader) {
|
||||
Object (invader: invader);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4C39C3CF-13E5-4346-B6AE-F73013105936}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-pipe-32</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-pipe-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\base\frida-base-32.vcxproj">
|
||||
<Project>{c4203124-c838-437b-8662-ca477b146655}</Project>
|
||||
<Private>false</Private>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{e96fc7f6-bddd-4322-8836-d9af8b731269}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{ca976c61-371a-4de5-b837-a8bd8857bc13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pipe-windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)pipe.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pipe-sddl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="pipe.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-pipe.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pipe-glue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pipe-sddl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D50F460F-9C4D-42EB-A8C4-48C0C46CFAAF}</ProjectGuid>
|
||||
<RootNamespace>frida</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>frida-pipe-64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)releng\frida-toolchain.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)releng\frida-$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)build\tmp-windows\$(Platform)-$(Configuration)\$(ProjectName)\</OutDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(IntDir)..\frida-base-64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(FridaComponentDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="frida-pipe-common.props" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\releng\frida-deps.vcxproj">
|
||||
<Project>{4afce7c4-6d9a-4663-b43c-d2e518486910}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\base\frida-base-64.vcxproj">
|
||||
<Project>{a31522d9-715b-4e04-aa57-df7afebe082c}</Project>
|
||||
<Private>false</Private>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\generated">
|
||||
<UniqueIdentifier>{6c15c760-cd5b-41c4-ad64-83283571aeaf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\generated">
|
||||
<UniqueIdentifier>{984e0fc8-e24c-4868-a432-6dd66cc7db4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pipe-windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)pipe.c">
|
||||
<Filter>Source Files\generated</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pipe-sddl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="pipe.vala">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-pipe.h">
|
||||
<Filter>Header Files\generated</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pipe-glue.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pipe-sddl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>$(FridaCoreDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="pipe.vala">
|
||||
<Message>Compiling vala code</Message>
|
||||
<Command>"$(ValaCompiler)" pipe.vala --ccode --directory=$(IntDir) --library=frida-pipe --header=$(IntDir)frida-pipe.h $(ValaFlags) $(FridaCoreValaFlags) --vapidir="$(IntDir)..\frida-base-32" --vapidir="$(IntDir)..\frida-base-64" --pkg=gio-2.0 --pkg=nice --pkg=gee-0.8 --pkg=json-glib-1.0 --pkg=frida-base || exit 1
|
||||
echo > "$(IntDir)valacode.stamp"
|
||||
</Command>
|
||||
<AdditionalInputs>$(ValaCompiler);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs>$(IntDir)valacode.stamp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(IntDir)frida-pipe.h" />
|
||||
<ClInclude Include="pipe-glue.h" />
|
||||
<ClInclude Include="pipe-sddl.h" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(IntDir)pipe.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pipe-windows.c" />
|
||||
<ClCompile Include="pipe-sddl.c" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+11
-11
@@ -3,7 +3,7 @@ pipe_sources = [
|
||||
]
|
||||
|
||||
system_deps = []
|
||||
vala_args = []
|
||||
extra_vala_args = []
|
||||
|
||||
if host_os_family == 'windows'
|
||||
pipe_sources += [
|
||||
@@ -11,25 +11,25 @@ if host_os_family == 'windows'
|
||||
'pipe-sddl.c',
|
||||
]
|
||||
elif host_os in ['macos', 'ios', 'tvos']
|
||||
pipe_sources += ['pipe-darwin.c']
|
||||
|
||||
system_deps += [gio_unix_dep]
|
||||
vala_args += ['--pkg=frida-gum-darwin-1.0', '--pkg=posix']
|
||||
pipe_sources += 'pipe-darwin.c'
|
||||
extra_vala_args += '--pkg=frida-gum-darwin-1.0'
|
||||
else
|
||||
pipe_sources += ['pipe-unix.c']
|
||||
pipe_sources += 'pipe-unix.c'
|
||||
endif
|
||||
|
||||
system_deps += [gio_unix_dep]
|
||||
vala_args += ['--pkg=posix']
|
||||
if host_os_family != 'windows'
|
||||
system_deps += gio_unix_dep
|
||||
extra_vala_args += ['--pkg=gio-unix-2.0', '--pkg=posix']
|
||||
endif
|
||||
|
||||
if host_os == 'android'
|
||||
system_deps += [frida_selinux_dep]
|
||||
vala_args += frida_selinux_vala_args
|
||||
system_deps += libselinux_dep
|
||||
extra_vala_args += '--pkg=libselinux'
|
||||
endif
|
||||
|
||||
pipe = static_library('frida-pipe', pipe_sources,
|
||||
c_args: frida_component_cflags,
|
||||
vala_args: vala_args,
|
||||
vala_args: base_vala_args + extra_vala_args,
|
||||
vala_header: 'frida-pipe.h',
|
||||
dependencies: [glib_dep, gobject_dep, gio_dep, gee_dep, base_dep] + system_deps,
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "pipe-glue.h"
|
||||
|
||||
#include "frida-tvos.h"
|
||||
|
||||
#include "pipe-glue.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
namespace Frida {
|
||||
public class PipeTransport : Object {
|
||||
public sealed class PipeTransport : Object {
|
||||
public string local_address {
|
||||
get;
|
||||
construct;
|
||||
@@ -42,7 +42,7 @@ namespace Frida {
|
||||
}
|
||||
|
||||
#if WINDOWS
|
||||
public class WindowsPipe : IOStream {
|
||||
public sealed class WindowsPipe : IOStream {
|
||||
public string address {
|
||||
get;
|
||||
construct;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
frida_selinux_incdir = include_directories('.')
|
||||
|
||||
install_headers('frida-selinux.h', subdir: 'frida-' + api_version)
|
||||
frida_selinux_h = files('frida-selinux.h')
|
||||
install_headers(frida_selinux_h, subdir: 'frida-' + api_version)
|
||||
|
||||
frida_selinux = static_library('frida-selinux', 'patch.c',
|
||||
c_args: frida_component_cflags,
|
||||
dependencies: [glib_dep, libselinux_dep, libsepol_dep],
|
||||
dependencies: [glib_dep, gio_dep, libselinux_dep, libsepol_dep],
|
||||
)
|
||||
|
||||
frida_selinux_dep = declare_dependency(
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
@setlocal
|
||||
@echo off
|
||||
rem:: Based on: https://github.com/microsoft/terminal/issues/217#issuecomment-737594785
|
||||
goto :_start_
|
||||
|
||||
:set_real_dp0
|
||||
set dp0=%~dp0
|
||||
set "dp0=%dp0:~0,-1%"
|
||||
goto :eof
|
||||
|
||||
:_start_
|
||||
call :set_real_dp0
|
||||
|
||||
if not exist "%dp0%\releng\meson\meson.py" (
|
||||
pushd "%dp0%" & git submodule update --init --recursive --depth 1 & popd
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
)
|
||||
|
||||
endlocal & goto #_undefined_# 2>nul || title %COMSPEC% & python ^
|
||||
-c "import sys; sys.path.insert(0, sys.argv[1]); from releng.meson_make import main; main()" ^
|
||||
"%dp0%" ^
|
||||
.\build ^
|
||||
%*
|
||||
+510
-137
@@ -1,12 +1,51 @@
|
||||
project('frida-core', 'vala', 'c', 'cpp',
|
||||
version: '1.0.0',
|
||||
meson_version: '>=0.58.0',
|
||||
default_options: ['c_std=gnu99', 'cpp_std=c++11'],
|
||||
version: run_command(find_program('python3'), files('tools' / 'detect-version.py'),
|
||||
capture: true,
|
||||
check: true).stdout().strip(),
|
||||
meson_version: '>=1.1.0',
|
||||
default_options: ['c_std=gnu99,c99', 'cpp_std=c++17'],
|
||||
)
|
||||
|
||||
fs = import('fs')
|
||||
|
||||
if not meson.get_compiler('vala').version().endswith('-frida')
|
||||
error('''Incompatible Vala compiler detected.
|
||||
|
||||
Frida currently relies on features not yet upstream. Grab the Frida-optimized
|
||||
Vala compiler from:
|
||||
|
||||
https://github.com/frida/vala''')
|
||||
endif
|
||||
|
||||
c_languages = ['c', 'cpp']
|
||||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
releng = meson.global_source_root() / 'releng'
|
||||
if not fs.exists(releng)
|
||||
releng = meson.project_source_root() / 'releng'
|
||||
endif
|
||||
|
||||
frida_version = get_option('frida_version')
|
||||
if frida_version == ''
|
||||
frida_version = run_command(releng / 'frida_version.py', meson.project_source_root(), check: true).stdout().strip()
|
||||
endif
|
||||
tokens = frida_version.split('.')
|
||||
frida_major_version = tokens[0].to_int()
|
||||
frida_minor_version = tokens[1].to_int()
|
||||
if tokens.length() == 4
|
||||
frida_micro_version = tokens[2].split('-')[0].to_int() - 1
|
||||
frida_nano_version = tokens[3].to_int() + 1
|
||||
else
|
||||
assert(tokens.length() == 3)
|
||||
frida_micro_version = tokens[2].to_int()
|
||||
frida_nano_version = 0
|
||||
endif
|
||||
frida_profile = (frida_version != '0.0.0' and frida_nano_version == 0) ? 'prod' : 'dev'
|
||||
|
||||
api_version = '1.0'
|
||||
|
||||
header_install_dir = get_option('includedir') / 'frida-' + api_version
|
||||
header_install_dir = get_option('includedir') / f'frida-@api_version@'
|
||||
|
||||
build_os = build_machine.system()
|
||||
if build_os == 'android'
|
||||
@@ -14,13 +53,23 @@ if build_os == 'android'
|
||||
else
|
||||
build_os_family = build_os
|
||||
endif
|
||||
host_os = host_machine.system()
|
||||
if host_os == 'android'
|
||||
host_os_family = host_machine.system()
|
||||
if host_os_family == 'android'
|
||||
host_os_family = 'linux'
|
||||
else
|
||||
host_os_family = host_os
|
||||
endif
|
||||
host_is_64bit = host_machine.cpu_family().endswith('64')
|
||||
tokens = host_machine.subsystem().split('-')
|
||||
host_os = tokens[0]
|
||||
if tokens.length() == 2
|
||||
host_config = tokens[1]
|
||||
elif host_os_family == 'windows'
|
||||
if cc.get_argument_syntax() == 'msvc'
|
||||
host_config = get_option('b_vscrt')
|
||||
else
|
||||
host_config = 'mingw'
|
||||
endif
|
||||
else
|
||||
host_config = ''
|
||||
endif
|
||||
if host_machine.cpu_family() == 'arm'
|
||||
host_arch = 'arm'
|
||||
host_abi = 'arm'
|
||||
@@ -45,26 +94,34 @@ else
|
||||
host_arch = host_machine.cpu_family()
|
||||
host_abi = host_arch
|
||||
endif
|
||||
host_toolchain = (host_os_family == 'darwin') ? 'apple' : 'gnu'
|
||||
gumjs_archs = {
|
||||
'x86': 'ia32',
|
||||
'x86_64': 'x64',
|
||||
}
|
||||
host_arch_gumjs = gumjs_archs.get(host_arch, host_arch)
|
||||
if cc.sizeof('void *') == 8
|
||||
host_cpu_mode = '64'
|
||||
else
|
||||
host_cpu_mode = '32'
|
||||
endif
|
||||
host_docks_mobile_devices = host_os in ['windows', 'macos', 'linux'] and host_cpu_mode == '64'
|
||||
|
||||
c_languages = ['c', 'cpp']
|
||||
if host_os_family == 'darwin'
|
||||
c_languages += ['objc', 'objcpp']
|
||||
add_languages('objc', 'objcpp', native: false)
|
||||
endif
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
python = import('python').find_installation()
|
||||
|
||||
if cc.get_argument_syntax() == 'msvc'
|
||||
host_toolchain = 'microsoft'
|
||||
resource_blob_extension = '.obj'
|
||||
else
|
||||
host_toolchain = (host_os_family == 'darwin') ? 'apple' : 'gnu'
|
||||
resource_blob_extension = '.S'
|
||||
endif
|
||||
|
||||
vala_flags = []
|
||||
|
||||
frida_component_cflags = []
|
||||
ndebug = get_option('b_ndebug')
|
||||
if ndebug == 'true' or (ndebug == 'if-release' and not get_option('debug'))
|
||||
optimize_for_prod = ndebug == 'true' or (ndebug == 'if-release' and not get_option('debug'))
|
||||
if optimize_for_prod
|
||||
frida_component_cflags += [
|
||||
'-DG_DISABLE_ASSERT',
|
||||
'-DG_DISABLE_CHECKS',
|
||||
@@ -84,30 +141,6 @@ if host_arch == 'arm'
|
||||
endif
|
||||
|
||||
if host_os_family == 'darwin'
|
||||
apple_os_flavors = [
|
||||
['macOS', 'OSX'],
|
||||
['iOS', 'IOS'],
|
||||
['watchOS', 'WATCH'],
|
||||
['tvOS', 'TV'],
|
||||
]
|
||||
foreach candidate : apple_os_flavors
|
||||
name = candidate[0]
|
||||
constant = candidate[1]
|
||||
if cc.compiles('''
|
||||
#include <TargetConditionals.h>
|
||||
#if !TARGET_OS_@0@
|
||||
# error Nope
|
||||
#endif
|
||||
'''.format(constant),
|
||||
name: f'compiling for @name@')
|
||||
host_os = name.to_lower()
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
if host_os == 'darwin'
|
||||
error('Unable to detect Apple OS flavor')
|
||||
endif
|
||||
|
||||
have_ptrauth_src = '''
|
||||
#ifdef __clang__
|
||||
# if __has_feature (ptrauth_calls)
|
||||
@@ -126,28 +159,33 @@ if host_os_family == 'darwin'
|
||||
endif
|
||||
endif
|
||||
|
||||
if host_os_family == 'linux' and cc.has_header('android/api-level.h')
|
||||
host_os = 'android'
|
||||
if host_machine.endian() == 'big'
|
||||
if host_abi in ['arm', 'armhf']
|
||||
host_abi = 'armbe8'
|
||||
elif host_abi == 'arm64'
|
||||
host_abi = 'arm64be'
|
||||
endif
|
||||
endif
|
||||
|
||||
if cc.sizeof('void *') == 8
|
||||
host_cpu_mode = '64'
|
||||
if host_os_family == 'darwin' and host_arch == 'arm64'
|
||||
host_is_modern = host_abi == 'arm64e'
|
||||
else
|
||||
host_cpu_mode = '32'
|
||||
host_is_modern = host_cpu_mode == '64'
|
||||
endif
|
||||
|
||||
cdata = configuration_data()
|
||||
if cc.get_define('FRIDA_VERSION') == ''
|
||||
version = meson.project_version()
|
||||
tokens = version.split('.')
|
||||
cdata.set_quoted('FRIDA_VERSION', version)
|
||||
cdata.set('FRIDA_MAJOR_VERSION', tokens[0].to_int())
|
||||
cdata.set('FRIDA_MINOR_VERSION', tokens[1].to_int())
|
||||
cdata.set('FRIDA_MICRO_VERSION', tokens[2].to_int())
|
||||
cdata.set('FRIDA_NANO_VERSION', 0)
|
||||
endif
|
||||
|
||||
cdata.set_quoted('FRIDA_PREFIX', get_option('prefix'))
|
||||
cdata.set_quoted('FRIDA_VERSION', frida_version)
|
||||
cdata.set('FRIDA_MAJOR_VERSION', frida_major_version)
|
||||
cdata.set('FRIDA_MINOR_VERSION', frida_minor_version)
|
||||
cdata.set('FRIDA_MICRO_VERSION', frida_micro_version)
|
||||
cdata.set('FRIDA_NANO_VERSION', frida_nano_version)
|
||||
|
||||
escaped_prefix = get_option('prefix')
|
||||
if host_os_family == 'windows'
|
||||
escaped_prefix = escaped_prefix.replace('\\', '\\\\')
|
||||
endif
|
||||
cdata.set_quoted('FRIDA_PREFIX', escaped_prefix)
|
||||
|
||||
exe_suffix = (host_os_family == 'windows') ? '.exe' : ''
|
||||
if host_os_family == 'windows'
|
||||
@@ -162,11 +200,14 @@ helper_name = 'frida-helper' + exe_suffix
|
||||
agent_name = 'frida-agent' + shlib_suffix
|
||||
gadget_name = 'frida-gadget' + shlib_suffix
|
||||
|
||||
root_asset_dir = get_option('libdir') / 'frida'
|
||||
if host_os_family == 'darwin'
|
||||
asset_dir = get_option('libdir') / 'frida'
|
||||
asset_dir = root_asset_dir
|
||||
default_asset_path_template = get_option('prefix') / get_option('libdir') / 'frida'
|
||||
else
|
||||
asset_dir = get_option('libdir') / 'frida' / host_cpu_mode
|
||||
asset_dir = root_asset_dir / host_cpu_mode
|
||||
asset_dir_modern = root_asset_dir / '64'
|
||||
asset_dir_legacy = root_asset_dir / '32'
|
||||
default_asset_path_template = get_option('prefix') / get_option('libdir') / 'frida' / '<arch>'
|
||||
endif
|
||||
|
||||
@@ -240,33 +281,69 @@ if get_option('b_sanitize') == 'address'
|
||||
cdata.set('HAVE_ASAN', 1)
|
||||
endif
|
||||
|
||||
glib_dep = dependency('glib-2.0', version: '>=2.74')
|
||||
gum_dep = dependency('frida-gum-1.0', default_options: [
|
||||
f'frida_version=@frida_version@',
|
||||
'gumjs=enabled',
|
||||
])
|
||||
gumjs_dep = dependency('frida-gumjs-1.0')
|
||||
gumjs_inspector_dep = dependency('frida-gumjs-inspector-1.0')
|
||||
|
||||
glib_options = [
|
||||
'cocoa=disabled',
|
||||
'selinux=disabled',
|
||||
'xattr=false',
|
||||
'libmount=disabled',
|
||||
'tests=false',
|
||||
'nls=disabled',
|
||||
]
|
||||
if optimize_for_prod
|
||||
glib_options += [
|
||||
'glib_debug=disabled',
|
||||
'glib_assert=false',
|
||||
'glib_checks=false',
|
||||
]
|
||||
endif
|
||||
|
||||
gee_options = [
|
||||
'disable-introspection=true',
|
||||
]
|
||||
if optimize_for_prod
|
||||
gee_options += 'disable-internal-asserts=true'
|
||||
endif
|
||||
|
||||
glib_dep = dependency('glib-2.0', version: '>=2.72', default_options: glib_options)
|
||||
gobject_dep = dependency('gobject-2.0')
|
||||
gmodule_dep = dependency('gmodule-2.0')
|
||||
gio_dep = dependency('gio-2.0')
|
||||
gee_dep = dependency('gee-0.8')
|
||||
json_glib_dep = dependency('json-glib-1.0')
|
||||
libsoup_dep = dependency('libsoup-3.0')
|
||||
gum_dep = dependency('frida-gum-1.0')
|
||||
gumjs_dep = dependency('frida-gumjs-1.0')
|
||||
gumjs_inspector_dep = dependency('frida-gumjs-inspector-1.0')
|
||||
quickjs_dep = dependency('quickjs', required: false)
|
||||
gee_dep = dependency('gee-0.8', default_options: gee_options)
|
||||
json_glib_dep = dependency('json-glib-1.0', default_options: [
|
||||
'introspection=disabled',
|
||||
'gtk_doc=disabled',
|
||||
'tests=false',
|
||||
])
|
||||
libsoup_dep = dependency('libsoup-3.0', default_options: [
|
||||
'gssapi=disabled',
|
||||
'ntlm=disabled',
|
||||
'brotli=disabled',
|
||||
'tls_check=false',
|
||||
'introspection=disabled',
|
||||
'vapi=disabled',
|
||||
'docs=disabled',
|
||||
'examples=disabled',
|
||||
'tests=false',
|
||||
'sysprof=disabled',
|
||||
])
|
||||
brotlidec_dep = dependency('libbrotlidec')
|
||||
quickjs_dep = dependency('quickjs', required: get_option('barebone_backend'), default_options: [
|
||||
'libc=false',
|
||||
'bignum=true',
|
||||
'atomics=disabled',
|
||||
'stack_check=disabled',
|
||||
])
|
||||
|
||||
have_v8 = gumjs_dep.get_variable('gumjs_v8') == 'enabled'
|
||||
if have_v8
|
||||
vala_flags += ['--define=HAVE_V8']
|
||||
v8_mksnapshot = find_program('v8-mksnapshot-@0@-@1@'.format(host_os, host_abi), required: false)
|
||||
if not v8_mksnapshot.found()
|
||||
v8_mksnapshot = ''
|
||||
endif
|
||||
else
|
||||
v8_mksnapshot = ''
|
||||
endif
|
||||
|
||||
native_glib_dep = dependency('glib-2.0', version: '>=2.74', native: true)
|
||||
native_glib_dep = dependency('glib-2.0', version: '>=2.74', native: true, default_options: glib_options)
|
||||
native_gio_dep = dependency('gio-2.0', native: true)
|
||||
native_gee_dep = dependency('gee-0.8', native: true)
|
||||
native_gee_dep = dependency('gee-0.8', native: true, default_options: gee_options)
|
||||
native_brotlienc_dep = dependency('libbrotlienc', native: true)
|
||||
|
||||
if host_os_family == 'windows'
|
||||
@@ -275,11 +352,226 @@ else
|
||||
gio_unix_dep = dependency('gio-unix-2.0')
|
||||
endif
|
||||
|
||||
if host_os == 'android'
|
||||
minizip_dep = dependency('minizip', required: false, default_options: [
|
||||
'zlib=enabled',
|
||||
'lzma=disabled',
|
||||
])
|
||||
endif
|
||||
|
||||
if host_toolchain == 'microsoft'
|
||||
lib = find_program('lib')
|
||||
ar = ''
|
||||
nm = ''
|
||||
ranlib = ''
|
||||
strip = ''
|
||||
else
|
||||
lib = ''
|
||||
ar = find_program('ar')
|
||||
nm = find_program('nm')
|
||||
ranlib = find_program('ranlib')
|
||||
strip = find_program('strip')
|
||||
endif
|
||||
if host_os_family != 'windows'
|
||||
if host_os_family == 'darwin'
|
||||
readelf = ''
|
||||
otool = find_program('otool')
|
||||
libtool = find_program('libtool')
|
||||
else
|
||||
readelf = find_program('readelf')
|
||||
otool = ''
|
||||
libtool = ''
|
||||
endif
|
||||
else
|
||||
readelf = ''
|
||||
otool = ''
|
||||
libtool = ''
|
||||
endif
|
||||
if host_os_family == 'darwin'
|
||||
install_name_tool = find_program('install_name_tool')
|
||||
lipo = find_program('lipo')
|
||||
codesign = find_program('codesign')
|
||||
else
|
||||
install_name_tool = ''
|
||||
lipo = ''
|
||||
codesign = ''
|
||||
endif
|
||||
|
||||
have_local_backend = get_option('local_backend').allowed()
|
||||
have_fruity_backend = get_option('fruity_backend') \
|
||||
.disable_auto_if(not host_docks_mobile_devices) \
|
||||
.allowed()
|
||||
have_droidy_backend = get_option('droidy_backend') \
|
||||
.disable_auto_if(not host_docks_mobile_devices) \
|
||||
.allowed()
|
||||
have_socket_backend = get_option('socket_backend').allowed()
|
||||
have_barebone_backend = get_option('barebone_backend') \
|
||||
.disable_if(not quickjs_dep.found()) \
|
||||
.disable_auto_if(not host_docks_mobile_devices) \
|
||||
.allowed()
|
||||
compiler_backend_opt = get_option('compiler_backend') \
|
||||
.disable_auto_if(host_os == 'watchos')
|
||||
have_compiler_backend = false
|
||||
if compiler_backend_opt.allowed()
|
||||
go = find_program('go', native: true, required: false)
|
||||
if go.found()
|
||||
message('Detecting cgo availability')
|
||||
detect_output = run_command(
|
||||
[
|
||||
python,
|
||||
files('tools' / 'cgo' / 'detect.py'),
|
||||
go,
|
||||
host_os,
|
||||
host_abi,
|
||||
shlib_suffix,
|
||||
cc.get_id(),
|
||||
'>>>', cc.cmd_array(), '<<<',
|
||||
'>>>', ar, '<<<',
|
||||
'>>>', nm, '<<<',
|
||||
'>>>', ranlib, '<<<',
|
||||
],
|
||||
capture: true,
|
||||
check: true
|
||||
).stdout()
|
||||
lines = detect_output.split('\n')
|
||||
status = lines[0]
|
||||
if status == 'ok'
|
||||
have_compiler_backend = true
|
||||
tokens = lines[1].split(' ')
|
||||
go_mode = tokens[0]
|
||||
go_config = tokens[1]
|
||||
compiler_backend_static_compilation = go_mode == 'c-archive'
|
||||
if compiler_backend_static_compilation
|
||||
vala_flags += '--define=COMPILER_BACKEND_STATIC_COMPILATION'
|
||||
endif
|
||||
else
|
||||
error_message = lines[1]
|
||||
if compiler_backend_opt.enabled()
|
||||
error(error_message)
|
||||
else
|
||||
warning(f'Building without Compiler backend: @error_message@')
|
||||
endif
|
||||
endif
|
||||
elif compiler_backend_opt.enabled()
|
||||
error('Need Go >= 1.24 to build the Compiler backend powered by ESBuild and typescript-go')
|
||||
else
|
||||
warning('Building without Compiler backend: Go >= 1.24 not found')
|
||||
endif
|
||||
endif
|
||||
|
||||
build_gadget = get_option('gadget') \
|
||||
.disable_auto_if(meson.is_subproject()) \
|
||||
.allowed()
|
||||
|
||||
build_server = get_option('server') \
|
||||
.disable_if(not have_local_backend, error_message: 'frida-server requires the local backend to be included') \
|
||||
.disable_if(host_os == 'watchos', error_message: 'frida-server not yet supported on watchOS') \
|
||||
.disable_auto_if(meson.is_subproject()) \
|
||||
.allowed()
|
||||
|
||||
build_portal = get_option('portal') \
|
||||
.disable_if(host_os == 'watchos', error_message: 'frida-portal not yet supported on watchOS') \
|
||||
.disable_auto_if(meson.is_subproject()) \
|
||||
.allowed()
|
||||
|
||||
build_inject = get_option('inject') \
|
||||
.disable_if(not have_local_backend, error_message: 'frida-inject requires the local backend to be included') \
|
||||
.disable_if(host_os == 'watchos', error_message: 'frida-inject not yet supported on watchOS') \
|
||||
.disable_auto_if(meson.is_subproject()) \
|
||||
.allowed()
|
||||
|
||||
build_tests = get_option('tests') \
|
||||
.disable_if(host_os == 'watchos', error_message: 'tests not yet supported on watchOS') \
|
||||
.disable_auto_if(meson.is_subproject() or not meson.can_run_host_binaries()) \
|
||||
.allowed()
|
||||
|
||||
foreach b : [['local', have_local_backend],
|
||||
['fruity', have_fruity_backend],
|
||||
['droidy', have_droidy_backend],
|
||||
['socket', have_socket_backend],
|
||||
['barebone', have_barebone_backend],
|
||||
['compiler', have_compiler_backend]]
|
||||
if b[1]
|
||||
vala_flags += '--define=HAVE_@0@_BACKEND'.format(b[0].to_upper())
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if host_os_family == 'darwin' or host_os == 'android' or have_barebone_backend or have_compiler_backend
|
||||
node = find_program('node', version: '>=18.0.0', native: true, required: false)
|
||||
if not node.found()
|
||||
error('Need Node.js >= 18.0.0 to process JavaScript code at build time')
|
||||
endif
|
||||
npm = find_program('npm', native: true, required: false)
|
||||
if not npm.found()
|
||||
error('Need npm to process JavaScript code at build time')
|
||||
endif
|
||||
endif
|
||||
|
||||
gi_dep = dependency('gobject-introspection-1.0', required: false)
|
||||
if gi_dep.found()
|
||||
girdir = gi_dep.get_variable('girdir')
|
||||
else
|
||||
girdir = get_option('prefix') / get_option('datadir') / 'gir-1.0'
|
||||
endif
|
||||
|
||||
vapidir = get_option('prefix') / get_option('datadir') / 'vala' / 'vapi'
|
||||
|
||||
gum_vala_args = [
|
||||
'--pkg=frida-gum-1.0',
|
||||
'--vapidir=' + gum_dep.get_variable('frida_vapidir'),
|
||||
]
|
||||
gumjs_vala_args = ['--pkg=frida-gumjs-1.0', '--pkg=gio-2.0', gum_vala_args]
|
||||
gumjs_inspector_vala_args = ['--pkg=frida-gumjs-inspector-1.0', gum_vala_args]
|
||||
|
||||
have_v8 = gumjs_dep.get_variable('gumjs_v8') == 'enabled'
|
||||
if have_v8
|
||||
vala_flags += ['--define=HAVE_V8']
|
||||
endif
|
||||
|
||||
backend_deps_private = []
|
||||
backend_reqs_private = []
|
||||
backend_libs_private = []
|
||||
|
||||
openssl_options = [
|
||||
'cli=disabled',
|
||||
]
|
||||
if host_os_family == 'windows' and cc.get_argument_syntax() != 'msvc'
|
||||
openssl_options += 'asm=disabled'
|
||||
endif
|
||||
openssl_dep = dependency('openssl',
|
||||
required: have_fruity_backend or get_option('connectivity').enabled(),
|
||||
modules: cc.get_argument_syntax() == 'msvc' ? ['OpenSSL::SSL'] : [],
|
||||
default_options: openssl_options,
|
||||
)
|
||||
|
||||
if have_fruity_backend
|
||||
foreach dep : ['libnghttp2', 'libngtcp2', 'libngtcp2_crypto_quictls', 'libusb-1.0']
|
||||
backend_deps_private += dependency(dep)
|
||||
backend_reqs_private += dep
|
||||
endforeach
|
||||
|
||||
lwip_options = [
|
||||
'ipv4=disabled',
|
||||
'ipv6=enabled',
|
||||
'dns=disabled',
|
||||
'arp=disabled',
|
||||
'ethernet=enabled',
|
||||
'tcp_mss=4036',
|
||||
'tcp_snd_buf=65535',
|
||||
'tcp_wnd=65535',
|
||||
]
|
||||
if optimize_for_prod
|
||||
lwip_options += 'lwip_debug=disabled'
|
||||
else
|
||||
lwip_options += 'lwip_debug=enabled'
|
||||
endif
|
||||
backend_deps_private += dependency('lwip', default_options: lwip_options)
|
||||
backend_reqs_private += 'lwip'
|
||||
endif
|
||||
|
||||
if quickjs_dep.found()
|
||||
backend_deps_private += quickjs_dep
|
||||
backend_reqs_private += 'quickjs'
|
||||
endif
|
||||
|
||||
if host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <pty.h>')
|
||||
@@ -287,34 +579,58 @@ if host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <p
|
||||
endif
|
||||
|
||||
if host_os == 'android'
|
||||
termux_elf_cleaner = find_program('termux-elf-cleaner', native: true)
|
||||
libselinux_dep = dependency('libselinux', version: '>=3.0')
|
||||
libsepol_dep = dependency('libsepol', version: '>=3.0')
|
||||
backend_deps_private += [libselinux_dep, libsepol_dep]
|
||||
backend_reqs_private += ['libselinux', 'libsepol']
|
||||
else
|
||||
termux_elf_cleaner = []
|
||||
endif
|
||||
|
||||
tls_provider_dep = dependency('gioopenssl', required: get_option('connectivity'))
|
||||
tls_provider_dep = dependency('gioopenssl', required: get_option('connectivity'), default_options: [
|
||||
'gnutls=disabled',
|
||||
'openssl=enabled',
|
||||
'libproxy=disabled',
|
||||
'gnome_proxy=disabled',
|
||||
'tests=false',
|
||||
])
|
||||
tls_provider_vala_args = []
|
||||
if tls_provider_dep.found()
|
||||
tls_provider_vala_args += [
|
||||
'--pkg=gioopenssl',
|
||||
'--vapidir=' + tls_provider_dep.get_variable('vapidir'),
|
||||
]
|
||||
cdata.set('HAVE_GIOOPENSSL', 1)
|
||||
vala_flags += ['--define=HAVE_GIOOPENSSL']
|
||||
backend_deps_private += tls_provider_dep
|
||||
backend_reqs_private += 'gioopenssl'
|
||||
endif
|
||||
|
||||
nice_dep = dependency('nice', required: get_option('connectivity'))
|
||||
nice_dep = dependency('nice', required: get_option('connectivity'), default_options: [
|
||||
'gupnp=disabled',
|
||||
'gstreamer=disabled',
|
||||
'crypto-library=openssl',
|
||||
'examples=disabled',
|
||||
'tests=disabled',
|
||||
'introspection=disabled',
|
||||
])
|
||||
if nice_dep.found()
|
||||
openssl_dep = dependency('openssl')
|
||||
usrsctp_dep = dependency('usrsctp')
|
||||
usrsctp_dep = dependency('usrsctp', default_options: [
|
||||
'sctp_inet=false',
|
||||
'sctp_inet6=false',
|
||||
'sctp_build_programs=false',
|
||||
])
|
||||
|
||||
cdata.set('HAVE_NICE', 1)
|
||||
vala_flags += ['--define=HAVE_NICE']
|
||||
backend_deps_private += [nice_dep, openssl_dep, usrsctp_dep]
|
||||
backend_reqs_private += ['nice', 'openssl', 'usrsctp']
|
||||
|
||||
if cc.has_member('struct sockaddr_conn', 'sconn_len',
|
||||
dependencies: [usrsctp_dep],
|
||||
prefix: '#include <usrsctp.h>')
|
||||
if host_os_family in ['darwin', 'freebsd', 'qnx']
|
||||
cdata.set('HAVE_SCONN_LEN', 1)
|
||||
endif
|
||||
else
|
||||
openssl_dep = []
|
||||
usrsctp_dep = []
|
||||
endif
|
||||
|
||||
@@ -331,44 +647,65 @@ if host_os in ['ios', 'tvos']
|
||||
backend_libs_private += ['-Wl,-framework,CoreGraphics', '-Wl,-framework,UIKit']
|
||||
endif
|
||||
|
||||
ar = find_program('ar')
|
||||
nm = find_program('nm')
|
||||
if host_os_family != 'windows'
|
||||
if get_option('devkits').length() != 0
|
||||
if get_option('default_library') != 'static'
|
||||
error('Devkits can only be generated from static libraries')
|
||||
endif
|
||||
mkdevkit = [python, releng / 'mkdevkit.py']
|
||||
uninstalled_dir = meson.global_build_root() / 'meson-uninstalled'
|
||||
devkit_options = [
|
||||
'--cc', '>>>', cc.cmd_array(), '<<<',
|
||||
'--c-args', '>>>', get_option('c_args'), '<<<',
|
||||
'--pkg-config', '>>>', find_program('pkg-config'), '<<<',
|
||||
'--pkg-config-path', '>>>', uninstalled_dir, get_option('pkg_config_path'), '<<<',
|
||||
]
|
||||
if host_toolchain == 'microsoft'
|
||||
static_lib_prefix = ''
|
||||
static_lib_suffix = '.lib'
|
||||
devkit_options += ['--lib', '>>>', lib, '<<<']
|
||||
else
|
||||
static_lib_prefix = 'lib'
|
||||
static_lib_suffix = '.a'
|
||||
devkit_options += [
|
||||
'--ar', '>>>', ar, '<<<',
|
||||
'--nm', '>>>', nm, '<<<',
|
||||
]
|
||||
objcopy = find_program('objcopy', required: false)
|
||||
if objcopy.found()
|
||||
devkit_options += ['--objcopy', '>>>', objcopy, '<<<']
|
||||
endif
|
||||
endif
|
||||
if host_os_family == 'darwin'
|
||||
readelf = ''
|
||||
otool = find_program('otool')
|
||||
libtool = find_program('libtool')
|
||||
else
|
||||
readelf = find_program('readelf')
|
||||
otool = ''
|
||||
libtool = ''
|
||||
devkit_options += ['--libtool', '>>>', libtool, '<<<']
|
||||
endif
|
||||
else
|
||||
readelf = ''
|
||||
otool = ''
|
||||
libtool = ''
|
||||
endif
|
||||
strip = find_program('strip')
|
||||
if host_os_family == 'darwin'
|
||||
install_name_tool = find_program('install_name_tool')
|
||||
lipo = find_program('lipo')
|
||||
codesign = find_program('codesign')
|
||||
else
|
||||
install_name_tool = ''
|
||||
lipo = ''
|
||||
codesign = ''
|
||||
endif
|
||||
|
||||
modulate = files('tools/modulate.py')
|
||||
post_process_module = [
|
||||
files('tools/post-process-module.sh'),
|
||||
modulate = [
|
||||
python,
|
||||
files('tools' / 'modulate.py'),
|
||||
'--endian', host_machine.endian(),
|
||||
'--nm', '>>>', nm, '<<<',
|
||||
'--readelf', '>>>', readelf, '<<<',
|
||||
'--otool', '>>>', otool, '<<<',
|
||||
'--output', '@OUTPUT@',
|
||||
'@INPUT@',
|
||||
]
|
||||
post_process = [
|
||||
python,
|
||||
files('tools' / 'post-process.py'),
|
||||
host_os,
|
||||
host_abi,
|
||||
'>>>', strip, '<<<',
|
||||
get_option('strip').to_string(),
|
||||
install_name_tool,
|
||||
codesign,
|
||||
'>>>', install_name_tool, '<<<',
|
||||
'>>>', codesign, '<<<',
|
||||
'>>>', termux_elf_cleaner, '<<<',
|
||||
'@OUTPUT@',
|
||||
'@INPUT0@',
|
||||
]
|
||||
|
||||
compile_js_agent = files('tools' / 'compile-js-agent.py')
|
||||
|
||||
mapper_opt = get_option('mapper')
|
||||
if mapper_opt.auto()
|
||||
have_mapper = host_os_family == 'darwin'
|
||||
@@ -384,48 +721,84 @@ configure_file(
|
||||
configuration: cdata)
|
||||
|
||||
add_project_arguments(
|
||||
'-include', 'config.h',
|
||||
(cc.get_argument_syntax() == 'msvc') ? '/FI' : '-include', meson.current_build_dir() / 'config.h',
|
||||
'-DG_LOG_DOMAIN="Frida"',
|
||||
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56',
|
||||
'-DG_DISABLE_DEPRECATED',
|
||||
language: c_languages)
|
||||
|
||||
if host_os_family == 'linux'
|
||||
add_project_arguments('-D_GNU_SOURCE=1', language: c_languages)
|
||||
# Our Vala compiler emits warnings pragmas for GCC >= 5, so for older versions we'll need to
|
||||
# suppress them through GCC's command-line options. It would be better to only do this for
|
||||
# Vala-generated sources, but this will have to do for now.
|
||||
if cc.get_id() == 'gcc' and cc.compiles('#if __GNUC__ >= 5\n#error NOTNEEDED\n#endif')
|
||||
add_project_arguments('-w', language: 'c')
|
||||
endif
|
||||
|
||||
vapidir = meson.current_source_dir() / 'vapi'
|
||||
vala_flags += [
|
||||
'--vapidir=' + meson.current_source_dir() / 'vapi',
|
||||
'--vapidir=' + vapidir,
|
||||
'--pkg', 'config',
|
||||
]
|
||||
|
||||
vala_flags += ['--define=' + host_os_family.to_upper()]
|
||||
vala_flags += '--define=' + host_os_family.to_upper()
|
||||
if host_os != host_os_family
|
||||
vala_flags += ['--define=' + host_os.to_upper()]
|
||||
vala_flags += '--define=' + host_os.to_upper()
|
||||
endif
|
||||
vala_flags += ['--define=' + host_arch.to_upper()]
|
||||
vala_flags += '--define=' + host_arch.to_upper()
|
||||
if host_abi != host_arch
|
||||
vala_flags += ['--define=' + host_abi.to_upper()]
|
||||
vala_flags += '--define=' + host_abi.to_upper()
|
||||
endif
|
||||
if get_option('agent_legacy') != ''
|
||||
vala_flags += ['--define=CROSS_ARCH']
|
||||
endif
|
||||
add_project_arguments(vala_flags, language: ['vala'])
|
||||
vala_flags += '--define=' + host_machine.endian().to_upper() + '_ENDIAN'
|
||||
add_project_arguments(vala_flags, language: 'vala')
|
||||
add_project_arguments('-I' + vapidir, language: 'c')
|
||||
|
||||
native_vala_flags = [
|
||||
'--vapidir=' + meson.current_source_dir() / 'vapi',
|
||||
]
|
||||
add_project_arguments(native_vala_flags, language: ['vala'], native: true)
|
||||
add_project_arguments(native_vala_flags, language: 'vala', native: true)
|
||||
add_project_arguments('-I' + vapidir, language: 'c', native: true)
|
||||
|
||||
subdir('compat')
|
||||
subdir('tools')
|
||||
subdir('lib')
|
||||
subdir('src')
|
||||
if host_os != 'watchos'
|
||||
if build_server
|
||||
subdir('server')
|
||||
subdir('portal')
|
||||
subdir('inject')
|
||||
|
||||
if get_option('tests')
|
||||
subdir('tests')
|
||||
endif
|
||||
endif
|
||||
if build_portal
|
||||
subdir('portal')
|
||||
endif
|
||||
if build_inject
|
||||
subdir('inject')
|
||||
endif
|
||||
if build_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
summary(
|
||||
{
|
||||
'local': have_local_backend,
|
||||
'fruity': have_fruity_backend,
|
||||
'droidy': have_droidy_backend,
|
||||
'socket': have_socket_backend,
|
||||
'barebone': have_barebone_backend,
|
||||
'compiler': have_compiler_backend,
|
||||
},
|
||||
section: 'Backends',
|
||||
bool_yn: true,
|
||||
)
|
||||
summary(
|
||||
{
|
||||
'compat': compat_summary,
|
||||
'assets': get_option('assets'),
|
||||
'mapper': have_mapper,
|
||||
'connectivity': tls_provider_dep.found(),
|
||||
'gadget': build_gadget,
|
||||
'server': build_server,
|
||||
'portal': build_portal,
|
||||
'inject': build_inject,
|
||||
'tests': build_tests,
|
||||
},
|
||||
section: 'Features',
|
||||
bool_yn: true,
|
||||
)
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
option('frida_version',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Frida version, such as 16.2.2 or 16.2.2-dev.27',
|
||||
)
|
||||
|
||||
option('local_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include backend for the local system',
|
||||
)
|
||||
|
||||
option('fruity_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include the Fruity backend',
|
||||
)
|
||||
|
||||
option('droidy_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include the Droidy backend',
|
||||
)
|
||||
|
||||
option('socket_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include the Socket backend',
|
||||
)
|
||||
|
||||
option('barebone_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include the Barebone backend',
|
||||
)
|
||||
|
||||
option('compiler_backend',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Include frida-compile backend powered by ESBuild and typescript-go',
|
||||
)
|
||||
|
||||
option('assets',
|
||||
type: 'combo',
|
||||
choices: ['embedded', 'installed'],
|
||||
value: 'embedded',
|
||||
description: 'Whether assets such as frida-agent should be embedded vs installed and loaded at runtime'
|
||||
)
|
||||
|
||||
option('asset_path_template',
|
||||
type: 'string',
|
||||
description: 'Override the default installed asset path template'
|
||||
)
|
||||
|
||||
option('compat',
|
||||
type: 'array',
|
||||
choices: ['auto', 'disabled', 'native', 'emulated'],
|
||||
value: ['auto'],
|
||||
description: 'Support for targets with a different architecture',
|
||||
)
|
||||
|
||||
option('helper_modern',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt frida-helper to embed for supporting modern targets'
|
||||
)
|
||||
|
||||
option('helper_legacy',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt frida-helper to embed for supporting legacy targets'
|
||||
)
|
||||
|
||||
option('helper_emulated_modern',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt frida-helper to embed for supporting modern emulated targets'
|
||||
)
|
||||
|
||||
option('helper_emulated_legacy',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt frida-helper to embed for supporting legacy emulated targets'
|
||||
)
|
||||
|
||||
option('agent_modern',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt agent to embed for use on modern targets'
|
||||
)
|
||||
|
||||
option('agent_legacy',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt agent to embed for use on legacy targets'
|
||||
)
|
||||
|
||||
option('agent_emulated_modern',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt agent to embed for use on modern emulated targets'
|
||||
)
|
||||
|
||||
option('agent_emulated_legacy',
|
||||
type: 'string',
|
||||
value: 'auto',
|
||||
description: 'Prebuilt agent to embed for use on legacy emulated targets'
|
||||
)
|
||||
|
||||
option('gadget',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Build frida-gadget',
|
||||
)
|
||||
|
||||
option('server',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Build frida-server',
|
||||
)
|
||||
|
||||
option('portal',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Build frida-portal',
|
||||
)
|
||||
|
||||
option('inject',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Build frida-inject',
|
||||
)
|
||||
|
||||
option('connectivity',
|
||||
type: 'feature',
|
||||
value: 'enabled',
|
||||
description: 'Internet connectivity features (TLS and ICE support)'
|
||||
)
|
||||
|
||||
option('mapper',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Use our own out-of-process dynamic linker for injection on i/macOS'
|
||||
)
|
||||
|
||||
option('devkits',
|
||||
type: 'array',
|
||||
choices: ['core'],
|
||||
value: [],
|
||||
description: 'Devkits to build'
|
||||
)
|
||||
|
||||
option('tests',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Build tests'
|
||||
)
|
||||
@@ -1,84 +0,0 @@
|
||||
option('assets',
|
||||
type: 'combo',
|
||||
choices: ['embedded', 'installed'],
|
||||
value: 'embedded',
|
||||
description: 'Whether assets such as frida-agent should be embedded vs installed and loaded at runtime'
|
||||
)
|
||||
|
||||
option('asset_path_template',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Override the default installed asset path template'
|
||||
)
|
||||
|
||||
option('helper_modern',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt frida-helper to embed for use on modern systems'
|
||||
)
|
||||
|
||||
option('helper_legacy',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt frida-helper to embed for use on legacy systems'
|
||||
)
|
||||
|
||||
option('agent_modern',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt agent to embed for use on modern targets'
|
||||
)
|
||||
|
||||
option('agent_legacy',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt agent to embed for use on legacy targets'
|
||||
)
|
||||
|
||||
option('agent_emulated_modern',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt agent to embed for use on modern emulated targets'
|
||||
)
|
||||
|
||||
option('agent_emulated_legacy',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Prebuilt agent to embed for use on legacy emulated targets'
|
||||
)
|
||||
|
||||
option('agent_dbghelp_prefix',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Location of DbgHelp binaries to embed alongside agent (Windows only)'
|
||||
)
|
||||
|
||||
option('agent_symsrv_prefix',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'Location of SymSrv binaries to embed alongside agent (Windows only)'
|
||||
)
|
||||
|
||||
option('connectivity',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Internet connectivity features (TLS and ICE support)'
|
||||
)
|
||||
|
||||
option('mapper',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Use our own out-of-process dynamic linker for injection on i/macOS'
|
||||
)
|
||||
|
||||
option('compiler_snapshot',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Speed up compiler startup by using a snapshot'
|
||||
)
|
||||
|
||||
option('tests',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Build tests'
|
||||
)
|
||||
+5
-16
@@ -6,11 +6,11 @@ extra_link_args = []
|
||||
extra_link_depends = []
|
||||
if host_os_family == 'darwin'
|
||||
symlist = 'frida-portal.symbols'
|
||||
extra_link_args += ['-Wl,-exported_symbols_list,' + join_paths(meson.current_source_dir(), symlist)]
|
||||
extra_link_args += ['-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist]
|
||||
extra_link_depends += [symlist]
|
||||
elif host_os_family != 'windows'
|
||||
symscript = 'frida-portal.version'
|
||||
extra_link_args += ['-Wl,--version-script,' + join_paths(meson.current_source_dir(), symscript)]
|
||||
extra_link_args += ['-Wl,--version-script,' + meson.current_source_dir() / symscript]
|
||||
extra_link_depends += [symscript]
|
||||
endif
|
||||
|
||||
@@ -20,27 +20,16 @@ if tls_provider_dep.found()
|
||||
endif
|
||||
|
||||
raw_portal = executable('frida-portal-raw', portal_sources,
|
||||
vala_args: ['--pkg=posix'],
|
||||
vala_args: [core_vala_args, tls_provider_vala_args, '--pkg=posix'],
|
||||
link_args: extra_link_args,
|
||||
link_depends: extra_link_depends,
|
||||
dependencies: [core_dep] + extra_deps,
|
||||
)
|
||||
|
||||
custom_target('frida-portal',
|
||||
input: [
|
||||
raw_portal,
|
||||
'frida-portal.xcent',
|
||||
],
|
||||
input: [raw_portal, 'frida-portal.xcent'],
|
||||
output: 'frida-portal' + exe_suffix,
|
||||
command: [
|
||||
files('post-process.sh'),
|
||||
'@INPUT@',
|
||||
'@OUTPUT@',
|
||||
host_os,
|
||||
'>>>', strip, '<<<',
|
||||
get_option('strip').to_string(),
|
||||
codesign,
|
||||
],
|
||||
command: post_process + ['executable', 're.frida.Portal', '@INPUT1@'],
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
)
|
||||
+1
-1
@@ -142,7 +142,7 @@ namespace Frida.Portal {
|
||||
return application.run ();
|
||||
}
|
||||
|
||||
private class Application : Object {
|
||||
private sealed class Application : Object {
|
||||
public signal void ready (bool success);
|
||||
|
||||
public PortalService service {
|
||||
|
||||
Loaded 100 of 429 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user