Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Push Docker Image to GHCR

on:
workflow_dispatch:
push:
branches: [master]

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository }}:latest .

- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository }}:latest
27 changes: 27 additions & 0 deletions Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Docker usage instructions

### Setup

Container images are available on [the github container registry](https://github.com/orgs/malus-security/packages/container/package/xpwn) (and soon on the gitlab container registry).

You can also build your own image locally:

```sh
xpwn $ docker build -t <container_name> .
```

### Usage

The docker image is designed to run `xpwn` in the context of [iExtractor](https://github.com/malus-security/iextractor) and has the following default usage:

```sh
docker run -v <in_file>:/in -v <out_file>:/out -e IV=<iv> -e KEY=<key> -t <container_name>

# runs this command: ./xpwntool /in /out -iv $IV -k $KEY -decrypt
```

However, it is possible to override the default flags:

```sh
docker run -t <container_name> --help
``
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:latest

RUN set -xe; \
apt-get -yqq update; \
apt-get install -y cmake build-essential libz-dev libssl-dev libbz2-dev libpng-dev libusb-dev \
;

COPY . /xpwn
WORKDIR /xpwn

RUN mkdir builddir
WORKDIR /xpwn/builddir

RUN cmake ..
RUN make

WORKDIR /

CMD [ "sh", "-c", "/xpwn/builddir/ipsw-patch/xpwntool /in /out -iv ${IV} -k ${KEY} -decrypt" ]

ENTRYPOINT [ "/xpwn/builddir/ipsw-patch/xpwntool" ]
1 change: 0 additions & 1 deletion dfu-util/dfu.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ char* dfu_state_to_string( int state );

const char *dfu_status_to_string(int status);

int debug;
#endif
2 changes: 2 additions & 0 deletions dfu-util/sam7dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#define O_BINARY 0
#endif

extern int debug;

/*
* * CRC32 code ripped off (and adapted) from the zlib-1.1.3 distribution by Jean-loup Gailly and Mark Adler.
* *
Expand Down
2 changes: 1 addition & 1 deletion ipsw-patch/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <windows.h>
#endif

char endianness;
extern char endianness;

static char* tmpFile = NULL;

Expand Down
2 changes: 1 addition & 1 deletion xpwn/src/xpwn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using namespace ibooter;
using namespace std;

char endianness;
extern char endianness;

void TestByteOrder()
{
Expand Down