August 5th, 2011
Mounting Windows based shares on Linux is a relatively simple process.
If the share is on a Windows XP, Server 2000 or NT machine you can use the following command:
mount -t smbfs -o username=username //server/share /mountpoint
However for Server 2003 the above command will not work so you simply change smbfs for cifs as shown below.
mount -t cifs -o username=username //server/share /mountpoint
The username should be that of your Windows user and in both examples you will be prompted for your windows password.
The command above will work for all versions of Windows. If you are having difficulty mounting or receive an error with invalid file type ensure that the samba-client packages for your distribution are installed
August 4th, 2011
I spend most of my time working in front of a black and white terminal of remote SSH connections to various servers.
This means that I use bash (as my preferred shell) most of the day. And bash history is a very important feature of bash that saves me much time by recalling previous commands I have typed.
Here are some tricks on how you can optimize with some simple configurations settings the usage your bash history.
1. Append to History
history -a
Append the new history lines (history lines entered since the beginning of the current Bash session) to the history file.
2. Clear History
history -c
(clear the history)
3. Write History to file
history -w
(write to the file – overwrite!)
4. Dont save duplicate commands in the history
HISTCONTROL=ignoreboth
5. Size of the history:
HISTSIZE=500
HISTSIZE: The number of commands to remember in the command history. The default value is 500.
How do you set these 4-5 options? Either export them in your environment in your personal bash configuration file (~/.bashrc) or in the global bash configuration file (/etc/bash.bashrc).
export HISTCONTROL=ignoreboth
export HISTSIZE=500
July 9th, 2011
Yappy,
I just won a price by "Liking" a page on facebook "Like & Win" competition
Actually some company announced that they will give free gifts to the 2000th and 2011th users, who like their facebook page.
So what I did was simple, I just made a python script (that's not hacking, just power of programming) to win that price and start that script to check the page status and alert me when page like is near 1998-1999 🙂
import urllib2,time,winsound
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.recording = 0
self.data = []
def handle_starttag(self, tag, attrs):
if tag == 'div':
for name, value in attrs:
if name == 'id' and value == 'profile_header':
#print "Encountered the beginning of a %s tag" % tag
self.recording = 1
break
def handle_endtag(self, tag):
if tag == 'div':
self.recording -=1
#print "Encountered the end of a %s tag" % tag
def handle_data(self, data):
if self.recording:
self.data.append(data)
var = 1
print "Checking current likes (remember 2000th and 2011th will get the price):"
while var == 1 :
print "......"
p = MyHTMLParser()
f = urllib2.urlopen('http://www.facebook.com/pages/Some_URL_for_like_and_win')
html = f.read()
p.feed(html)
#print p.data
print p.data[4];
string=p.data[4];
if string.startswith( '1,999' ):
winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS)
print "Check the page and get the price"
p.close()
print "Sleeping for 5 minutes"
time.sleep(300)
Change this URL to the URL of your choice [http://www.facebook.com/pages/Some_URL_for_like_and_win]
Please note I am NOT responsible if that company sues you for cheating & for using programming skills in competition 🙂
Aloha
June 22nd, 2011
Firefox releases Version 5; five remote code vulnerabilities fixed
* MFSA 2011-26 Multiple WebGL crashes
* MFSA 2011-22 Integer overflow and arbitrary code execution in Array.reduceRight()
* MFSA 2011-21 Memory corruption due to multipart/x-mixed-replace images
* MFSA 2011-20 Use-after-free vulnerability when viewing XUL document with script disabled
* MFSA 2011-19 Miscellaneous memory safety hazards (rv:3.0/1.9.2.18)
Mozilla delivered on its promise to have the Version 5 release of its browser ready by midwinter's day, which takes place today in Australia – 22 June 2011.
The new version officially calls itself 5.0, but the Version 4 release is just three months old, and has had only one point update (to Version 4.0.1).
It looks as though Mozilla is simply copying Google's Chrome version numbering system in order to seem more "with it."
Source :-
http://nakedsecurity.sophos.com/2011/06/22/firefox-release-v5-five-vulns-fixed/
June 14th, 2011
Users can easily resize Windows7/Vista desktop icons or change the size of icons on Windows7/Vista desktop
There are THREE methods to resize the desktop icons, depending on your preference and also the ’size’ that you want to change the icons to.

‘Mouse Wheel’ Method
The option to select from only three available sizes wasn’t satisfying enough, so I found another method. Make sure the desktop has the focus, just click anywhere on the desktop before starting this process. Press & hold Ctrl on the keyboard, Scroll with the mouse wheel up or down to get the desired size.

‘Color And Appearance’ Method
The above method was actually much better. You can have variety of sizes and one for sure will suit you. But what if you don’t have a mouse wheel?, the closest I could find is to do this: Right click on an empty spot on your desktop and choose Personalize, now choose the first item on the list Windows Color and Appearance, and then click the last link Open classic appearance properties for more color options.


‘Registry’ Method (For Advance users)
If you like to tweak around the registry (I am not responsible for this), then that can be set under that key,
Open Registry by typing:- regedit in run (or Windows + R) and navigate to the key mentioned below.
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
(Logging off is required for applying the changes.)
May 12th, 2011
From Nmap Manual
If you find yourself really bored one rainy afternoon, try the command
nmap -Pn -sS -p 80 -iR 0 –open
to locate random web servers for browsing.
(use it at your own risk !! as some companies might complain for port scanning)