December 31, 2012

Find alternative web sites

If the last Techbit was to find similar software, then what is this one for? Similar people? Nah, this one is for similar web sites.

http://www.similarsites.com/ is where you can find sites similar to something.

As an example, a search for sites similar to sourceforge.net lists several good ones like those that can be seen from http://www.similarsites.com/site/sourceforge.net.

December 28, 2012

Find alternative software

You’ve some software but you’re not satisfied with it and need to find alternative options to the same? If so, then http://alternativeto.net/ is where you would need to go to. It is a great site and rates the software based on user recommendations.

December 8, 2012

How to find filesystem block size on Solaris?

Firstly, what is a filesystem block?

It is the smallest piece/size of the disk allocated or accessible on the filesystem.

Can you explain a bit more?

Having a larger block size helps in achieving better performance due to lesser number of disk reads and lower metadata overhead. However, it is a disadvantage for files of smaller size. For example, assuming block size of 8 KB, 8 KB is allocated even if the file size is only 1 KB.

Tell me how do I find the filesystem block size on Solaris?

There’re couple of ways:

  1. From “df -g”; example: df -g | grep "block size" | awk '{print $1 " " $4}'
  2. From “fstype –v”; example: fstyp -v /dev/dsk/c0t1d0s0 | grep ^bsize

November 25, 2012

System Explorer: Alternative to Windows Task Manager

System Explorer is an alternative to and a much better version of Windows Task Manager.

It provides you with an in-depth view of your system functioning and performance. It gives you much more detail than Task Manager that comes by default with Windows. For example, the list of files opened by a particular process, the list of network connections, process hierarchy (which process is invoked by which other process) etc. are some of the interesting additional features provided by this tool.

Download it from http://systemexplorer.net/.

November 18, 2012

How to delete browser autofill field value(s)?

Have you ever mistyped a username or a word in a text field of a form on a website? If autofill is enabled, the browser stores the (mis)typed word in its cache and associates it with the dropdown of that text field. In such cases, have you wanted to delete such words from the browser cache?

One way is to delete/clear all of your browser cache – which is not effective though as it wipes out all of the cache.

The way to delete only a specific entry from the cache is to use keyboard to navigate to the required value in the dropdown list and hit “Del”. In some of the older browser versions, “Shift” + “Del” may be needed. Note that this holds good for URLs in location bar as well.

November 11, 2012

µTorrent (uTorrent): Torrent Client

If you’re looking for a torrent client to download material like Linux ISOs, training videos or digital copies of CDs/DVDs that you own, then µTorrent (uTorrent) is the one you should go for. It is an excellent and lightweight torrent client while providing rich functionality and performing wonderful as well. Yeah, it's not for downloading movies or songs - remember that! ;)

µTorrent (uTorrent) can be downloaded from http://www.utorrent.com/.

October 29, 2012

Ninite: Install / Update Multiple Apps at Once

Got a new computer and need to set it up with your favourite applications? Ninite helps you to install and update multiple applications at once. It is available for download @ http://ninite.com/.

Note that it does not contain all the software/applications. However, it is still a very good idea and tool to be aware of.

October 25, 2012

Rename Multiple Files in Windows

“Bulk Rename Utility” is a utility that helps you rename multiple files in a jiffy. Few very good ways you can benefit from this tool are listed below:

  • Add/replace/remove text to/from the file names.
  • Support for regular expressions is a big plus.
  • Rename the files based on the EXIF header data of images.
  • Rename the files based on the ID3 tag data of MP3 files.
  • Preview the changes before applying.

The tool is available for download @ http://www.bulkrenameutility.co.uk/.

One downside is that the interface appears quite cluttered and not easily usable. As such, it takes a little time to get used to it.

October 22, 2012

Techbits #25: Cygwin – Unix on Windows!

Have you ever wished if you had the ability to use UNIX shells (like “bash”), commands or scripts on Windows to make yourself more productive from the resulting power and flexibility? And, should it be something free and not commercial like “MKS Toolkit”? If so, then this Techbit is for you.

Cygwin is what you are looking for and accessible from http://www.cygwin.com/. There are a huge number of packages available that you can install additionally to spruce up and spice up your Cygwin setup.

Go on and wake up your Windoze with Cygwin! :)

October 11, 2012

Techbits #24: “nslookup” works but “ping”, “telnet” etc. don’t?

This Techbit is for those souls that work on Solaris platform. It may be applicable on other Unix-based platforms as well but I've not verified it.

A friend of mine told me he has configured the name servers correctly in /etc/resolv.conf after which he could get "nslookup" working but not the other commands like "ping", "telnet" etc. Why?

The answer lies in that "nslookup" does DNS lookups using /etc/resolv.conf where as "ping", "telnet" etc. refer to /etc/nsswitch.conf to find out the mechanisms to use for name resolutions.  If DNS is not listed here, then /etc/resolv.conf is not going to be referred to. Therefore, make sure DNS is listed as a source for host resolution in /etc/nsswtich.conf.

