A Simple Script to Get Top Passwords Cracked

Several days ago, I took a break from doing my work. I did an exercise to sharpened my “rusty” scripting skills. My goal was to develop a simple script using Ruby to get the top passwords cracked from MD5 Statistics page. This should be an interesting exercise for my brain. :D

Unfortunately, my scripting skills was so rusty, so it took me a while to code this simple script.

Continue reading

Developing Crypto Code in Python

I am currently doing a research on how to develop crypto code in Python programming language.

Based on my research, there are several crypto libraries that’s suitable for my purpose. They are Python Cryptography Toolkit and ezPyCrypto as my main libraries.

Python Cryptography Toolkit will be the low-level crypto library, while ezPyCrypto will act as a high-level crypto library.

Before installing those two libraries, make sure you have have the following packages :

  • python
  • python-devel

Here are the steps to install those libraries :

– Install Python Cryptography Toolkit (python-crypto) :

# rpm -Uvh python-crypto-2.0.1-15.i586.rpm
Preparing… ########################################### [100%]
1:python-crypto ########################################### [100%]

– Install ezPyCrypto :

$ tar xvzpf ezPyCrypto-0.1.1.tar.gz

$ cd ezPyCrypto-0.1.1/

$ su -c “python setup.py install”
Password:

running install

running build

running build_py

creating build

creating build/lib

copying ezPyCrypto.py -> build/lib

running install_lib

creating /usr/local/lib/python2.4

creating /usr/local/lib/python2.4/site-packages

copying build/lib/ezPyCrypto.py -> /usr/local/lib/python2.4/site-packages

byte-compiling /usr/local/lib/python2.4/site-packages/ezPyCrypto.py to ezPyCrypto.pyc

Saying Hello and Goodbye in Rails

Several days ago, I finished install Rails on my system. At that time, I didn’t have anything to show you about the easiness of Rails.

In this occasion I will show you how easy it is to create a simple web-based application. The application will just display “hello” and “goodbye”.

First, I create an application called “demo” :

$ rails demo
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts

create log/test.log

Next, I create a controller “Say” :
$ cd demo
$ ruby script/generate controller Say
exists app/controllers/
exists app/helpers/
create app/views/say

Then I create two actions in say_controller.rb :

$ cd app/controllers

Here is my say_controller.rb file :

class SayController def hello
@time = Time.now
end
def goodbye
end
end

Next, I create two views for each action (hello.rhtml and goodbye.rhtml) :

$ cd app/views/say

Here is the content of hello.rhtml :


Hello, Rails!


Hello from Rails!



It is now .


Time to say

“goodbye” %>



Here is the content of goodbye.rhtml :

See You Later!

Goodbye!


It was nice having you here.


Say “hello” %> again.



After that I start the server :

$ pwd
demo

$ script/server
=> Booting WEBrick…

=> Rails application started on http://0.0.0.0:3000

=> Ctrl-C to shutdown server; call with –help for options

[2006-07-12 22:16:23] INFO WEBrick 1.3.1

[2006-07-12 22:16:23] INFO ruby 1.8.4 (2005-12-24) [i586-linux]

[2006-07-12 22:16:23] INFO WEBrick::HTTPServer#start: pid=5225 port=3000

Now it’s time to show some pretty pictures. :D