Techologie

Making Technology Easier To Make
RSS icon Email icon Home icon
  • Disable Firefox and IE autodialing of connections

    Posted on June 24th, 2009 Somesh Mukherjee No comments

    You’ve probably had this probablem atleast once in your life. You sit surfing the net gladly and suddenly, nothing is working. The sites don’t load. Google’s gtalk messenger says not connected. You run around. Press refresh a couple of times but bang: everything’s failed. So what happened. There is that little autodial window of Firefox which comes up prompting you to dial an Internet connection when you already are connected to the Internet Ayways….

    Its irritating cuz as long as that window is up, IE or Firefox have no access to the net. Its as if there is no net connection. So you can’t access the net and you don’t figure out what’s going on. Even if you are not surfing but You can’t disable it using firefox’s options, if you have tried because this is something Windows does.

    So how to get rid of it?

    Here’s it quick for l33ts: Internet Explorer(Yes Internet Explorer)>>Tools>>Internet Options>>Connections>>(Check) Never dial a connection

    A step by step for us lesser mortals:

    1. Open Internet Explorer. If you use firefox, you still need to open Internet Explorer. IF you can’t see it. Click on Start and then run and type “iexplore.exe”. In Vista, and seven, just click on Start and type  iexplore

    2. Click on tools in the menubar or press Alt+T.

    3. Click on Internet Options. You should see a box come up

    4. There is a connections tab in the box. Look just below the title bar. There should be a connections tab. Click on it

    5. Finally Click on the radio box never dial a connections. There should be a black dot before it. Click Okay.

    There its done. Painless, wasn’t it?

  • Automating Internet Connections using Rasdial

    Posted on June 18th, 2009 Somesh Mukherjee No comments

    Rasdial is a nifty command for those who have free internet connectivity at a certain time of the day. Like many windows commands, it is useful for automating GUI tasks. When you use the windows dialer for connecting to the Internet, you generally need to Enter your username and password and Click on connect to connect to the Internet. Dialup connections require you to additionally Enter the phone number. Ofcourse, you can save all this stuff, but it doesn’t change the fact that you nevertheless, need to click connect. Its not much of a pain, frankly. The problem comes, if you have a plan that allows you free usage at a certain time of the day(generally night). Most of us would like to schedule long downloads for this time. This would require you to be present on your computer to connect to the Net, and disconnect when the time is up.

    Rasdial can help automate this task.

    The syntax of Rasdial is as follows

    rasdial entryname [username [password|*]] [/DOMAIN:domain] [/PHONE:phonenumber] /CALLBACK:callbacknumber [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

    I am assuming you use a cable/DSL connection which establishes a LAN with your system using your modem/router.

    So you have probably already established that connection on your computer

    To connect using it, use the following syntax

    Rasdial connectionname <username> <password>

    If you don’t know the connection name, just type ncpa.cpl in Start>>Run or if you are using Vista/Seven, just click start and type it and press Enter.Rasdial 1

    In our case, this happens to be BSNL. So we will type

    Rasdial BSNL username password

    Now for automation, Enter this line in notepad and save it as .bat, say connect.bat in a directory, say C:\connect\You can schedule this file to run at a given time using the at command

    at 22:30 “C:\connect\connect.bat”

    Note that you need elevated privilidges to run the at command, so you must be using an admistrative account, and Vista and Seven, you must trigger UAC yourself, since cmd doesn’t trigger UAC by default. To do so, in Vista/Seven, Click on start, type cmd. CMD appears in the list, Right click and click on Run As Administrator

  • Finally a wordpress to blogger converter

    Posted on June 1st, 2009 Somesh Mukherjee No comments

    Are you one of the guys who started on blogspot, moved to their own little site on wordpress and one day thought “How nice it would be if I could have a copy of my blog on blogspot as well. Well maybe not but you might want to just switch over to blogger from wordpress(for the purposes of sheer traffic). Whatever be your reason, earlier it was impossible to convert from wordpress to blogger. Blogger to wordpress was easy to go, but the other way around…nah nah!

    Why? Well simply because people didn’t see much sense in going from wordpress to blogger. It made sense the other way. You wanted customization, freeedom and all that. But the other way. Why the hell’d you want to do that? Its obvious. Most bloggers don’t get traffic for the first year or two. Blogger gives you traffic, lots of it especially if you have lots of content. In the first moth, itself you’ll get a lot of traffic, compared to what you’d get on your own hosted site. So I’ve talked the talk, now how to do it?

  • The better audio editor

    Posted on May 28th, 2009 Somesh Mukherjee No comments

    Audition and Sound Forge are two of the most sought after audio editors in the world. Proffessionals and home users both download them when their is need. But these software, are they really that good. If you are a home user, you will most probably download a bittorrent client and downlodad them. Are they really worth the 60-70 MB space they take. Is their a smaller, free tool? Yes there is, and its called AUDACITY. Its a free tool that can do as much the pros can, if not more. As a waveform editor, its everything you can possibly want and in one place. Give it a shot

  • FrameWorks you can use

    Posted on May 27th, 2009 Somesh Mukherjee No comments

    If you’ve wanted to make javascript simpler to use without defining exclusive functions for making things simpler. Most of these frameworks work on an API basis. I.e you as a user need not make any changes to the Libraries. So its all the more simpler for you.

    Prototype: It is one of the most famous javascript libraries. It simplifies javascript to a great extent. It has functions for javascript DOM manipulation, easy array manipulation, Event handling,AJAX and more.

    Yahoo User Interface(YUI): This one is used for a better user interface. Includes a calender, menu making, DOM manipulation, Event Handling, AJAX simplification and more

    Scriptaculous: This is another nifty little tool. This one is also used for user interfacing. It is not as powerful as YUI, but is generally lighter and easy to use.

  • Hide Files inside Images

    Posted on May 25th, 2009 Somesh Mukherjee No comments

    This is a tutorial to hide files within images

    Things Required: Winrar(or compatible archiving software with rar support),  A dummy picture(JPEG) file, the required file(s) to be hidden

    1. First of all, gather all the files you need to hide and make a rar archive(archive.rar).

    2. Have the rar file and the dummy JPEG(pic.jpg) file in the same directory.

    3. Open command prompt(Start>>run>>command for windows 98 and Start>>run>>cmd for XP, NT etc or open shell for linux)  and navigate to the directory with the archive.rar and pic.jpg using cd.

    4. Now type: copy/b file.jpg+archive.rar hidden.jpg.

    5. Hidden.jpg is the new file created in the same directory as the above two. When someone opens hidden.jpg, he will see the dummy picture you used. To unlock your previous files, rename the file to hidden.rar and open it using winrar and your original files should be there

  • Avoid using Javascript for Form Validation

    Posted on May 25th, 2009 Somesh Mukherjee No comments

    This is kind of old advice, but many people still don’t know.

    Okay not exactly avoid but use a server side language to validate as well….
    Here’s what i mean.

    You have a form with the following fields, say
    Name:
    Age:
    email:

    And you write a javascript that runs when submit is clicked so as to check that email is a valid email address. So far so good….
    When the user enters an invalid email address, you alert him and the form is not submitted.
    BUT as many of us know, many browsers allow the user to disable javascript.
    Under such circumstances, the form will not be checked and an invalid email address may be entered…..

    So it is always advised to cross check the form data entered in PHP or ASP etc for valid data.

    Because it is next to impossible to stop PHP on the client side…..

  • GET or POST: Which method to use?

    Posted on May 25th, 2009 Somesh Mukherjee No comments

    Okay so u have a form and a preprocessor(i mean PHP). Now you’re wondering what method to use to process the form….

    GET or POST
    First of all let’s see the difference. In GET, the contents of the Form are sent in the url
    eg. If you are using a file process.php which accepts the fields name, email, class, etc and does something with them. Then on submitting the form, the browser will open this URL:
    http://someurl.com/process.php?name=Somename&email=someemail& class=XYZ

    but in case of post, it sends an intrinsic array, which is not visible to the user(like get is).

    So you should use Post when either the data is too complicated…Imagine a 3 line paragraph in your browser url
    or you need security….
    Why POST is secure?
    Obviously because the information is sent intrinsically. However this doesn’t mean that it is secure from pro-hackers etc. Its secure compared to GET…..
    Another reason is that you don’t quite require a Form to be filled up when using get
    A simple img tag is enough to send the data
    In the previous case, the script can be provoked using
    <img src=”http://someurl.com/process.php?name=Somename&email=someemail& class=XYZ”/>
    This will not show any image but will do the job anyways. But in post this is not possible,
    The problem with get becomes significant if you have a big thing

    Suppose the file send message is used by the user to send message a friend(in a social networking environment)
    it works with friend id and message as parameter(http://somesite.com/sendmessage.php?friendid=120&message=hi)
    but now an unscrupulous site puts up an image on its site
    <img src=”http://somesite.com/sendmessage.php?friendid=221344&message=You%20bloo dy%20bitch%20Get%20Lost>
    The user while logged on into ur site also visits this site.
    He will unintentionally send a message to this user….
    so this is where u need post..

    Should you always use post….?
    No not quite. Depends on you requirement. If the action performed is something that doesn’t make much of a difference in the site or user’s life,
    go on
    A profile page will have to use get
    http://someurl.com/profile.php?user=username
    Otherwise users cannot give out their profile links….
    or even a refferal url(http://someurl.com/?ref=idsadas)
    which is again given out by people

  • Automating Web Portal Logins

    Posted on May 24th, 2009 Somesh Mukherjee 1 comment

    So you have got an ISP that uses a web portal to allow you to login instead of the legacy Windows Dialer Connection. Now you need to open your browser, then type in your user name and password. Of course you preferred the vanilla method where you’d double click on an icon and the dialer would appear with your username and password.  You have your reasons. Its faster, especially if you didn’t want to surf the net. Maybe just switch on your torrent client and let it download stuff.  It is also possible to automate the connection using the windows command line RASDIAL command. For more details on RASDIAL click here.
    So now you can’t use command line to connect and store it in a batch file?
    As a matter of fact, you can.


    What you need?

    A software called curl. You can download it here
    A text editor like notepad.
    Knowledge of HTML, prefereably javascript as well.

    First let’s analyze how these portals work.  Whenever you open your browser and try to open a page, your browser consults your ISP using the LAN connection they gave you.  IF you are connected, the ISP renders the page you requested…If you are not, it gives you a form and allows you to connect by entering your username and password on the form. Now you will notice that whenever this form shows up a certain IP address is displayed on the title bar(It could also be a name). In case of Reliance, Kalyani it is 10.239.89.15. This will be different in your case. So what we basically do is send the username and password to the page that this form would send to…For this purpose you need a program called curl. It allows you to send GET and POST requests to pages and receive the response.

    1. Download Curl from this site if you don’t have it already.
    2. Once you have curl for your operating system, unzip the package into a folder called login anywhere on your system.
    3. Now you need to analyze the HTML source of the login form. First of all open the portal..
    4. Once you have done that, view its source. This can be done using Menu View->Source in IE and Menu View-> View Source(Ctrl+U) in Mozilla Firefox.
    5. In the source code find the <form .. tag representing the form  that is used for logging in. Sound knowledge of HTML would help here.The form tag
    6. Once you find it, check the method…The method would be the word mentioned in the <form method=”<method>” tag if you don’t know HTML. It maybe GET or POST. Depending on the method mentioned, you need to use the appropriate steps.
    7. Note the action…If the action is absolute(starts with http://, note it down as it is, if it is not, add the url(yes complete url in the address bar currently before it). In my case it is absolute, so no trouble for me.
    8. We will fill up the quotes soon, don’t worry.  For the next step, you need to find the names for the username and password fields. Generally these are username and password respectively, but more often than not, they differ…So to be safe search for  “<input”  in the file, there are two input tags(or more). The first one being the username, the second being password
    9. The names here are user name and password. The name by the way is word enclosed between name=” & “.the input fields

    If you have POST as action

    1. Once you have this open notepad and type the line
    2. curl –d "<username field name >=<your username>& <password field name>=<your password>"  <action url>
      In my case it will be

      curl –d "username=myusername&password=mypassword"  http://10.239.89.15/user/refresh/home (from step 7)

    3. Save this file as a .bat extension in the same folder as curl. And run this to connect to the net whenever you want

    If you have GET as action, its simpler

    1. The line would be
      curl <action url>?<username field name>=<your username> & <password fieldname>=<yourpassword>

      in my case:

      curl http://10.239.89.15/user/refresh/home?username=myusername&password=mypassword

    2. 2. Save this file with a bat extension and use it to login.

    A similar procedure can be used for logging out. There is a hidden field in the logout page(the page with the logout) button. Just send this field and its value to the required page using curl

  • UAC: good or just a waste of time?

    Posted on January 23rd, 2009 Somesh Mukherjee No comments

    There has been a lot of furore regarding UAC. Most advanced users disable UAC as soon as they install Windows Vista because they feel its useless and annoying. The question stands is it really that useless?
    No, well, UAC can provide a lot of security if the user is aware. UAC prevents anyone(rather thing: read worms, viruses) from running administrative code without the user knowing about it. Although viruses can still be irritate enough without having administrative priviledges, it can prevent many files from doing serious damage to your system. The normal user method is always a good approach: to use the computer as a normal user and use admin privs only when required.

    All in all. UAC is quite a good thing, irritating nevertheless, but useful. Ofcourse and you should be careful to when you click the allow button to an installer, it could easily be a virus