Throw the Mind [dot] Com

Tag: Programming

Now Lets Securely Delete Files

by Nathan on Feb.10, 2008, under Uncategorized

Every week I listen to Security Now a podcast hosted by Steve Gibson and Leo Laporte. The other week I found out that most File Shredding programs don’t actually delete the files in the correct manner. A file isn’t deleted until its place on disk has been allocated to another file. This is the reason there are so many file recovery programs available. So what are we suppose to do if we want to delete a file and be sure it can never be recovered again? We download SDelete from Sysinternals and put it to work. SDelete is a command line utility and personally I don’t like having to type in a long command just to delete a file. So I wrote up a nice little batch program. You can either drag and drop one file, or one folder and it will delete the item using SDelete. All you have to do is download the batch file to the same directory as SDelete.exe and your good to go. Also the batch file tells SDelete to do five passes, just to make sure your item isn’t coming back.

Download SDelete.exe http://download.sysinternals.com/Files/SDelete.zip
Download delete.bat http://throwthemind.com/tools/delete.bat

In the last few days I have shown you how to encrypt and decrypt any file, and securely delete any file (unencrypted ones) all running off a USB Dive without Administrator access on a Windows machine. I hope you get use out of this, I know I do.

Thanks
Nathan

1 Comment :, , , more...

Using OpenSSL on Windows with a USB Drive

by Nathan on Feb.07, 2008, under Uncategorized

The other day I picked up a new 2gb USB Drive. I like to keep storage with me, as well as programs like Portable Putty, Firefox, Filezilla, VLC, 7Zip and KeePass. All of which can be downloaded free at PortableApps.com Keeping all these programs only takes up around 150MB, which isn’t bad when you have 1.9GB to play with. Now lets talk about encryption. Using a Mac or Linux a lot like I do, you find OpenSSL is awesome. You can easily encrypt and decrypt files quickly.  I recently got to looking around and found an .exe of OpenSSL. So I started playing. When I was done I had OpenSSL working off a USB Drive, and a batch file that either encrypts or decrypts based on the file extension. Oh and the batch file is run by dropping a file onto it. Here is what I did.

  1. Download Win32 OpenSSL v0.9.8g Light and install.
  2. Copy C:\OpenSSL\bin to your USB Drive.
  3. Rename the bin directory to openssl.
  4. Copy libssl32.dll, libeay32.dll, msvcr71.dll, ssleay32.dll from C:\WINDOWS\system32 to your new openssl directory.
  5. Double click on openssl.exe in your openssl directory. If it works you should get a command prompt showing OpenSSL>
  6. Download this file to the root of your USB Drive. encrypt-and-decrypt.bat
  7. Now you have drag and drop encryption and decryption using aes-256.

The batch file will encrypt any file but will not encrypt a directory. If you want to encrypt a directory you can use 7zip to zip up the directory, then encrypt the .zip Also the batch file will only decrypt files ending in .enc Test it out and you will see what I mean. If you have any questions just leave a comment.

Thanks
Nathan

ps. If you want separated encrypt and decrypt files you can download these. encrypt.bat decrypt.bat

2 Comments :, , , more...

GeekTool Rss Script

by Nathan on Sep.20, 2007, under Daily Crap

Here is a little script a friend help me put together. It it basically a caching RSS reader for GeekTool. I use it to display my Netflix query on my desktop, as well as My MeeVee listing. Just change the LOG, RSS lines and it will pull the title lines out of RSS feeds. If you want more you can change the curl lines. Have fun.

    #!/bin/sh
    LOG=/Users/Nathan/scripts/netflix_queue.txt
    RSS=”http://rss.netflix.com/QueueRSS?id=P1414648916102002442351662043565655″
    size=$(ls -all $LOG | awk ‘{print $5}’)

    if [ ! -f $LOG ]; then
    curl -s $RSS | grep title | sed -E ’s/<\/?title>//g’ > $LOG
    else
    age=$(echo $(date “+%s”) – $(stat -t “%s” $LOG 2>/dev/null | awk -F\” ‘{print $4}’) | bc -l)
    if [ "$age" -gt 3600 -o $size = 0 ]; then
    curl -s $RSS | grep title | sed -E ’s/<\/?title>//g’ > $LOG
    fi
    fi
    cat $LOG

Leave a Comment :, , , more...

Real Linux Commands

by Nathan on Sep.19, 2007, under Daily Crap

I stole this list from this blog.

    % cat “food in cans”
    cat: can’t open food in cans

    % nice man woman
    No manual entry for woman.

    % “How would you rate Quayle’s incompetence?
    Unmatched “.

    % Unmatched “.
    Unmatched “.

    % [Where is Jimmy Hoffa?
    Missing ].

    % ^How did the sex change operation go?^
    Modifier failed.

    % If I had a ( for every $ the Congress spent, what would I have?
    Too many (’s.

    % make love
    Make: Don’t know how to make love. Stop.

    % sleep with me
    bad character

    % got a light?
    No match.

    % man: why did you get a divorce?
    man:: Too many arguments.

    % !:say, what is saccharine?
    Bad substitute.

    % %blow
    %blow: No such job.

    % \(-
    (-: Command not found.

    $ PATH=pretending! /usr/ucb/which sense
    no sense in pretending!

    $ drink matter
    matter: cannot create

Leave a Comment :, , , more...

Best of the Interweb 6-26-06

by Nathan on Jun.26, 2006, under Daily Crap

Hey everyone it’s a new week, and a hole new start to the best of the interweb. First off if this one isn’t great it cause I’m really tired. I was up all night arguing with someone about something that really didn’t matter…maybe Ill make a new post about that. Anyway hope you enjoy this list.

1 Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Contact Me

Email :
Twitter : @JimShoe
AIM : greenfday6
Jabber : greenfday6[@]gmail[dot]com