PCFreak Logo (c) Der PCFreak

Archive for Juni, 2012

Shoets – Screenshot utility for the logon screen Kommentare deaktiviert für Shoets – Screenshot utility for the logon screen


Have you ever wanted to create a screenshot of the Windows(R) Logon Screen? – Impossible?

No, with Shoets, a small utility I wrote using the AutoIt programming language you can easily create screenshots at the Windows(R) logon screen.

You can get the tool here (source included): shoets-screenshooter-for-logon-screen.zip

  1. Unzip the archive
  2. Run Shoets.exe
  3. Lock your computer
  4. On XP and 2003 press 5x „SHIFT“ on your keyboard
    On other OSs click the „Ease of Access button“
  5. Press „s“ as often as you like to create a screenshot
  6. Press „x“ to exit the utility
  7. Login back to windows and enjoy your screenshots!

I will be interested in your feedback!

Howto compile oathtool on Windows with Cygwin 2


If you want to compile oathtool on Windows using Cygwin you can use this small Howto:

    1. Install Cygwin
    2. Install the following packages into Cygwin (maybe you need less packages, but this is myy actual list grabbed with cygcheck.exe -c) or just try, wait for errors and install the packages based on the error you get._autorebase, _update-info-dir, alternatives, autobuild, autoconf, autoconf2.1, autoconf2.5, automake, automake1.10, automake1.11, automake1.4, automake1.5, automake1.6,
      automake1.7, automake1.8, automake1.9, base-cygwin, base-files, bash, binutils, bzip2, ca-certificates, coreutils, cpio, crypt, cvs, cvsps, cygutils, cygwin, cygwin-doc, dash,
      diffutils, dos2unix, editrights, file, findutils, gawk, gcc-core, gcc-g++, gcc-mingw-core, gcc-mingw-g++, gdb, gettext, git, grep, groff, gzip, ipc-utils, less, libasn1_8, libattr1,
      libbz2_1, libcom_err2, libcurl4, libdb4.5, libexpat1, libffi4, libgcc1, libgcrypt11, libgdbm4, libgmp3, libgnutls26, libgpg-error0, libgssapi3, libheimbase1, libheimntlm0, libhx509_5,
      libiconv2, libidn11, libintl3, libintl8, libkrb5_26, libltdl7, liblzma5, liblzo2_2, libncurses10, libncurses9, libncursesw10, libopenldap2_3_0, libopenssl098, libopenssl100, libpcre0,
      libpopt0, libreadline7, libroken18, libsasl2, libsigsegv2, libsqlite3_0, libssh2_1, libssp0, libstdc++6, libtasn1_3, libtool, libwind0, login, m4, make, man, mercurial, mingw-runtime,
      mingw-w32api, mintty, perl, perl-Error, python, rebase, run, sed, tar, terminfo, texinfo, tzcode, w32api, wget, which, xorg-util-macros, xz, zlib0
    3. Download the source from here. I used oath-toolkit-1.12.4.tar.gz
    4. Unzip the source to your Cygwin home folder
      tar xzvf oath-toolkit-1.12.4.tar.gz
    5. Jump into the newly created folder
      cd  oath-toolkit-1.12.4
    6. Execute the following commands
      ./configure
      make
    7. Pickup the following files and copy them to a separate folder
      <cygwinbinfolder>\cygwin1.dll
      <cygwinhome>\oath-toolkit-1.12.4\liboath\.libs\cygoath-0.dll
      <cygwinhome>\oath-toolkit-1.12.4\\oathtool\.libs\oathtool.exe
    8. You can now run oathtool (without Cygwin) from the newly created folder

 

If you don’t want to compile yourself, you can download my compiled version here (if you trust me!).

OTP token for bash Kommentare deaktiviert für OTP token for bash

oathtool emulating token in bash

If you ever have to emulate a OTP token in bash, you could do this easily with oathtool. For Debian based systems compile it yourself or just install the packages from the latest testing release, they work well on stable versions, too.

I wrote a small bash script to emulate a OTP token. It can be used to emulate a time-based Google-Authenticator token or a time-based c200 token from http://gooze.eu You can modify it to also be able to emulate event-based tokens, just replace „–totp“ with „–hotp“ and replace the time step (-s) with a counter value (-c).

Here is the code:

#!/bin/bash
#
secret=38217FF224B2352885AABAA4DF3C13773AC5B883
clear
while [ 1 = 1 ]; do
 # for Google-Authenticator enable next line
 # make sure youe have secret in base32
 #password=$(oathtool --totp -b -s 30s $secret)
 # for c200 Token (gooze.eu) enable next line
 password=$(oathtool --totp -s 60s $secret)
 seconds=$(date +%S)
 echo "##################################"
 echo "#         Software-Token         #"
 echo "##################################"
 echo -n '#             '
 if [ "$seconds" -gt 56 ] ; then
    echo -n -e "\e[1;31m$password\e[0m"
 #enable next 2 lines for a 30s interval
 # elif [ "$seconds" -gt 26 -a "$seconds" -lt 30 ]; then
 #    echo -n -e "\e[1;31m$password\e[0m"
 else
    echo -n "$password"
 fi
    echo '             #'
 echo "################################$seconds"
 echo ""
 sleep .3
 clear
done

 

Feel free to modify it to your needs.