Another command to do such verification is 'getent hosts' - this is like nslookup but pays attention to /etc/nsswitch.conf additionally.

Thus, to summarize which configuration file does each of the commands depend on:

nslookup - /etc/resolv.conf

ping - /etc/nsswtich.conf

telnet - /etc/nsswtich.conf

getent hosts - /etc/resolv.conf, /etc/nsswtich.conf

October 5, 2012

Techbits #23: Export comments from Word document

There could be scenarios where one encounters the need to export/extract all the comments from a word document into - say, a word document or an excel sheet. This techbit is precisely going to address such usecase.

All that you would need to do is define the following Macros and just use (run) them afterwards. The Macros can be seen by following the Word document's menu path "View >> Macros >> View Macros".

Exporting comments into an Excel file

Create a Macro named exportCommentsIntoExcel with the following definition:
Sub exportCommentsIntoExcel()

Dim cmt As Word.Comment
Dim doc As Word.Document
Dim commentsFile As String
Dim row As Integer

commentsFile = ActiveDocument.FullName & " - Comments.xls"

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add()

row = 1

For Each cmt In ActiveDocument.Comments
    objExcel.Cells(row, 1).Value = cmt.Initial & cmt.Index
    objExcel.Cells(row, 2).Value = cmt.Range.Text
    row = row + 1
Next

objWorkbook.SaveAs (commentsFile)

End Sub
Select the Macro thus created and "Run" it.

The comments should be available in an excel file in the same directory as the source word document and with the suffix "- Comments" in its name.

Exporting comments into a Word document

Create a Macro named exportCommentsIntoWord with the following definition:

Sub exportCommentsIntoWord()

Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document

commentsFile = ActiveDocument.FullName & " - Comments.doc"

For Each cmt In ActiveDocument.Comments
    s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr
Next

Set doc = Documents.Add
doc.Range.Text = s
doc.SaveAs (commentsFile)
End Sub
Select the Macro thus created and "Run" it.

The comments should be available in a word document in the same directory as the source word document and with the suffix "- Comments" in its name.

September 5, 2012

Techbits #22: How to find out if Oracle is SE or EE?

If you want to find out whether Oracle is Standard Edition (SE) or Enterprise Edition (EE), then this is for you. Now, why would someone be interested in finding it out? One reason could be to check which licensing option is the Oracle based on and correspondingly find out which features can be used.

There are several ways some of which are listed below; if you do not see “Enterprise”, it means it is “Standard”.
  1. banner displayed at sqlplus prompt
  2. select * from v$version
  3. If the above methods do not work (which could be because of DB not being created using Database Configuration Assistant aka DBCA), then do this: In the file “$ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml”, check the value (VAL) of the parameter ‘s_serverInstallType’ – SE or EE.

Source for this Techbit is at http://vicker313.wordpress.com/2009/05/16/how-to-check-oracle-10g-is-standard-or-enterprise-edition/.

How is Oracle licensed or what kinds of features does one get to use based on EE etc.? These are going to be addressed as part of upcoming Techbits.

August 26, 2012

Techbits #21: 7-Zip File Archiver

Here is a very good and popular file archiver: 7-Zip.

You might ask why would one require this when we already have WinZIP or WinRAR? Well, the first and major difference is that 7-Zip is open source while the others are commercial. The second difference is that 7-Zip supports better compression ratios.

7-Zip is available for download at http://www.7-zip.org/.

August 13, 2012

Techbits #20: Taskbar Sorter & Taskbar Shuffle

If you’re someone who is used to having the application windows in a specific order, like having Mail Client (Outlook) as the first window, Browser (Firefox) as the second window etc., then the utilities "Taskbar Sorter" & "Taskbar Shuffle" are for you.

While Taskbar Sorter only has functionality to sort/order the taskbar items, Taskbar Shuffle has additional functionality like the ability to reorder the tray icons as well.

Taskbar Sorter >> http://www.codeproject.com/KB/shell/taskbarsorter.aspx
Taskbar Shuffle >> http://nerdcave.webs.com/

July 30, 2012

Techbits #19: How can an XSD be constructed from an XML?

You have an XML file but do not have its schema definition (XSD). Now, you would like to get your hands on one of its possible XSDs. What do you do?

Helpful information on how to generate XSD from XML can be found at http://www.dotkam.com/2008/05/28/generate-xsd-from-xml/. This would be useful in getting you started when you encounter any necessity to build and provide schema definitions for XML files.

Specifically, "trang" is the open source utility, located at http://www.thaiopensource.com/relaxng/trang.html, that does the job fairly good enough. Note that there're other utilities as well but many of them are commercial.

