Comments (7)
Thanks for reporting.
It's actually a bit confusing, but we just have to think about how the upstream itself works:
- you cannot use
john-local.conf
(at least I haven't found a way to use it sincejohn
doesn't have a built-in variable that points to your runtimePrivate home
); - so, you must have a full
john.conf
in the snap (environment) proper HOME folder. It is$HOME/snap/john-the-ripper
; - Probably would be nice if upstream
john
has a variable that points to thePrivate home
.
So let's see how it works using an example:
DO NOT REMOVE YOUR john.pot
IF IT MATTERS TO YOU. Save it first, at least.
- I'm followiing the edge snap channel. Works the same way if you are using stable.
$ cd ~
$ john --list=build-info
Version: 1.9.0-jumbo-1+bleeding-3553509ce9 2023-05-08 13:39:36 +0200
Build: linux-gnu 64-bit x86_64 AVX2 AC OMP OPENCL
SIMD: AVX2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
Deploy: sandboxed as a Snap app
System-wide exec: /snap/john-the-ripper/current/run
System-wide home: /snap/john-the-ripper/current/run
Private home: ~/.john
[...]
$JOHN is /snap/john-the-ripper/current/run/
[...]
# Create some sample hashes
john --format=sha512crypt -list=format-tests | cut -f3 > ~/alltests.in
- Crack it using the "regular" packaged
john
$ rm -f snap/john-the-ripper/current/.john/*.pot; john ~/alltests.in --max-run=10 --mask
Warning: detected hash type "sha512crypt", but the string is also recognized as "sha512crypt-opencl"
Use the "--format=sha512crypt-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 6 password hashes with 4 different salts (1.5x same-salt boost) (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Will run 8 OpenMP threads
Using default mask: ?1?2?2?2?2?2?2?3?3?3?3?d?d?d?d ## <===== HERE ************************************
Press 'q' or Ctrl-C to abort, 'h' for help, almost any other key for status
0g 0:00:00:00 (2) 0g/s 0p/s 0c/s 0C/s
(?)
1g 0:00:00:02 2.49% (3) (ETA: 12:08:28) 0g/s 728.8p/s 2550c/s 4008C/s e5..5ya
1g 0:00:00:10 8.70% (3) (ETA: 12:09:01) 0g/s 702.1p/s 2306c/s 3710C/s Eli..lzi
Use the "--show" option to display all of the cracked passwords reliably
Session stopped (max run-time reached)
- Use your personal (edited)
john.conf
(compare the mask).
$ cp /snap/john-the-ripper/current/run/john.conf snap/john-the-ripper/current/.john/john.conf
$ sed -i 's/DefaultMask = ?1?2?2?2?2?2?2?3?3?3?3?d?d?d?d/DefaultMask = Hello?awor?l?l?a/g' snap/john-the-ripper/current/.john/john.conf
$ rm -f snap/john-the-ripper/current/.john/*.pot; john ~/alltests.in --max-run=10 --mask
Warning: detected hash type "sha512crypt", but the string is also recognized as "sha512crypt-opencl"
Use the "--format=sha512crypt-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 6 password hashes with 4 different salts (1.5x same-salt boost) (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Will run 8 OpenMP threads
Using default mask: Hello?awor?l?l?a ## <===== HERE ************************************
Press 'q' or Ctrl-C to abort, 'h' for help, almost any other key for status
0g 0:00:00:00 (10) 0g/s 0p/s 0c/s 0C/s
(?)
1g 0:00:00:02 3.09% (11) (ETA: 12:09:26) 0g/s 726.2p/s 2541c/s 3994C/s Hello.worg..Hello7woria
1g 0:00:00:10 10.82% (11) (ETA: 12:09:54) 0g/s 700.7p/s 2302c/s 3703C/s HelloIworje..Hello9worni
Use the "--show" option to display all of the cracked passwords reliably
Session stopped (max run-time reached)
from john-packages.
Lets think about the issue as documentation. I don't have a better place to add this note for now.
from john-packages.
Actually, the question and the answer apply the same way to, for example, the Docker image. You will need add a:
-v "$(pwd)":/home/JtR
To connect the 'host' file system to the running container (linking the host current folder to /home/JtR
).
Then create a suitable $(pwd)/.john/john.conf
file in your 'host'.
Hey, why is john.conf
inside the .john
folder? I don't care, anywhere upstream thinks it is valid is ok with me.
from john-packages.
Moved to the wiki: Configuring packages via john.conf
from john-packages.
Here are my own findings following yours for an approach to solve the problem:
According your approach I got command not found
when calling $ john --list=build-info
. So I discovered two installed versions of John on my Debian system. To be shure to use the right - Snap installed - version of John I changed into the Snap directory of John with
$ cd /snap/john-the-ripper/current/run
and run it with
$ ./john --list=build-info
That worked. This version was asking for missing config and log files in /home/<user>/.john/
. Following this I put an altered copy of john.conf into this directory. When starting John again via
$ ./john
it uses the config-file put in my user directory as described above throwing out.
from john-packages.
I'm not aware of problems in Debian. Anyway, you can use the name of the snap: john-the-ripper
(the john
command is an alias). It should work, otherwise you can report a bug on snapcraft itself.
./john --list=build-info
If you run it this way, you're running without confinement/sandboxing. It's not bad, but people reading this should keep that in mind.
$ which john
/snap/bin/john
$ which john-the-ripper
/snap/bin/john-the-ripper
from john-packages.
from john-packages.
Related Issues (20)
- Proposal: improve release listing
- Remove the 'tag a Docker image' action
- Stop building SSE2 binaries for Docker, snap, and flatpak packages
- Add arm64 Docker image (with NVIDIA GPU support)
- Attract contributors (at least one more)
- Migrate our Intel OpenCL CPU CI tests to the new driver
- Add "verification" to Flathub
- Maybe stop using 7z HOT 8
- Document how the Bitrise file differs from what was committed
- Refactor, use pinned dependencies and more auditability HOT 3
- Rename requirements.txt to requirements.hash
- compress-raw-lzma-perl No longer exists HOT 4
- Attract the unknown contributor HOT 1
- Use the same `tag` scheme in Docker as GitHub
- Document the process of creating a release
- Enable tests for formats that have been fixed
- Start using an issue form
- [BUG]: get ready for a 1.0 release HOT 1
- Mute linter and split on spaces HOT 1
- Add support for NVIDIA GPUs in Docker Image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from john-packages.