Skip to content

Commit

Permalink
add readme, license and actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaDw committed May 4, 2023
1 parent bf26d89 commit 7101057
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build_and_release

on:
push:
tags:
- "v*.*.*"
env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: build
run: cargo build --release
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/pk-crypt
target/release/pk-crypt.exe
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 KaDw

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# pk-crypt

## Introduction

CLI tool to decrypt and encrypt `.pk` files that are part of configuration files for KalOnline game.

## Usage

`pk-crypt [OPTIONS] <MODE>`

### Options

* -p, --password <PASSWORD> - .pk password [default: `EV)O8@BL$3O2E`]
* -x, --xor <XOR> - Xor decrypt/encrypt key (decimal), range of this value is dependent on DECRYPT/ENCRYPT lookup tables [default: `47`]
* -f, --file <FILE> - File to be decrypted/encrypted. Files will be decrypted to {filename}_decrypted. The same folder is used as input in encrypt mode [default: `config.pk`]
* -h, --help - Print help (see a summary with '-h')
* -V, --version - Print version

### Modes

* decrypt
* encrypt

## Example usage

### Decrypt

`pk-cypt.exe decrypt --file config.pk --password abcd1234 --xor 45`

### Encrypt

`pk-cypt.exe encrypt --file config.pk --password abcd1234 --xor 45`

0 comments on commit 7101057

Please sign in to comment.