Note that there are tools available online that require you to upload an XML file, which will then be processed after which its XSD can be downloaded. However, this approach poses security risks and cannot be used in the case of files carrying sensitive content. This becomes all the more critical in the case of any files related to your work as it could become a corporate violation. As such, this word of caution of not using online tools for official work has to be kept in mind at all times.

July 21, 2012

Techbits #18: Editing ClearCase files from Windows leads to ^M characters?

A common problem reported by developers accessing ClearCase VOBs/views from Windows is that the edited text files (like source code, scripts, configuration files etc.) contain Ctrl+M (^M) characters when they are checked-in eventually (or) when transferred to Unix-based servers like Solaris or Linux. This could lead to further build problems.

Most people try to get around this issue by replacing the additional Ctrl+M characters in the files on the Unix machines by using commands like "dos2unix" or "sed 's/^M$//g' ...". However, the issue has to be fixed at the source (editing in the first place) and not at the destination.

How to then fix the problem? By setting the file type properly in your text editor and ensuring that the file type is retained correctly in case of existing file edits. If your text editor (like Notepad or Wordpad) does not support setting these properties, you should consider switching to something else.

If you're using Notepad++, then this can be specified by following Settings >> Preferences >> New Document/Default Directory and setting the parameter "Format" to "Unix". Note that Notepad++ needs to be restarted to effectuate the change. Once restarted, you can verify by seeing UNIX in the status bar. In a similar manner, if you’re editing any existing UNIX-based text files, the status bar will show UNIX.

Similar options can be found in standard IDEs like Eclipse and others.

June 27, 2012

Techbits #17: Screengrab from Browser

What is a Screengrab?

As the term itself indicates, it is like a screenshot and grabbing the screen into the form of something like an image.

What is it useful for?

The screens can be used in a variety of scenarios like presentations, documentation, troubleshooting and so on.

How is this (screen grabbing from browser) different from PrintScreen / Alt+PrintScreen?

While PrintScreen/Alt+PrintScreen can be used to capture screenshots of the entire desktop/window, screen grabbing from browser means taking a snapshot of the webpage/website as it appears when you visit it. That means, you’ll be able to capture and save a webpage as an image. Depending on the tool, there are additional options which can be used to determine:

  • if the visible portion of the webpage is to be copied/saved
  • if the entire webpage is to be copied/saved
  • if a selection is to be copied/saved i.e. it prompts you for a selection and you’ll be able to select an area of a webpage
  • type of the image like PNG/JPEG/GIF/BMP

Alright; now that I understand the concept, which tools can I use to screengrab?

Provided below is a sample list of Firefox add-ons that can be used:

Screengrab - http://www.screengrab.org/
FireShot - http://screenshot-program.com/fireshot/
Pearl Crescent Page Saver - http://pearlcrescent.com/products/pagesaver/

If you use some other browser like Chrome or IE, you can search for similar or equivalent add-ons in respective browser's add-on library.

May 20, 2012

Techbits #16: HashCheck - Check the hashes!

I'm sure you would have come across situations where you needed to find out the hash values (like MD5, SHA-1 etc.) of files or directories to validate their integrity. If you had participated in any release readiness review meetings, then you would have needed to fill in the hashes for the files being delivered. Or when you've downloaded something and when you want to verify the file integrity, you would need to verify the hash of the downloaded file against what is published on the site. The utility "HashCheck" comes very hand in such cases.

HashCheck Shell Extension makes it easy for anyone to calculate and verify checksums and hashes from Windows Explorer itself. In addition to integrating file checksumming functionality into Windows, HashCheck can also create and verify SFV files  (and other forms of checksum files, such as .md5 files). It is fast and efficient, with a very light disk and memory footprint. And, of course, it is open source.

http://code.kliu.org/hashcheck/ is where you'd find this utility.

May 14, 2012

Techbits #15: Bookmarklets


Provided in this Techbit are shortcuts - no, not to happiness! - known as "Bookmarklets" that you could create and use to better your productivity. They're also referred to as "Favelets" sometimes.

I know what a bookmark is but what is a Bookmarket?

Bookmarklet is an enhanced form of bookmark. While a bookmark is static in nature and can be used to visit a fixed URI, a bookmarklet is dynamic and can be used to visit URIs constructed on various inputs. The input can either be based on a textbox prompted to the user or what you've selected on the webpage or even constructed automatically based on the context of the current webpage.

How to create Bookmarklets?

If you're a user of Firefox or Chrome, it's very simple; all you need to do is add a bookmark, name it appropriately and specify the Javascript code in the "Location" or "URL" part of it.

If you're a user of IE, it is time to start using either Firefox or Chrome :)

Are there some examples that I can use?

Yes, given below are few examples to serve as illustration; you can build much more complex ones. If you've selected any text, then the bookmarklet uses it; otherwise, it prompts you to provide the input.

