How to Recover PDF Passwords with pdfcrack and NVIDIA-Accelerated Hashcat

Forgotten the password to an old PDF? You can try recovering it locally on Linux with pdfcrack.

This guide covers recovery of the password needed to open a PDF. Use it on your own files or files you have permission to recover.

 

IMPORTANT: pdfcrack runs on the CPU and has no built-in CUDA or NVIDIA GPU support. For NVIDIA acceleration, use Hashcat instead.

Start with a small password dictionary

A dictionary is a text file containing one password candidate per line. Start with a short list of passwords you remember using, then try common-password lists. This keeps the first attempt quick and helps check that the setup works before running a larger job.

Download the small SecLists file on Ubuntu:

wget -O common-passwords.txt 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10k-most-common.txt'

You can also make a shorter first pass:

head -n 1000 common-passwords.txt > small.txt

This takes the first 1,000 lines. It does not guarantee that they are the best candidates. Extract compressed dictionaries before using them. A larger dictionary takes longer and still cannot recover a password that is absent from the list.

Recover a PDF password with pdfcrack

Install pdfcrack on Ubuntu:

sudo apt update
sudo apt install pdfcrack wget

Replace locked.pdf with your PDF filename:

pdfcrack -f locked.pdf -w small.txt

The -f option selects the PDF and -w selects the dictionary. User-password recovery is the default. If the first list fails, repeat with common-passwords.txt. See the pdfcrack manual for other options.

The project documents support for standard security-handler revisions 2, 3 and 4. Unsupported encryption requires another tool. Installing NVIDIA drivers will not add GPU support to pdfcrack.

Use Hashcat for NVIDIA acceleration

Install Hashcat and the supporting tools:

sudo apt install hashcat git python3
nvidia-smi
hashcat -I

You need a working NVIDIA driver and a compatible CUDA installation. The Hashcat requirements page lists the NVIDIA CUDA Toolkit requirement. Confirm that hashcat -I detects your NVIDIA GPU before continuing. A working nvidia-smi alone does not confirm that Hashcat can use it.

Hashcat needs an extracted password-verification record, rather than the PDF itself. The third-party pdf2hashcat script can prepare it locally:

git clone https://github.com/sighook/pdf2hashcat.git
python3 pdf2hashcat/pdf2hashcat.py locked.pdf > locked.hash
hashcat --identify locked.hash

Select the matching PDF mode using the identification output and Hashcat’s example hashes. The encryption settings determine the mode. The PDF filename or version alone is insufficient.

For example, only if mode 10500 matches your extracted record:

hashcat -m 10500 -a 0 locked.hash common-passwords.txt
hashcat -m 10500 locked.hash --show

Here, -a 0 selects a dictionary attack, while --show displays recovered results. Check the startup output to confirm that the NVIDIA device is being used. Mode 10500 is not suitable for every PDF.

Exhausted means the selected candidates were tried without a match. It does not mean the PDF has no password. GPU acceleration can increase guessing speed, but recovery time depends on the encryption and password. A long random password may remain impractical to recover.

Semi-automatic bash script for triggering NVIDIA GPU fan in Linux

https://gist.github.com/mypapit/01770a1fa47826db1f50caf45f6a9035.js

Hello everybody. I’m sharing a handy script I use to semi-automatically check my GPU temperature and turn on the fan if things get a bit too warm.

I run this on my dedicated SoHo PC server, which hosts a modest LLM and a Minecraft server (yes, both at the same time).

Feel free to drop any suggestions or ideas in the comments. I’d love to hear how you’d improve it!

p/s: I’ve used GWE and CoolerControl, but it doesn’t fit my use case.

Install Tensorflow with RTX 50 series GPU acceleration with Python wheel for Ubuntu 24.04 (and Windows WSL2)

It seems that the Tensorflow acceleration is broken with the latest RTX50 series GPU, especially with the most cost effective RTX5060Ti 16GB card.

This is a guide to install Tensorflow with RTX50 (Blackwell) card GPU acceleration with the python wheel.

First you need to download this python wheel. It is compiled for Ubuntu 24.04 or WSL2 with Ubuntu 24.04.

https://github.com/mypapit/tensorflowRTX50/releases

Then you may need to create a python virtual environment for the wheel.

sudo apt install python3-pip
sudo apt install python3-venv

# replace tensorflow220 with your preferred env name
python3 -m venv tensorflow220

Then you need to activate the environment.

source tensorflow220/bin/activate

Then you may install the tensorflow wheel. To make it easier, you can also install it alongside other requirements.

pip install tensorflow-2.20.0dev0+selfbuild-cp312-cp312-linux_x86_64.whl seaborn pandas matplotlib opencv-python pillow imutils pydot graphviz librosa

Then, you must install CUDA 12.8.1 and CUDNN 9.8.0, please refer to these links:

Follow the instructions on the NVIDIA websites to install both cuda-12.8.1 and CUDNN 9.8.0

Install Nvidia Linux Driver (not required for WSL2)

Then you must install the latest NVIDIA Linux driver.

At the time of the writing, the latest driver is 570.169 (June 17, 2025)

The NVIDIA Linux driver is not required for Ubuntu 24.04 under WSL2. For that, you need to install Microsoft Windows NVIDIA driver available from NVIDIA App.

About the python wheel file:

The python wheel file is compiled in Ubuntu 24.04 with llvm and CUDA Toolkit 12.8.1. It supports compute_86, compute_89 and compute_120 cuda devices, which correspond to NVIDIA GPU card with Turing, Ada and Blackwell architectures (or in layman terms: RTX 30, RTX 40 and RTX 50) series.

The python wheel file also comes with AVX, AVX2 and FMA support for both Intel and AMD cpu acceleration.

The Tensorflow version installed is the Tensorflow 2.20dev edition, nightly from :

https://github.com/tensorflow/tensorflow

Finally you can test the Tensorflow binaries with the following command.

How to install Unity 6.x backports to Ubuntu 12.04 LTS (Precise)

Unity 6.x (included by default in Ubuntu 12.10 Quantal) features performance improvements and new features on the Unity 3D user-interface as several bug fixes which enhances user experience while using Ubuntu desktop. Besides that, the backport also improve the performance of low-end 3d cards when rendering unity animations.

ubuntu logo 12.10 Quantal

Use these command to install Unity 6.x backports into Ubuntu 12.04 LTS:
[bash]
sudo add-apt-repository ppa:benkai/precise-unity-backport
sudo apt-get update
sudo aptitude remove unity-lens-applications
sudo aptitude install unity
wget http://ppa.launchpad.net/benkai/precise-unity-backport/ubuntu/pool/main/u/unity-lens-applications/unity-lens-applications_6.4.0-0ubuntu2_amd64.deb or
wget http://ppa.launchpad.net/benkai/precise-unity-backport/ubuntu/pool/main/u/unity-lens-applications/unity-lens-applications_6.4.0-0ubuntu2_i386.deb
sudo dpkg -i unity-lens-applications_6.4.0-0ubuntu2_*.deb
[/bash]

Note:
The unity backport may cause stability issues with Nouveau (nVidia Accelerated Open Source video driver). Those who are using nVidia cards are advised to use nVidia blob binary drivers.