Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a table with username and passwords that I want to input in Hotmail's username and password box. Is there a way to actually program this? Are you allowed to manipulate text boxes of someone else's webpage? Not for illegal purposes, just to make my job easier and to not have to input values manually one by one. Hotmail is just an example.

share|improve this question
    
sorry i'm a new programmer and i'm just trying out things. –  user1580809 Aug 7 '12 at 4:41
    
Most probably Hotmail will present you with a captcha if script-like behavior is detected. –  user61852 Aug 24 '12 at 19:54
add comment

2 Answers

Yes, it is possible, but it's probably a very bad idea.

First of all, you are introducing security problems. First you had a username and a password, and they were in your head only. The attack surface is small: with the exception of social engineering, a combination of at least two attacks is required, e.g. man-in-the-middle and a compromised SSL certificate. If, however, you write your tool, you'll have a whole database server, probably with a web server on top, and some javascript to access it. Compromise any of those parts, and there's all your passwords. It's probably not even hard to exploit: if your javascript is out in the open, then all it takes to get to your password is to run that javascript on a different page and have it submit a form there (ideally in a hidden iframe so you never get to see it happening). While it is unlikely that an attacker targets you specifically, if they do, the consequences are disastrous.

And then there's the legal side. In many countries, 'hacking' is illegal, even without criminal intent. What constitutes hacking is rather ill-defined, and things like disabling javascript to get around client-side validation have been found to be punishable in the past. While your intent is innocent, the technique, although unlikely to be detected, could, in extreme cases, be considered hacking.

And finally; there are solutions that can already do this, although they don't use an SQL database. Look for form filler plugins; there's plenty of them for most major browsers, just pick one that suits your preferences.

share|improve this answer
add comment

Yes and no. Various browsers/plugins will enable you to run whatever javascript you want on the client side, and thus be able to set the username and password. But setting up your computer/browser so that whenever you visited Hotmail a particular bit of javascript is ran, is way more trouble than it's worth. If you want to learn how to work with Javascript, I suggest something else, just about anything else in fact.

share|improve this answer
    
A browser's javascript engine does not have access to arbitrary files or sockets on the local machine though; how would it connect to a database? You'd have to throw in a local web server running some sort of web service to access the database. –  tdammers Aug 7 '12 at 5:55
    
Like I said, way more trouble than it's worth –  jmoreno Aug 7 '12 at 6:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.