<code>Dictionary</code> - This can be used to search for the words on dictionary.com. You can just drag the link to your Bookmarks bar. If it's IE, you can right-click on the link and choose "Add to favorites".

Here is the code used to create the bookmark:

javascript:void(q=getSelection());if(q%20==%20'')%20void(q=prompt('Enter%20word:',''));%20if(q)%20window.open('http://dictionary.reference.com/browse/'%20+%20escape(q));void(0)

<code>To English</code> - Thanks to www.labnol.org - This can be used to translate text using Google Translate. You can just drag the link to your Bookmarks bar. If it's IE, you can right-click on the link and choose "Add to favorites".

Here is the code used to create the bookmark:

javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;};

What more?

There's quite a lot of information available on the net in this regard. The aforementioned samples are just a tip of the iceberg. Apart from these, there're lot more general bookmarklets that can be used to effectuate better productivity during your browsing. Few links are provided below for further reading:

http://marklets.com/
http://www.mvps.org/dmcritchie/ie/bookmarklets.htm
http://www.labnol.org/internet/guide-to-useful-bookmarklets/7931/

April 12, 2012

Techbits #14: Console - Enhanced CLI for Windows

First, a Techbit for tabbed text editor in the form of Notepad++. Then, a Techbit for tabbed browser in the form of Firefox. And then, a Techbit for tabbed Telnet/SSH terminal emulator in the form of PuTTY Connection Manager. What else could one ask for, huh? Well, one could ask for a Techbit for tabbed version of command line client for Windows.

If you find yourselves working from the command line interface on Windows, then you'd have experienced all the niceties of the default "cmd.exe"! This is where "Console" comes to your rescue which is an enhancement for the Windows console and solves many problems.

Aside from the tabs (which in itself is pretty great), Console adds copy and paste functionality to the command line along with several display tweaking options (color, transparency, etc.) and fully-configurable keyboard shortcuts.

You can download this from http://console.sourceforge.net/.

April 7, 2012

Techbits #13: Unix "vi" Editor - ZZ

Given the depth of the previous Techbit, let's make this a short one.

If you're working on Unix-based systems, you must have used the "vi" command at one or other point of time.

While using "vi" in escape mode, you can use ZZ (shift+zz) to save the file. I found this much more convenient than its equivalent ":wq" or ":wq!". However, the percentage of people whom I've seen using this is very less.

Now, what could be the reason as to why this did not become very popular? Some say that it could be because Ctrl and Shift keys are adjacent to each other due to which one might accidentally press Ctrl instead of Shift - this then pushes the current process (vi) to background due to Ctrl+z (the first z itself). All of a sudden, the user will see himself/herself at the command line prompt. This might confuse the users and hence it might not have been published or popularized so widely.

March 28, 2012

Techbits #12: AutoHotKey - Create and not just configure hotkeys!

You might have heard about hotkeys or used some application to configure/setup hotkeys for invoking your favourite applications.

AutoHotKey helps you achieve not just that but also much much more including automating almost anything by sending keystrokes and mouse clicks. Anytime you find yourselves repeating something again and again, it should trigger you to automate it and it is exactly where AutoHotKey comes handy. It appears a little bit daunting at first but I strongly urge you to overcome that initial inertia and start using the tool - it increases your productivity greatly and you'll really appreciate it.

Go to http://www.autohotkey.com/ and try the installer!

Provided below are few examples to get you quickly started. These code snippets have to be kept in the configuration (.ahk) file of AutoHotKey. Note that the lines starting with semicolon are comments.

Let's start with the simplest hotkey configurations.

Hotkey #1

; when you press Win+n (Windows key + n), run an application called "Notepad"
#n::Run Notepad

Hotkey #2

; when you press Win+m (Windows key + m), run an application called "Notepad++"
#m::Run Notepad++

Now, let's move on to a little bit more complex ones.

Hotkey #3

#g::
Run
http://www.google.com/search?q=%clipboard%
return

What does that do? When you press Win+g (Windows key + g), it constructs a URL with the clipboard contents and opens it - in this case, it googles for what's there in your clipboard.

Hotkey #4

#h::
Run
http://www.hindu.com/%A_YYYY%/%A_MM%/%A_DD%/10hdline.htm
return

When you press Win+h (Windows key + h), a URL is constructed using current year, month & date and opened using your default browser - hope it's Firefox by now ;)

Even more complex ones - note that this complexity representation is just on a relative scale and there are much more complex ones!

Hotkey #5

#p::
Run D:\Projects\Customer
WinWait
D:\Projects\Customer
WinActivate
Send ! x
Send !veo
return

When you press Win+p (Windows key + p), opens the specified folder in Windows Explorer, maximizes it (Alt + space + x) and opens the folder view (Alt+v+e+o).

Hotkey#6

