Archive for the ‘tech funda’ Category
Batch file to loop through folders and list the files in them
set source_path=D:\test set include=*.txt FOR /R %source_path% %%G IN (%include%) DO ( ECHO "%%G">> filenames.txt )
Command to find a file pattern and delete it
If you connect a virus affected pendrive to your linux machine you would see .exe files. Those are the viruses.
Fortunately you can clean the pen drive in Linux and hence use the pen drive back in windows using the following command:
find . -name *.exe | xargs /bin/rm -f
New Google Bomb?
Searching for exit in google.com brings up link to yahoo.com in the first page of the search results. Though not the first result this could be a upcoming google bomb.
Interestingly, Bala pointed out that searching for exit yahoo.com brings up google.com in the front page results.
Are they metaphorpically indicating the end of their competitor in the search engine market?
Going back to Windows.
I don’t intend to write a FUD article supporting either Windows or Linux.This opinion is based on my personal experience.
Every once in a while i would take the decision that i wouldn’t use Windows any more and install some Linux distro.I would use it and after some time i find myself creeping back to windows.
When i installed the first time linux on my machine i didn’t have a Internet connection.This made it really difficult to install new apps.For non linux users:Installing application in linux is slightly different from that on windows.On Windows we would have a setup.exe for most of the applications that would take care installing all that’s needed for the app to run on your machine.But on most of the linux we have a package manager through which we would download and install the apps. For any app to install the installation of its dependencies is a prerequisite.The package manager takes care of downloading and installing the dependencies for you.But the problem i had was that since i was not having a Internet connection i had to manually download all the dependencies somewhere and install them. Imagine a six layer dependency tree.So with out internet connection its a bit difficult living with linux.
The other major concern why i would switch back was performance.I have a modest 256 MB RAM,Pentium IV,40 GB hardisk machine.This is a decent configuration for running windows XP.With Windows XP my machine never slows down unless i have more than one big software running simultaneously.But for linux the above stated configuration is the minimum required.The ubuntu live CD didn’t even install with this configuration.I had to use the alternate CD(text based installer) for installing it.Never have i got the apps running fast in linux.Even with only firefox open the speed would be very much less on it.So if you have not so bleeding edge hardware most of linux will be slow.
I am currently on Xubuntu which is ubuntu with Xfce desktop environment.This is supposed to be a fast OS because of its Xfce advantage.But even this is slower than the Windows XP professional.
I know there might be exceptions.I read somewhere slackware running on a 90 MB RAM.But slackware is 6 cd download! I wouldn’t try it until i get extremely bored
.
Python.org, Python.com Opera makes a confusion
Our Hero gets little bit geeky and decides to tryout google app engine.He finds out that he would need python to work on google app engine.His habit is using the i am feeling lucky feature of Firefox address bar, he would type in only “python” in the address bar.And he typed it not in Firefox but in Opera.And Opera brings up python.com instead of python.org.Guess what, python.com happens to be a porn site.Whats more, he is seated in between his manager and a girl.Never know whether they peeped into his monitor.
switch statement- Java
Why should switch statement ever fall through?
That is if we don’t give a break; in switch case the program flow goes to the next cases and executes them also.
Wonder why this redundant break; needs to be given.When the idea is to do switch case statement something like if else if statement.
we could have it like : if at all the programmer needs the flow to fall through to next case why don’t they specifically say a continue;
Wikipedia and Orkut Scripts
User script for hiding the donation banner for Wikimedia on Wikipedia pages.
Install This Script
User script for stripped down version of Orkut:
Removes the glaring headings,footer,images and an unnecessary invite friends box.Along with giving it a cool gray scale theme.
Install This Script
Ps:You need to have Greasemonkey Add-on installed on Firefox to install these.
I wrote these 2 scripts sometime back to get the job done.(Which essentially means code ugliness
) You could change it yourself if you want something more to be done.
Gophers still exists
How many of us ever know that there was something called as Gopher,veronica ,WAIS etc, that existed in early 1990s.The huge hit of WWW and its powerful and simple language HTML, put Gopher and other early Internet Technologies to the back burner.Gophers are still around–supported by a few enthusiasts and hobbyists.It exists just like an old superman living in the past legendary memories.I just cant keep away from characterizing the technologies.Think of gopher as plain village gentleman who was good enough and in came the Dude from the City(WWW )with his flashy attire(HTML) took away all the fascination of the people towards him.And the Village Heads(IE)sneakily made the village gentleman to go away.(IE actually stopped supporting Gopher from IE5 onwards.Even though they supported initially it later offered the fix disguised as a “security” fix to remove the support of gophers. We would be able to manipulate the registry and even this is not possible in IE7 as it stripped away the gopher support at the code level itself.FF still supports Gopher.you could see gopher sites in FireFox 1.5 upwards)
Gophers could be what the doctor ordered for the low bandwidth networks such as mobile networks.But since the network speeds and bandwidth are fast increasing due to the better infrastructure the return of the Gopher is a distant possiblity. gopher://gopher.quux.org/ is one of the few gophers that still exist.
Recipe for a dashing Firefox
Firefox thats as dashing as superstar and as versatile as kamal hassan is just 5 min away from you.
Ingredients needed:
1:a good measure of patience and enthusiasm
2:a good decent internet connection
3:All the time in the world to explore the extensions.
so here we go:
- go to tools->addons in your firefox browser
- click on get more extensions link
- search for harley davidson theme and install it.
- go to recommended addons in the page
- install everything thats inevitable for you.
thats it.You have a bloated beast at your service.
Some addons you might consider other than the recommanded ones:
1:IETab you can switch between how the page will look in IE and FF
2:Tab Effect to give a flip effect when moving between tabs.
This was how my ff looked when i installed all that i required:
How to send eMail as BillGates and other things
It is easy to spoof email because SMTP (Simple Mail Transfer Protocol) lacks authentication. If a site has configured the mail server to allow connections to the SMTP port, anyone can connect to the SMTP port of a site and (in accordance with that protocol) issue commands that will send email that appears to be from the address of the individual’s choice; this can be a valid email address or a fictitious address that is correctly formatted.
So here’s how one can send spoof mail acting as Bill Gates or whoever for that matter:
1.find your target!.square in on the person to whom you will be ending the spoof mail.for example let us take the person’s mail id as exampleid@examplesite.com.Take note of the domain name(i.e., the part of the mail id that follows @).Here in our example it is examplesite.com.
2.We have to find a mail exchange servers for this domain for which we can use nslookup.This is how you do a nslookup:
open command prompt in windows, type nslookup and
enter.Now you would see a prompt like >.Type set type= mx
and enter.Now type the part of the mail id you noted down
earlier.ie.,in the example its examplesite.com
you would get a response similar to this:
Non authoritative answer:
examplesite.com MX preference = 10, mail exchanger =
server3.mx.examplesite.com
examplesite.com MX preference = 20, mail exchanger =
server2.mx.examplesite.com
pick one of those servers and note it down.In the example case
it is server2.mx.examplesite.com.type exit and come back to
command prompt.
3.So now you have the Mail Exchange server to which you have to connect to.
4.To connect to the server we can use telnet.So type
telnet <servername> 25 and enter.In example case it is
telnet server2.mx.examplesite.com 25
you would get a 250 response which means OK state.And some custom message from the mail server.
5.From here on you need to type in fast and without mistakes,i would suggest typing in notepad before and pasting it when required.
type MAIL FROM: email address you want to spoof as>
for eg case:
MAIL FROM: billgates@microsoft.com
you would get a 250 response then type the following:
RCPT TO: <recipient email id>
for eg case:
RCPT TO: exampleid@examplesite.com
again you would get a 250 response.Now type DATA and press enter.Here you would type the header details of the mail you want to send.Type in the following details note down the spaces and colon also.
Subject: anything you want as subject goes here
To: put the Name and address of the recipient here.
From: Your Name can be as long as you want, but must be followed by an address.
Reply-To: Your Name can be as long as you want, but must be followed by an address.
for example case:
Subject: I am giving away Microsoft to you
To: exampleid <exampleid@examplesite.com>
From: Bill Gates <billgates@microsoft.com>
Reply-To: Bill Gates <billgates@microsoft.com>
Now press enter and start typing your message as soon as you
finished typing in the message press an enter and a .(The period
character is the SMTP terminate Character)
then type QUIT
for example case:
Hey buddy i got bored with my Microsoft so i am giving away it for you.
.
QUIT
yippee you have sent your first spoof mail by now.



