Giter Site home page Giter Site logo

Comments (4)

saltydk avatar saltydk commented on June 16, 2024 1

If you want to script it just set the password by generating the login fields in the config.

from qbittorrent-nox-static.

saltydk avatar saltydk commented on June 16, 2024 1

Some proof of concept ways of generating the password hash:

#!/bin/bash

# Check if a password is provided
if [ "$#" -ne 1 ]; then
    echo "Usage: $0 <password>"
    exit 1
fi

# Parameters
PLAIN_PASSWD="$1"
ITERATIONS=100000
SALT_SIZE=16
KEY_LEN=64  # Length of the hash output in bytes (512 bits for SHA-512)

# Generate a random salt
SALT=$(openssl rand -hex $SALT_SIZE)

# Use OpenSSL KDF command for PBKDF2 hashing
HASH=$(openssl kdf -keylen $KEY_LEN -kdfopt digest:SHA512 -kdfopt pass:"$PLAIN_PASSWD" \
        -kdfopt salt:"$SALT" -kdfopt iter:$ITERATIONS PBKDF2 | tr -d '\n')

# Encode the salt and hash in Base64
SALT_BASE64=$(echo -n "$SALT" | xxd -r -p | base64 | tr -d '\n')
HASH_BASE64=$(echo -n "$HASH" | xxd -r -p | base64 | tr -d '\n')

# Output the formatted result
echo "@ByteArray(${SALT_BASE64}:${HASH_BASE64})"

Or with a light binary such as my placeholder repo here https://github.com/saltydk/qbt_pw_gen

from qbittorrent-nox-static.

nephaste avatar nephaste commented on June 16, 2024

thanks will check for this solution, may be source will be fixed in 4.6.2

from qbittorrent-nox-static.

userdocs avatar userdocs commented on June 16, 2024

If they patch it I can apply the patch and build a revision or they might drop a new version at the same time specifically for this fix.

Otherwise this is something that can be scripted around for deployment and is not something I would try to address here.

Backporting some patches is something I consider acceptable but I'm not deploying containers or anything here, just the binary.

@saltydk has provided a sensible approach to handling this deployment issue, thanks for that.

from qbittorrent-nox-static.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.