#a::
InputBox, varInput, Please enter some random text...
Run, notepad.exe
WinWaitActive, Untitled - Notepad
SendInput, %varInput%
SendInput, !f{Up}{Enter}{Enter}
WinWaitActive, Save
SendInput, SomeRandomFile{Enter}
MsgBox, Your text`, %varInput% has been saved using notepad!

When you press Win+a (Windows key + a), well, instead of me trying to explain what's there, just go through it and you'll get an idea.

To summarize, this blog post just goes on to show how AutoHotKey acts like a Swiss Army knife and how much powerful it can be.

March 25, 2012

Techbits #11: Avoiding "Useless use of" commands in Unix

Let's check out another interesting Unix-related Techbit related to avoiding the usage of commands when they're not necessary.

Such usages are also fondly referred in "Useless use of ..." category awards :-) There're many varieties under this class like "Useless use of cat", "Useless use of grep & awk", "Useless use of wc -l" etc. Provided below are few.

Useless use of "cat"

cat file.txt | grep pattern can very well be expressed as grep pattern file.txt

Useless use of "grep"

ps -ef | grep java | grep -v grep can be ps -ef | grep '[j]ava'

ps -ef | grep java | awk '{print $2}' can just become ps -ef | awk '/java/ {print $2}'

Useless use of "wc"

ls -1 | grep pattern | wc -l can be written as ls -1 | grep -c pattern

March 17, 2012

Techbits #10: PuTTY Connection Manager

Ever wanted a "tabbed" version of the favourite Telnet/SSH terminal emulator PuTTY? Then this is for you.

"PuTTY Connection Manager" is built on top of PuTTY and has additional features like tabs, credential storage (encrypted) for auto-login etc. which help increase your productivity by a great deal, especially if/when you do not need the X GUI and CLI is more than sufficient to perform your tasks.

What's more?  It's completely free - not just for personal use but for commercial usage as well. And, it's a very good free alternative to a licensed product like SecureCRT.

You can download this utility from http://puttycm.free.fr/.

March 11, 2012

Techbits #9: Use "exec"

If you are working on Unix-based systems like Solaris and Linux, then this Techbit is for you.

When you are no longer interested in the current process and want to work on some other process, use exec to replace the existing process with new the one.

Where is it helpful? I often see people logging on to servers where they find that the shell is Bourne and type bash immediately. Nothing is done with the previous shell process plus there's an overhead to exit twice while disconnecting from the server. In such cases, use exec bash - not only are you going to be more graceful and respectful to using system resources but also increasing productivity by saving yourself from typing exit twice each and every time!

An addendum to the provided example is that if you find yourself repeatedly changing the shell every time you log in to a server, then you should change the default login shell once for all. Of course, this should be done only if the specific login is not being used by any process or application - changing the login shell in such cases would result in the application experiencing unexpected behaviour because it could possibly miss the shell and its start-up parameters thereby. This is a corner case scenario but it needs to be taken into consideration nonetheless.

March 3, 2012

Techbits #8: Audacity: Record & Edit Audio

Audacity is required for being honest. Audacity is required for being righteous. Audacity is required to stand by what is truthful. Audacity, as a tool, is also required for recording/editing audio too!

Interested in recording audio through your microphone - for example, to record audio books that can be used by the blind? Or how about editing it out to correct and strip out unwanted bits? How about creating your own audio clip by piecing together various snippets from your favourite mp3 audio/songs?

If you have answered "yes" to any of the questions in the previous paragraph, all that you would need is Audacity - I meant, the Open Source Software which can be used to record and edit audio.

It takes a little bit of your time to get accustomed to the functionality provided by Audacity and its usage - as is the case with getting introduced to any new tool. Once you make that initial investment of your effort, you would be glad you found this tool.

Go ahead and give Audacity a try at http://audacity.sourceforge.net/.

March 1, 2012

Scribe Requirement & Tips

This is a follow-up to the previous post titled "My first experience as a Scribe".

There is a requirement for scribes to write exams tomorrow and day after i.e. on March 2nd and 3rd. Further details on whom to contact and the address of the examination center can be found at http://helpinghandsorg.blogspot.in/2012/02/blind-people-need-scribes-for.html.

It was not so easy to find the required information on that website. Provided below are snippets taken from the same for easy and quick reference:

Finals:
2nd march >> 24 students for Sanskrit, 22 students for Telugu
3rd march >> 38 students for Sanskrit, 37 students for Telugu

Timings: 7:30 to 11:30 am
Place: Kasturba Gandhi College for Women,
Indira Gandhi college,
Govt Junior college,
Marredpally,
Secunderabad - 500026.

More details about this project:
Ajay Veesam : 8801975135
Karthik Reddy : 9494884929
Kiran : 8099523135
Buchi Reddy : 9885113404

Few quick tips that can be helpful if you are planning to be a scribe:
  1. Practice writing beforehand for an hour or two if you've lost the habit of writing.
  2. Do not hesitate to write an exam with apprehensions about your handwriting not being very good.
  3. Do not hesitate to write an exam with apprehensions your writing speed being very less.
  4. You can easily confirm the above (2nd and 3rd) fears by showing your sample writing to few friends!
  5. Plan to reach the examination center at least half-an-hour before the start time.
  6. If possible, take the standard set of pen, pencil, eraser & ruler along with you.
  7. Always keep a watch on time and your progress & pace to complete.
  8. Go and write the exam with as much (or more) sincerity as if you were to write your own exam.
Last but not least, enjoy the joy of giving!

February 29, 2012

Techbits #7: Port Scanning

What is "Port Scanning", why is it done and how can I detect?

Background

To start with something that actually happened, an incident was reported about an application going down in one of the deployments quite a while back. It was eventually found out that the problem occurred because arbitrary packets were sent to one of the TCP ports on the server and the application ran into issues while trying to process the same. The problem was subsequently resolved with a patch provided by the third-party framework that we were using.

What is meant by Port Scanning?

Now, what is meant by "Port Scanning"? It is a scan activity performed to find out what are the ports open on a particular host. This can be extended to perform port scanning on all the hosts reachable and residing on a network. It may include sending arbitrary pieces of information (read packets) to the ports which are found open.

What good can Port Scanning be of?

Coming to the second question of our topic as to why it is done, it can be done by anyone interested in finding out the possible entry points to a host i.e. to find out ways to "penetrate" or "intrude" into a network/system. At first sight, it could look like it's something that's done only by hackers. However, it is to be understood that this is the same mechanism used by security experts while gauging the overall security of the network and hosts - this is what seemed to have happened in the deployment referred in the beginning where the experienced scans were performed by a security team conducting the network/system hardening exercise.

How to detect Port Scanning?

Moving on to the last question of our topic, which is also referred to as "Intrusion Detection", there are several tools using which you can detect Port Scanning. Also, note that it is the Firewall which detects and prevents (Intrusion Prevention) such activities at the network level and filters them at the network entry point itself (from external world or in between VLANs).

The easiest of all is "snoop" which is available on most of the systems by default - which is the advantage since you don't need to install anything more. However, the downside is that it's not straightforward to do the detection using snoop alone i.e. it is an involved effort to do so. One helpful point to be kept in mind (when requiring to use snoop) is that the time window during which snoop is run should be minimized and pointed as much as possible.

Few helpful tools specifically in the domain of port scanning are listed below:
  1. Nmap - http://nmap.org/
  2. Snort  - http://www.snort.org/
  3. Nessus - http://www.nessus.org/
Note

A cautionary advise is that port scanning is not usually allowed in an organization unless there is a justified need. As such, proper care, restraint and appropriate notifications/approvals must be exercised before you start using these tools in the networks at your work

February 25, 2012

Techbits #6: Colasoft Network Packet Builder

If you are into networking - no, I do not mean social networking - networking as in computer networks, telecommunications, TCP/IP, then this post is for you.

Colasoft Packet Builder is a freeware tool that aids in creating, editing and replaying network packets. What can this be used for? To test how your application deals with a particular network packet, whether it works as expected etc. The application could be anything like an Element Management System (EMS), Network Management System (NMS), packet analyzer or even a protocol stack implementation.

Packet Editing & Replay is especially quite a handy feature to be of aid while debugging issues. The packets captured from live networks using sniffer tools like Wireshark (formerly known as Ethereal) can be edited and replayed using the tool i.e. they can be loaded into the tool, IP & MAC addresses of source & destination changed and resent.

A sample use-case in EMS/NMS scenario is as follows:
  1. An issue is reported from the customer's production deployment.
  2. The issue states that EMS/NMS is not processing/displaying a specific event/alarm.
  3. A packet capture / snoop is asked for.
  4. The received packet capture is loaded into the tool.
  5. The packet capture is edited to update the destination IP & MAC.
    1. 5.1 This is done to direct the packet to the EMS/NMS server in your lab environment.
    2. 5.2 The source addresses can also be changed optionally.
  6. The updated packet capture is then resent/replayed.
Now, you you can reproduce and debug the issue easily without requiring access to the problematic device or without feeling the necessity to debug or add more hooks to debug on the production server.

Colasoft Packet Builder can be downloaded from http://www.colasoft.com/packet_builder/.

February 23, 2012

My first experience as a Scribe

Turning to something which is not technical, this post is meant to focus on an even more important aspect: the necessity to feel responsible to help those in need. The responsibility increases further more if the need is because of the person being physically challenged.

I remember registering myself long ago on a web site as a scribe - a person meant to write an examination on behalf of someone with a challenge like blindness, disability in hands/fingers etc. However, I never got any message from them and as such never got any chance to act as scribe. Recently, I got a message forwarded to the group YFS Vikalang requesting for scribes to write the pre-final examinations of Intermediate 2nd year (equivalent to 12th Class) students studying in "Sai Junior College for the Visually Challenged" - which is what has led me to writing this post.

I opted to act as scribe for Telugu language exam as the number of people wanting to write in the regional language was less. The biggest hurdle for me is the fact that I lost touch with hand writing ever since I entered the software development field. As a preparatory step, I practiced to write some text in Telugu the night before.

The examination duration was conveyed as 3 hours spanning from 10 AM to 1 PM. I wanted to be there at the examination center well before time - contradictory to what I used to follow by arriving at the exact time or even a bit late when I wrote exams as a student! I had, hence, started at around 8 AM since the center was quite far from where I stay. It took almost 2 hours to reach and find the place as the locality was like a maze with streets going all over! I arrived at the center eventually by 3 minutes late at 10:03.

Abhinay was the student for whom I set out to write the exam. It started with me initially walking Abhinay through the entire question paper and marking the ones he would be interested in answering. As planned, I tried my best to write the answers as fast and as neat as possible. Due to not writing for so long in so many years, my fingers and hand pained a lot (the pain lasted for 2 days, by the way). However, it still felt good as it was for a good cause.

Abhinay was pretty good when compared to all the other students around. His only downside was that he was a bit slow in recalling and telling me what to write. I kept a watch on the time all the while though. When I realized around 12 noon that there was a good chance of not being able to write all the answers, my dusty brain was quick enough to recall and follow an old trick: to write answers for all the bit questions on a separate sheet and make it ready to attach it to the other sheets in case the examiner snatches the paper away. My guess turned out true. Though time was given till 1:30 PM, we could not answer all the questions. The total number of answer sheets came to a mighty 12 (twelve) - probably the highest in the entire classroom! And, we answered only 70-75% of the questions!!

I told Abhinay after coming out of the classroom that I could not write quick enough to answer all the questions. To my surprise, he honestly pointed out that it was his fault as he usually takes more time to recall and thus lags behind. I inquired if I could accompany him to his room (the hostel also appeared to be co-located) to which he negated and told me he would go by himself. It felt quite painful to leave his hand that I was holding - making the pain in my hand and fingers feel like nothing.

I wished Abhinay the best for his finals and proceeded to travel back.It was about 3 PM by the time I reached home. All in all, it was a day well spent and was wonderful experience for me as a scribe.

The intent of this post is to inspire people to come forward to support one another. At the end of this reading, even if one individual gets motivated and if that motivation leads to helping at least one other person, this post is worth it.

February 21, 2012

Techbits #5: Browsing difficulties due to improper text font, size or color?

Tired of tiny text while browsing? Feeling difficulty reading text due to font and background color?

Zoom In : Ctrl + (hold Cntrl key and press + key)
Zoom Out : Ctrl -
Zoom Reset : Ctrl 0 (Zero)

If you are a Firefox user, you can set zoom size percentage and background color either on a a per-site basis or global level through NoSquint.

There are also other add-ons available for improving the readability like Readability. In a similar manner, readability enhancement extensions are available for Chrome as well.

February 19, 2012

Techbits #4: How to compare excel sheets?

In case you ever wondered about how to compare excel files/sheets, then this is for you.

A quick Google search leads you to lot of tools many of which are commercial. There do exist open source utilities as well like Spreadsheet Compare. Another tool is Office Diff that can be used to compare other file formats like word (doc) also apart from excel (xls).

Note that the former was found to be not working in some cases while the latter was not as rich as the former. Given this, the following approach is what I would recommend that works always. You do not need any tool to perform the diff although it might be a little bit more involved and not as straightforward. All that you'd need to do is to:
  1. Export the excel sheets to tab-separated or comma-separated text files.
  2. Use any text diff utility like KDiff3, which was shared previously, to compare the text files.
That's it! You're ready to compare excel files whether they are holding your work related data like project requirements or personal data like expenses, track sheets etc.

February 18, 2012

Techbits #3: Firefox & its wonderful world - make it yours too!

Firefox - one of the best open source tools that one can come across and which has gained a lot of widespread acceptance. Its rich repository of "Add-ons", driven by and contributed by communities all over, is a huge plus above all. It makes browsing so much more productive and delightful. It is your friendly neighborhood spider on the web and keeps you safe on Internet. Tabbed browsing is another feature that was available since quite a while. Yes, there are a lot of beautiful adjectives used here but not without a reason. I'll halt here though we can keep going on & on, and talk about many more of its features & aspects.

For those migrating from Internet Exploder - err, Explorer, there would be a bit of Newton's first law (inertia) coming into picture. But, I'd like to encourage you to make that first move after which you can feel the change yourself. And, yes, there's Chrome as well alongside - let's not divulge into the war of which one is better though. Personally, I've been a user of Firefox since almost its inception in 2005.

Why wait? Go to http://www.firefox.com/ and try Firefox now!

Provided below are some of the helpful Firefox Add-ons that I use and benefit from.
  1. Enhance your tab browsing capabilities using Tab Mix Plus
  2. Irritated by ads and banners? Go for Adblock Plus
  3. Have a site that works only with IE? Embed it in Firefox through IE Tab 2
  4. Hide almost anything via context menu 'Remove Object' through Nuke Anything Enhanced
  5. Save Web pages or specific sections (text/image), and organize in a collection using Scrapbook
  6. Save webpages (visible portion or complete) as images through Screengrab
  7. Deal with all the included JavaScript (JS) & Stylesheet (CSS) files very easily through JSView
  8. Powerful set of tools to assist primarily with your web-based development using Firebug
  9. Backup your profile (settings, add-ons etc.) through FEBE
  10. Easily copy a hyperlink and/or its text in various formats using CoLT
  11. Protect your privacy - see who's tracking your web browsing and block them with Ghostery
  12. Restart Firefox with ease using Restart Firefox
  13. Allows URI texts written in webpages to be loaded by double clicks using Text Link
  14. Manage and accelerate your downloads using Down Them All

There are many many more Firefox Add-ons available that you could choose based on your choices and requirements.

February 15, 2012

Techbits #2: KDiff3 - Visual & Recursive Diff Utility

Visual utility whether it be IDE for managing your codebase or something else is always desired. In the same context, a visual representation is also quite helpful when you want to compare files or directories, and this is exactly where the utility KDiff3 comes into picture.

KDiff3 provides a wide range of features like:

  • File Comparison / Diff - Two-way (two files) and Three-way (three files)
  • File Merge
  • Integration with Windows Explorer - invoke the diff directly with a right-click
  • Integration with source code control software like Rational ClearCase and Subversion
  • Directory Diff / Folder Diff - Traversing folders recursively and performing folder & file comparison

The last of the aforementioned features, Directory / Folder Diff, is quite handy. It means you'll be able to select two directories and do a diff between them recursively - it'll tell you in what way are the directories differing i.e. which files are present, not present, present & same, present & different. It will also then let you transition and inspect the differences between a specific file in the two directories.

Note that the usage of the tool will not only increase your productivity but also reduce any mistakes or overlooks if you do the comparison manually. Apart from KDiff3, there are other mechanisms as well like the in-built diff functionality of Eclipse (if you use Eclipse as your IDE - but this option falls out if all you are interested in just file diff rather than code diff) and tools like WinMerge. Personally, though, I found KDiff3 very handy of all of them.

KDiff3 is officially hosted at http://kdiff3.sourceforge.net/.

February 12, 2012

Techbits #1: Notepad++

Let's get the ball rolling!

Here we go with our first Techbit, one of my favourite open source utilities: Notepad++.

Notepad++ is a Free and Open Source Software (FOSS) editor with lot of rich functionality. It provides you with a lot more functionality than the editors available by default on your operating system i.e. than Notepad or Wordpad if your computer is running Windows.

Yes, there are other editors like EditPlus and TextPad. However, these are commercial applications and are supposed to be used only on an evaluation basis - unless you want to buy them from thereon. With the ethical nature of application usage after the completion of evaluation period being one reason, the other reason for you to start using Notepad++ is to encourage Open Source.

Notepad++ can be downloaded from http://notepad-plus-plus.org/.

February 11, 2012

Techbits

Coming out from Hibernation

Following the last message that was posted on the blog, it was mentioned that I would be posting very soon - it was almost 5 long years ago though. Does it mean that "very soon" is about 5 years? I decided to come out of the self-imposed slumber and hibernation finally. You'll be seeing regular updates on my blog from now onwards.

Techbits

A new initiative "Techbits" is going to be taken, the intention behind which is to give back to the online society. All this while, I have only been consuming by searching for solutions and tips from various sites and blogs whenever I encounter issues. However, I've decided to start contributing instead of just consuming.

What is the objective of Techbits?

To share the solutions to the problems I encountered, useful technical tips that will introduce you to new tools, new ways of doing something and improve your productivity.

Why is the name sounding like tidbits - can I eat them?

To go into the origins of the initiative name, it started with "Technical Tips", then changed to "Tech Tips", then to "Techtips", then to "Tech tidbits", then to "Techbits" eventually which looked kind of good - as it is an amalgam of Technology (which has greatly changed all of our lives) and Bits (which are the basic units of representation in computers).

With regards to the latter part of the question, you cannot eat - you've to digest them by understanding though :-) Also, I google'd and found this name being used already by some groups - I assert, however, that the idea of coming up with the name was original!

Stay tuned for further updates.