Wednesday, January 5, 2011

Protect USB Flash Drive with Password Lock

USB Safeguard enables you to encrypt and password protect sensitive data on your USB drive. You can selected one or more folders to be encrypted and choose to securely delete the original (unencrypted) files with the built-in file shredder.

usbsafeguard protect usb encrypt password Protect USB Flash Drive with Password Lock

Lock your USB Pen Drive with Password : USB Safeguard

ProtectyourUSBFlashDriveContentswithPasswordLock Protect USB Flash Drive with Password Lock
Simply drag and drop files and folders to quickly protect your sensitive documents, and then enter an password to encrypt and decrypt the files that you want to protect from prying eyes.
LockyourUSBPenDrivewithPasswordUSBSafeguard Protect USB Flash Drive with Password Lock
The program also includes a handy Safe Browsing feature that allows you to launch Internet Explorer without leaving any Internet traces on the host computer. Other features include an on-screen keyboard for secure password input and free space wiping.
Download USB Safeguard : Click Here
USB Safeguard uses 256-bit AES encryption to protect your date. The program is not installed on your PC, it runs directly from your USB pen drive.

Loading time improvements with Javascript

This is another tidbit for coders.
(To be honest, I'm just finding enough time to do some finishing touches for my drafts which are gathering dust and post them here!)

We come up with new hacks, invariably with a javascript file attached. You add all the hacks, end up with a truckload of javascript includes and thus, a longer loading time.

THE ROOT CAUSE
The real problem is the sequential nature of XHTML. XHTML is parsed a tag at a time. So, if you have a couple of lines like this:


the files are loaded as follows:
The parser first encounters the first script tag. It then slowly retrieves script1.js and loads it into memory, which takes a lot of time. The parser thinks this is the best time to take a nap and doesn't proceed to parse the next script tag until the current download of script1.js is finished.

See the circled portion above. Never mind the loading times. The stuff to notice is that scriptaculous.js doesn't start loading until prototype.js finishes loading.
Now, we have a hell lot of bandwidth going wasted during this time. We can do other activities in parallel. But how to do it?

THE FIX
The simple answer: Load the scripts asynchronously!
I call it EOF. EOF for Execute-Open-Forget. (Well!! These things ought to have a geeky name!) We execute a javascript function, request for a download of script1.js, forget it, and execute the function again with another argument for a download of script2.js

The result is very evident from the following graph below.
Again, don't worry about the load times of singular files. We cannot improve it for the user. But check out the total time taken for the two javascript files circled. It is lesser because the second one starts even before the first one is finished. This difference will be evident if the javascript files are large and takes a few seconds to load.

Now you might be asking how to make it an EOF?
That's what Javascript is here for. We use Javascript to load a Javascript file. It cannot get weirder.

Check out this nifty function:



Now you can load any number of functions using the function.
You just have to add the calls wherever you want


This can go anywhere in the code, including onload event.

BE SMARTER
This technique can be used cleverly in specific situations.
For example, you may be using some JS libraries for some of your hacks. If the hacks don't show up during loading and does only when uses does some action, we can set a timer to load the script in background after, say, 5 seconds. The main page will be loaded in a jiffy, and the user will be effectively hoodwinked.
This will result in a really critical timing issue, if not handled carefully. Too much of timeout, and the user may get ample time to tamper with the related hack before the script is loaded.

You can also place the loadScript() call at some convenient place in the HTML code. It can be as far as the bottom portion of your HTML just before body tag, so that the page is rendered very fast. (Again, the above problem holds good here also.)

CAVEATS
Everything comes with a price. This too has its own deficiencies. Some which I know of:
1. This one is because of the different behavior of IE. IE and Firefox both can download scripts in the manner specified above. The difference is that IE executes them in the order they finish downloading, whereas Firefox executes them in the order they are appended to the DOM.
This means that your scripts cannot have dependencies on each other in IE. You can get away sometimes, if you are not using the script files until long after loading. (An example is my AJAX Labels Hack)
Update: You have to be really careful that you don't allow the user to make calls to a particular function in the dependent script in that case. The only advantage that you can get is a slight improvement in overall loading time.
2. You can download more than two files at the same time only if they are from different domains or subdomains. Normal browsers (including Firefox) can open only upto 2 simultaneous HTTP connections to a domain. If you try to download too many files at the same time, you may even witness bottlenecks. So use this discreetly.

ET AL.
There are many more ways of improving load times:
1. Compress the javascript file. There are umpteen ways of doing that. Refer to my previous post.
2. Check this link out: Speed Up Your Javascript Load Time - BetterExplained

10 Tools that a Web Developer Thought to have

I'm alive, but not kicking. I'm dead lazy nowadays. Don't ask me why, but I just am into several other things.

Anyway, to break the ice (again), I'll start with a tip for the budding developers out there. Most of the seasoned folks already know about most of these tools. This is just my personal list of essential tools used for my web development.

1. Mozilla Firefox
If you love customizations, Firefox is the browser you want. It is not "the" complete browser around, but its extensibility is enough to make it a clear winner.
As I read somewhere out on the internet, Firefox's secret is the same as Jessica Simpson's: it's chic style is the result of... ahem... extensions.

The single best thing that I love about Firefox is extensions... extensions for any damn thing you can do in the universe (Except, maybe, brewing a cup of coffee )
In fact there are so many Firefox extensions around, that your head will spin.
Now the interesting part. Even you can create an extension yourself. You just have to have a basic knowledge of XUL and Javascript, which is so easy to be called a trifle.
Firefox is a much better browser than Internet Explorer (On second thought, a real browser unlike IE, as Aditya once pointed out.)

So what are you waiting for? Just dump Internet Explorer and start using Firefox.

2. Firebug
This was the first extension I looked for after I installed Firefox in my new laptop at office. I cannot live without this extension. This is a very desirable tool for any web developer.
It lets you inspect and edit HTML, change the CSS style on the fly, debugs javascript code and even monitor the loading times of the components in a web page.

I'm particularly impressed with the CSS/HTML editing on the fly, because I can perfect the CSS without the toiling job of saving the page-loading-saving again.
The AJAX debugging capabilities are also too good. I still don't know of any other method to debug AJAX calls.

3. IE Tab
This is for those people who just can't ignore their readers who still use Internet Explorer. Even if I loathe IE, I can't turn a blind eye towards that pathetic software which calls itself a browser.
This Firefox extension adds an option to open in IE Tab in your Status Bar and in the right-click menu.
If you open in IE Tab, it uses the rendering engine of Internet Explorer, so you will get a view just like in IE, without going out of the luxury of Firefox.
This is useful to fix the nasty IE bugs.

4. Ning
Ning calls itself a personal Social Network creator. But it is more than that. It can do a lot of things like hosting server side scripts for free. Of course, I know it is not all that Ning can do.
I myself am not very much aware of the power of Ning, because I haven't ventured into those seas yet. I'm still in a learning phase with Ning.
Several of the PHP scripts of the bleet are hosted in Ning:
a. Wrinks
b. Javascript Minify
c. Native Search Suggest

All I can say is that very few people have usefully tapped Ning's power.

5. Macromedia Dreamweaver
I'm so spoilt by this software that I can't think of anything else to edit my XHTML/CSS/JS code. I don't use it for any pleasure other than proper syntax check and coloring while I code.

6. TidyJSON
Programmers working with JSON feeds encounter a very irritating problem. The feed you get will usually be a one-liner, and it is a toilsome, if not impossible effort to check the objects inside the JSON feed. This is where TidyJSON comes in handy.
It is a commandline utility to read JSON from a file and format it with good coloring and indentation. Working with JSON will never be the same!

7. URI Encoder
You will definitely need this if you are posting some code in your blog. You'll need to convert all those tags to corresponding URIs. There are umpteen number of online tools to do that. This is just one of them.

8. Javascript Compressor
You can always save some valuable load time by compressing your JS code. This basically removes all unnecessary stuff like extra newlines, comments and renames some variables, so that you end up getting a much smaller file size.
For those crazy ones, you can obfuscate the code too. I don't do that. I want my readers to read and understand the code, if they want.

There are umpteen number of static compressors out there. One which needs particular mention is Stephen's JScripts Minify. It is a dynamic Javascript compressor which requires you to just host the original JS file in jscripts.ning.com and access the file with argument ?minify. Check his post for more info.

9. JavaScript Code Improver
This does just the reverse of the previous. This converts compressed or obfuscated code into a more readable format. Very useful in reverse engineering.

10. The Prototype API document
This is a very useful document for people who use Prototype library extensively. Available as a PDF document as well as a sidebar extension for Firefox.

Configure Cisco Router


Well this is going to be a two part hack. I configured a cisco switch for 3 diffrent VlAN's I'll be using 2 of the VLAN's please look at the config for any questions this is on a Catalyst 3500 XL switch.

Continue with configuration dialog? [yes/no]:
% Please answer 'yes' or 'no'.
Continue with configuration dialog? [yes/no]:
% Please answer 'yes' or 'no'.
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started.


Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int
% Incomplete command.

Switch(config)#
Switch(config)#interface ?
FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Multilink Multilink-group interface
Port-channel Ethernet Channel of interfaces
VLAN Switch VLAN Virtual Interface
Virtual-TokenRing Virtual TokenRing

Switch(config)#interface
% Incomplete command.

Switch(config)#interface Fast
Switch(config)#interface FastEthernet0/1
Switch(config-if)#?
Interface configuration commands:
arp Set arp type (arpa, probe, snap) or timeout
bandwidth Set bandwidth informational parameter
carrier-delay Specify delay for interface transitions
cdp CDP interface subcommands
custom-queue-list Assign a custom queue list to an interface
default Set a command to its defaults
delay Specify interface throughput delay
description Interface specific description
duplex Configure duplex operation.
exit Exit from interface configuration mode
fair-queue Enable Fai
help Description of the interactive help system
hold-queue Set hold queue depth
keepalive Enable keepalive
load-interval Specify interval for load calculation for an
interface
logging Configure logging for interface
loopback Configure internal loopback on an interface
mac-address Manually set interface MAC address
max-reserved-bandwidth Maximum Reservable Bandwidth on an
media-type Interface media type
mtu Set the interface Maximum Transmission Unit
(MTU)
mvr MVR per port configuration
negotiation Select Autonegotiation mode
no Negate a command or set its defaults
port Perform switch port configuration
power power configuration
priority-group Assign a priority group to an interface
random-detect Enable Weighted Random Ea
Interface
rmon Configure Remote Monitoring on an interface
service-policy Configure QoS Service Policy
shutdown Shutdown the selected interface
snmp Modify SNMP interface parameters
spanning-tree Spanning Tree Subsystem
speed Configure speed operation.
switchport Set switching mode characteristics
timeout Define timeout values for this interface
transmit-interface Assign a transmit interface to a
receive-only
interface
tx-queue-limit Configure card level transmit queue limit
udld Configure UDLD enabled or disabled and
ignore global
UDLD setting

Switch(config-if)#^Z
Switch#
00:13:29: %SYS-5-CONFIG_I: Configured from console by consoleshow vtp
status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 254
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xBF 0x86 0x94 0x45 0xFC 0xDF 0xB5
0x70
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- ---------
--------------------------
1 default active Fa0/1, Fa0/2, Fa0/3,
Fa0/4,
Fa0/5, Fa0/6, Fa0/7,
Fa0/8,
Fa0/9, Fa0/10, Fa0/11,
Fa0/12,
Fa0/13, Fa0/14,
Fa0/15, Fa0/16,
Fa0/17, Fa0/18,
Fa0/19, Fa0/20,
Fa0/21, Fa0/22,
Fa0/23, Fa0/24,

1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode
Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- --------
------ ------
1 enet 100001 1500 - - - - - 1002
1003
1002 fddi 101002 1500 - - - - - 1
1003
1003 tr 101003 1500 1005 0 - - srb 1
1002
1004 fdnet 101004 1500 - - 1 ibm - 0
0
1005 trnet 101005 1500 - - 1 ibm - 0
0
Switch#vlan database
Switch(vlan)#vtp server
Device mode already VTP SERVER.
Switch(vlan)#vlan 2 name test
VLAN 2 added:
Name: test
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --
1 default active Fa0/1, Fa0/2, Fa0/3,
Fa0/4,
Fa0/5, Fa0/6, Fa0/7,
Fa0/8,
Fa0/9, Fa0/10, Fa0/11,
Fa0/12,
Fa0/13, Fa0/14,
Fa0/15, Fa0/16,
Fa0/17, Fa0/18,
Fa0/19, Fa0/20,
Fa0/21, Fa0/22,
Fa0/23, Fa0/24,

2 test active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode
Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- --------
------ ------
1 enet 100001 1500 - - - - - 1002
1003
2 enet 100002 1500 - - - -
1002 fddi 101002 1500 - - - - - 1
1003
1003 tr 101003 1500 1005 0 - - srb 1
1002
1004 fdnet 101004 1500 - - 1 ibm - 0
0
1005 trnet 101005 1500 - - 1 ibm - 0
0
Switch#vlan database
Switch(vlan)#vtp server
Device mode already VTP SERVER.
Switch(vlan)#vlan 3 name test2
VLAN 3 added:
Name: test2
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int vlan2
Switch(config-subif)#management
Switch(config-subif)#
Switch#
00:19:43: %SYS-5-CONFIG_I: Configured from console by consoleconfig t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa
Switch(config)#int fastEthernet 0/5
Switch(config-if)#switchport access vlan2
^
% Invalid input detected at '^' marker.

Switch(config-if)#switchport access vlan 2
Switch(confi
Switch(config)#inter
Switch(config)#interface fast
Switch(config)#interface fastEthernet 0/6
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/7
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/10
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/11
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fastEther
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#end
Switch#write
00:23:15: %SYS-5-CONFIG_I: Configured from console by console memorey
^
% Invalid input detected at '^' marker.

Switch#write memory
Building configuration...
[OK]
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4,
Fa0/8, Fa0/9, Fa0/13, Fa0/14,
Fa0/15, Fa0/16, Fa0/17, Fa0/18,
Fa0/19, Fa0/20, Fa0/21, Fa0/22,
Fa0/23, Fa0/24, Gi0/1, Gi0/2
2 test active Fa0/5, Fa0/6, Fa0/7
3 test2 active Fa0/10, Fa0/11, Fa0/12
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
Switch#

SSH Tunnel


I figured I will do a quick post on SSH Tunnel. I will be tunneling to the wcosug server using putty. I configure tunnels on putty as such
Photobucket
Then I configure my web browser to use it as a proxy.
Photobucket
Any viola an SSH tunnel. In the future I will go into more about using it as say a RDP tunnel and etc...

News..............

I apologize for all those broken promises of new hacks. I have a plethora of ideas, but I'm so busy with a lot of "more important things", that I'm not finding time to code at all. I'm afraid this trend will continue for another couple of months. All I can do now is assure you that this blog is not dead.

I would like to request all of my readers to subscribe to my feed, so that you will know when another hack comes up here. During this time, I will continue to support my existing hacks. I will respond to any queries or bugs within a week (Under normal circumstances). I am planning to buy some web space too to support my hacks further (Especially get rid of the Googlepages bandwidth problem). But there won't be any substantial progress until after one or two months.

BTW, there is an update in my quote of the days widget to support more number of quotes. To add to that, I would like to make something clear about that particular hack. Several people have tried to compare that to the random quotes widgets found all around the web. There is stark contrast between my widget and those in the following aspects:
1. I don't like the idea of quotes changing for every refresh of the page. This one doesn't change. It only changes with your calendar.
2. You can write your own quotes, rather than some bullshit from those quote pages.
3. This one goes in a cyclic manner through your quote list. So you never ever miss displaying any of your quotes.