UPSRATE RSI STOCK BLOG FREEWARE DVD-CD PuTTY

May 16, 2008

Wordpress blog hacked with admin-ajax.php vulnerability

Filed under: Uncategorized — HanaDaddy @ 12:36 am

Whew~!
I just upgraded my old (don’t even know what the old version was) Wordpress to the latest 2.5.1 because somebody hacked into my site and added bunch of hyper links in my latest post. And it was very clever that the hyperlinks are not shown in the browser since the position of the div is out of screen. But probably search engines will see the links and increase the pagerank or simliar action could have been done I guess.

Anyway, the migration was very easy except that I had to redefine the tag keywords from the old UTW (Ultimate Tag Warrior 3) to the Wordpress.

I guess my blog was attacked by this admin-ajax.php vulnerability. They say that a hacker can run the SQL query through admin-ajax.php.

Here are some of the blogs explaining the vulnerability.

May 6, 2008

Quick: Windows Keyboard Shortcut

Filed under: Links to note, Unix Admin — HanaDaddy @ 10:58 pm

Shortcuts are good to know if you use computers a lot. Especially they help to reduce the mouse movement which is very important if you suffer from the Capal Tunnel Syndrom.

I just read this article from Lifehacker and I found these shortcut really great! I never knew that there are shortcuts for these kind of everyday tasks. I love these shortcuts.

  • Win+R: shows Run dialog
  • Win+D: toggles Show Desktop
  • Win+E: starts Windows Explorer
  • Win+L: locks computer

If you use Firefox , below shortcut are useful too.

  • Ctrl + L : brings focus to the location bar.
  • Ctrl + K : brings focus to the search bar.

LifeHacker: Make Windows More Productive Without Installing a Thing

April 23, 2008

PuTTY Auto Login Macro using AutoHotKey

Filed under: Software — HanaDaddy @ 12:26 pm

PuTTY is the best SSH client and it’s free. But it lacks of this little function that I really want - Automatic login.

So I have searched many Google pages and found this PuTTY Connection Manager which I explained details in my previous post. It is a very good software.

But somehow I wanted the auto login function without the extra programs. I wanted it to be done directly with PuTTY, not within the frame of PuTTY Connection Manager.

And I found this software called AutoHotKey (http://www.autohotkey.com/) which can automate keyboard and mouse actions. But I gave up to use it at that time because I was too lazy to read all the instructions and to come up with a script for the auto login.

But yesterday, I decided to take a look again and this time I successfully created the Auto Login script! To tell you the truth, it was not easy but it is worth it. I am proud of myself :)

So here is the script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
v_program=%A_ProgramFiles%\PuTTY\putty.exe -load putty_profile
v_userid=youruserid
v_passwd=yourpasswd
v_wait_userid=1000
v_wait_passwd=500
 
;-------------------------------------------------
; To make modifier keys to work properly (such as Shift)
SetKeyDelay, 0, 10
 
run, %v_program% , , , newpid
 
;you need to wait a little for the window to initialize
;sleep, 100
winwait, ahk_pid %newpid%
 
;wait for the login prompt to appear
sleep, %v_wait_userid%
ControlSend, , %v_userid%{enter}, ahk_pid %newpid%
 
sleep, %v_wait_passwd%
ControlSend, , %v_passwd%{enter}, ahk_pid %newpid%
 
;create unique title so you won't be lost 
WinGetTitle, v_title, ahk_pid %newpid%
v_newtitle=%v_title% - %newpid%
WinSetTitle, ahk_pid %newpid%,,%v_newtitle%

If you want to try this yourself, you will need to change some information.

  1. Install AutoHotKey software.
  2. Create any file name with extension .ahk. For example ’ssh.ahk’ would be fine.
  3. Copy & paste above code into the file. But need to change the values.
    v_program: PuTTY location with the -load option and connection profile name
    v_userid: userid
    v_passwd: passwd
    v_wait_userid : msec to wait before sending userid
    v_wait_passwd : msec to wait before sending passwd
  4. Save it and double click on the file to execute it. And watch the PuTTY logging in the server automagically!

In fact, you can easily add additional commands at the end of the script to execute further commands.

Below is an example.

1
2
3
4
5
6
7
8
9
 
;maybe you want to wait some seconds while initial welcome screen appears. Let's say 2 seconds.
sleep, 2000 
 
;cd upload
ControlSend,,cd upload{enter} , ahk_pid %newpid%
 
;You can send the folder list to your email account.
ControlSend,,ls|mail -s "Daily File Listing for Upload" your@emailaccount.com{enter}, ahk_pid %newpid%

Note that there is a little issue that the password is saved as plain text. But I can live with it for now.

Here is my script in action.

Come visit again for more information on PuTTY.

April 22, 2008

PuTTY Backspace Error

Filed under: Software — HanaDaddy @ 6:59 pm

Backspace Error

This is a simple tip for PuTTY Configuration.
When you first use PuTTY , you will find the cases that BACKSPACE would not work and showing as strange sequence of ^ and question mark (^?^?^?) for some UNIX servers.

You can fix this problem just by changing the setting. Select Terminal Keyboard at the left TreeView control of the main PuTTY screen and select Control-H instead of default Control-?(127).
Also make sure you save the settings.

Terminal Keyboard Setting

Come visit again for more information on PuTTY Automation and Configuration Tips.

PuTTY Auto Login Macro - PuTTY Connection Manager

Filed under: Software — HanaDaddy @ 12:26 pm

Automatic Login or Login Macro function - Have you ever wanted to make the PuTTY login session automatic?

PuTTY is a great free telnet ssh client and I wouldn’t trade with any other client. But it lacks of this minor function that I really want - Automatic login.

Maybe the automatic login is not a big deal. You can just type in the userid and the password each time you log in to the development server . But if you do that regularly everyday, opening several times throughout the whole day, you would understand and agree with my little wish.

So I been looking for the solution , going through the every results of the Google search.

And here is the great helper application that can do automatic login macro!
PuTTY Connection Manager (http://puttycm.free.fr/) is the great .NET 2.0 application that can do the automatic login. Moreover, it supports tabbed windows just like the Firefox does it. Also it has quick connection menu bar that you just type in the address and connect which can be also useful.

Features

  • Tabs and dockable windows for PuTTY instances.
  • Able to load the profiles created from PuTTY.
  • Login macro - You can define Userid and Password and extra commands to execute after login.

Requirements

It can be little confusing when you first use the software and to use that Login Macro. By default the PuTTY CM shows existing PuTTY Session profiles in the TreeView located in the right pane. Don’t be fooled, you cannot set Login Macro with the existing PuTTY Session profiles. You will need to create a new database to do that.

Configuration Dialog

  1. Create a new database from File menu.
  2. You will see the newly created database icon in the right pane, above the PuTTY Session item. Copy the profile you want to set Login macro from the PuTTY Sessions and paste into the new database you just created. You can use traditional ctrl+C and ctrl+V shortcut.
  3. Right mouse click on the newly created item under the database and select Configuration.
  4. A new window dialog will show up with the same connection information as the original PuTTY profile. Check on the “Enable Login Macro Mode”.
  5. Select “Login Macro” in the left TreeView and you will be able to define the userid ,password, timeout seconds, and post login commands.
  6. After inputting data, click on the OK button and connect by double clicking the item.

Also, don’t forget to save your database settings, so you can use the settings later on.

Come visit again for more information on PuTTY Automation.

Next Page »
 

42 queries. 0.554 seconds. Powered by WordPress