Cyber stuff

Some random documents related to CTFs and cyber security

10 November 2020

Installing ciphey in termux

A quick guide for how to install ciphey on termux

Build python3.8

On a machine with docker installed

  1. Clone the packages repo
    git clone https://github.com/termux/termux-packages
    
  2. Change directory to repository
    cd termux-packages
    
  3. Checkout python version 3.8
    git checkout a1765e4908334748595d33ce6a96896090508044 -- ./packages/python
    
  4. Build the python package
    # This takes a long time
    ./scripts/run-docker.sh ./build-package.sh python
    # For a faster build you can skip building dependencies 
    # ./scripts/run-docker.sh ./build-package.sh -I python
    
  5. Move the built package to your termux install
    • If build was successful deb file should be at ./debs/python_3.8.6_aarch64.deb

Build/install ciphey

Inside your termux install

  1. Install build dependencies
    pkg install boost cmake build-essential swig
    
  2. Install python3.8
    pkg install ./python_3.8.6_aarch64.deb
    
  3. Install poetry
    python3 -m pip install poetry
    
  4. Clone cipheycore
    git clone https://github.com/Ciphey/Cipheycore
    cd CipheyCore
    
  5. Checkout latest version
    git checkout v0.3.2 # You can use "git tag" to list all version tags
    
  6. Build code (taken from ciphey docs)
    rm -rf build && mkdir build && cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DCIPHEY_CORE_TEST=OFF
    cmake --build . -t ciphey_core
    
  7. Build cipheycore whl
    cmake --build . -t ciphey_core_py --config Release
    poetry build
    
  8. Install ciphey core
    python3 -m pip install -U ./dist/cipheycore-0.3.2-cp38-cp38-linux_aarch64.whl
    
  9. Install ciphey
    python3 -m pip install ciphey
    
tags: guides