在Debian上编译并安装Nasty

时间:2020-03-21 11:42:53  来源:igfitidea点击:

Nasty工具可以帮助我们恢复GPG密码短语。

编译

下载Nasty tar包:

$cd $HOME
$wget --no-check-certificate https://www.vanheusden.com/nasty/nasty-0.6.tgz
$clamscan nasty-0.6.tgz
$tar xf nasty-0.6.tar.gz
$cd ./nasty-0.6

下载libgpg-error,libassuan和gpgme tar包:

$wget https://www.gnupg.org/ftp/gcrypt/gpgme/libgpg-error-1.20.tar.bz2
$wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.3.0.tar.bz2
$wget https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.6.0.tar.bz2
$tar xf libgpg-error-1.20.tar.bz2
$tar xf libassuan-2.3.0.tar.bz2 
$tar xf gpgme-1.6.0.tar.bz2

编译并安装libgpg-error:

$cd libgpg-error-1.20
$./configure && make && make install

编译并安装libassuan:

$cd ../libassuan-2.3.0
$./configure && make && make install

编译并安装gpgme:

$cd ../gpgme-1.6.0
$./configure && make && make install

编译并安装Nasty:

$cd "$HOME"/nasty-0.6
$make && make install

运行Nasty:

$nasty -h
nasty v0.6, (C) 2005 by Hyman@theitroad
-a x	set minimum length of passphrase
-b x	set maximum length
-m x	set guessing mode:
	incremental: try them all
	random: try at random
	file: read phrases from file (use -i)
-i x	file to read the passphrases from
-f x	file to write the found passphrase to
-c x... charset, one or more from the following:
	a: a-z
	A: A-Z
	0: 0-9
	.: all ascii values (32...126)
	+: 32...255 (default(!))

从存储库安装

还可以从Debian存储库中安装Nasty软件包:

# apt-get install nasty