summaryrefslogtreecommitdiff
path: root/misc/chntpw
diff options
context:
space:
mode:
authorRoberto Metere <roberto@metere.it>2012-05-29 19:12:22 -0400
committerErik Hanson <erik@slackbuilds.org>2012-06-03 15:21:11 -0500
commit03267849a134325d1af141dd67ac576072619723 (patch)
treed1940e03bdc71b081bc264cdbed80abc04262011 /misc/chntpw
parente0b5c42ffc7016d70d3017a1f4681f26260a7c28 (diff)
downloadslackbuilds-03267849a134325d1af141dd67ac576072619723.tar.gz
misc/chntpw: Added (Change NT Passwords)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'misc/chntpw')
-rw-r--r--misc/chntpw/README17
-rw-r--r--misc/chntpw/chntpw.SlackBuild103
-rw-r--r--misc/chntpw/chntpw.info10
-rw-r--r--misc/chntpw/defaultarch.patch.gzbin0 -> 323 bytes
-rw-r--r--misc/chntpw/slack-desc19
5 files changed, 149 insertions, 0 deletions
diff --git a/misc/chntpw/README b/misc/chntpw/README
new file mode 100644
index 0000000000..fe931a23ef
--- /dev/null
+++ b/misc/chntpw/README
@@ -0,0 +1,17 @@
+chntpw allows you to view some information and change user passwords
+in a Windows (NT/XP/Vista/win7) etc SAM userdatabase file. You do
+not need to know the old passwords. However, you need to get at the
+file some way or another yourself. In addition it contains a simple
+registry editor with full write support, and hex-editor which
+enables you to fiddle around with bits&bytes in the file as you
+wish yourself.
+
+There are 3 main executables
+- "ntreg" (the registry library)
+- "chntpw" (the password reset / registry editor frontend)
+- "reged" (registry editor /export tool)
+
+Quickstart example, where /dev/sda1 (or whatever partition Windows
+has been installed in) is mounted to /mnt/windows:
+ chntpw -i /mnt/windows/Windows/System32/config/SAM
+The previous line should open a shell-driven menu.
diff --git a/misc/chntpw/chntpw.SlackBuild b/misc/chntpw/chntpw.SlackBuild
new file mode 100644
index 0000000000..b0fd04c5e6
--- /dev/null
+++ b/misc/chntpw/chntpw.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for chntpw
+# Copyright (c) 2012, Written by Roberto Metere <roberto@metere.it>
+
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=chntpw
+VERSION=${VERSION:-110511}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+unzip $CWD/$PRGNAM-source-$VERSION.zip
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Disable forcing 32 bit
+zcat $CWD/defaultarch.patch.gz | patch -p0 --verbose || exit 1
+
+make \
+ OSSLPATH=/usr \
+ OSSLLIB=/usr/lib${LIBDIRSUFFIX}
+
+# No automatic install available, manual installation (easy)
+mkdir -p $PKG/usr/bin
+for i in chntpw chntpw.static cpnt reged reged.static
+do
+ echo cp $i $PKG/usr/bin/.
+ cp $i $PKG/usr/bin/.
+done
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING.txt INSTALL.txt README.txt GPL.txt LGPL.txt \
+ WinReg.txt HISTORY.txt syskey.txt regedit.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/misc/chntpw/chntpw.info b/misc/chntpw/chntpw.info
new file mode 100644
index 0000000000..f8db4dce18
--- /dev/null
+++ b/misc/chntpw/chntpw.info
@@ -0,0 +1,10 @@
+PRGNAM="chntpw"
+VERSION="110511"
+HOMEPAGE="http://pogostick.net/~pnh/ntpasswd/"
+DOWNLOAD="http://pogostick.net/~pnh/ntpasswd/chntpw-source-110511.zip"
+MD5SUM="a3fb358d1adec589cd6bc8dedf68896c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Roberto Metere"
+EMAIL="roberto@metere.it"
+APPROVED="dsomero"
diff --git a/misc/chntpw/defaultarch.patch.gz b/misc/chntpw/defaultarch.patch.gz
new file mode 100644
index 0000000000..e28e7afed1
--- /dev/null
+++ b/misc/chntpw/defaultarch.patch.gz
Binary files differ
diff --git a/misc/chntpw/slack-desc b/misc/chntpw/slack-desc
new file mode 100644
index 0000000000..0252475743
--- /dev/null
+++ b/misc/chntpw/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+chntpw: chntpw (Change NT Passwords)
+chntpw:
+chntpw: View some information and change user passwords in a Windows
+chntpw: (NT/XP/Vista/win7) etc SAM userdatabase file. You do not need to
+chntpw: know the old passwords.Ophcrack is a free Windows password cracker
+chntpw: based on rainbow tables.
+chntpw:
+chntpw: Homepage: http://pogostick.net/~pnh/ntpasswd/
+chntpw:
+chntpw:
+chntpw: