I create a program that simulates me browsing to gmail, entering the user name and password and clicking the submit button.
All this with C#.
I would appreciate two kinds of answers:
One that tells how to do this programaticaly. Since I may be interested in automating more
sophisticated user activities.
On that tells me about a program that already does that.
Thanks!!
I want to access my mail account with a double click (without browsing, entering username and password and pressing submit).
Why not check the 'stay signed in' box, and add a bookmark toolbar item for Gmail?
alt text http://img192.imageshack.us/img192/6240/picture5zw.png
Do it once, and all future logins are a one-click process. Am I missing something? Why overcomplicate this with a C# program?
Well, depending on the browser you're using, it might be much simpler to use a greasemonkey userscript (on FireFox) that does auto-login for you.
If you want to simulate user activity take a look at AutoHotKey.
Also if the issue is specific to logging into websites take a look at LastPass. They have plug-ins for every major browser and mobile device. I haven't type out a user name or password on a website in months.
If your ok with clicking 'go' (or wharever) on your application and then clickingin the username field. Look into Sendkeys:
Put this in the onClick event of a button and replace text with your user details:
SendKeys.Send("USER#DOMAIN.COM{TAB}PASS{TAB}{TAB}{ENTER}");
You might also want to put a timer or make your program wait a few seconds before actually sending the keys to give you time to click in the username box.
Use WatIn. and this is a placeholder to get to 30 Chars answer
Related
I am using Gnome 3.34.3.
When I need to unlock a private key (ssh, git, etc.), a modal window appear and ask me to write the key's passphrase.
The GUI is modal and it is not convenient for me.
I would like to unlock my private keys from either the terminal or a not modal GUI.
Is it possible ?
Thank you !
echo "pinentry-program /usr/bin/pinentry-gtk" >> ~/.gnupg/gpg-agent.conf
gpg-connect-agent reloadagent /bye
Almost solved.
In short; no. [sorry]
The dialog is kept modal to mark its importance. For example, such password, urgent info windows must be kept modal to get the user's attention as soon as possible. Modal also prevents you from accessing the other part of application, which otherwise would spoil the application entirely.
For example:
if the dialog wasn't modal while getting authentication, there is no meaning at all. The dialog could be just kept down by the window manager without you even knowing it. There are possibilities.
I agree, modal windows are irksome as many crazy developers use it for everything (You can read more about this on GNOME's HIG guidelines), but a dialog should be modal when it has to be.
It depends on the developer to choose what should be modal and what should not be. That is it depends on the application, and there is no system wide settings available to change that behavior. You can, so, ask the respective developer to replace the modal windows with convenient ones.
To your question of accessing it from terminal, it also depends on the application.
I'm working on a program that operates like a TOTP protocol. The program is giving the user passwords to other applications every 30 seconds. For security reasons, I want to be able to block the PrintScreen key and similar screen capture methods. Does anyone have any idea how I can prevent this? I am working with Windows programs.
Your question is incredibly vague and provides no context or research, but here goes:
You cannot completely prevent screen capture programs (like snipping tool or OBS) from capturing your software on a screen. However, here's a couple of ways you can prevent the printscreen tool in windows.
Method 1: Disable unwanted keystrokes
You can read the Windows API to disable unwanted keystrokes. This CodeProject documentation should show you how to do it in C#.
Method 2: Hide your application
You can use something similar to this to hide your application on screen so if the PrintScreen button is pressed, it will hide your application (and thus hide the password(s) on screen) from the screenshot.
private void Display_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Snapshot)
{
this.Hide();
}
}
Please note that this piece of code is not guaranteed to fix the problem. Use it as an idea or template to build your own methods of hiding the window.
If you are still absolutely desperate, you can change the software to show a button that says "Copy Password to Clipboard". Instead of displaying the password in a textbox, the user can see a label like "Amazon Account" and then click on the button that says to copy their password to the clipboard. This means the actual password is never revealed on screen yet the user can still copy and paste it into their Amazon account etc.
You should not be developing a TOTP client on a system that is also used as the main system to authenticate. If it is a different system, then you should not care about prntscrn at all.
I want an extension to be controlled by the Omnibox. The chrome.omnibox API lets me register a keyword, but that means a lot of clicking or typing to get to the extension. For example, I have to Ctrl+L to select the omnibox, then type some letters for the extension and space/tab.
Can this "omnibox mode for my extension" be entered programmatically? I.e. is there an API call I can make that will take the user's keyboard focus to the omnibox in already switched mode to my extension? I just want to replace the sequence of clicks/typing with a single keyboard shortcut that will allow the user immediately interact with the extension via the omnibox.
This is not currently possible. I could see this being implemented in two ways:
1. As you suggest, by allowing the extension to enter omnibox programmatically. I'm not sure if that's a good idea - stealing keyboard focus could be annoying to the user, and a possible security risk.
2. By adding "enter omnibox mode" as a target for the commands API. That way the user can configure the keyboard shortcut or disable it entirely.
My problem is very simple, but implementation can be hard!
I want that my application (Windows Application:: Visual C# .net) is launched whenever the user uses some keys combinations (on his keyboard).
For example it types Ctrl+W+W and my application is launched, that's all, I want the simplest implementation, less code, memory...
Thanks :D
You would need to write a keylogger type application in conjunction with your app which monitors for keyboard events. Once your specific shortcut is triggered you could then load your application.
See here for information on how to capture keystrokes.
Create a shortcut to the application, and assign a hot-key combination to the shortcut. Depending on the O/S, not every keystroke combination can be assigned to a shortcut, e.g. you may be able to assign Ctrl+Alt+W but not Ctrl+W+W.
On Windows, you can create a shortcut (on the desktop) to your application.
When you open the properties of the shortcut, on the second tab (labeled "Shortcut"), you can assign a shortcut key. But you can use only Ctrl+Alt+key shortcuts.
I don't think this is possible in the way that you framed this question. What is possible, however, is to have your application run automatically on startup without showing any forms, have it hook into Windows to monitor all keystrokes (I'm not sure how to do that part, exactly) and then show a form when the user presses a particular sequence of keys.
So in other words, your application would have to be running from the time Windows starts, but only show itself (make a form visible) when the user clicks a particular key sequence.
Update: here is a link to an article that discusses how to do global keystroke capture using C#: http://blogs.msdn.com/toub/archive/2006/05/03/589423.aspx.
I was wondering if it was ever ok not to have a submit button (Ok, Go or Search for example) near a search box in Web pages.
I know that hitting enter is much faster and that it will perform the search.
However, is it an accepted convention for the average non tech savvy user or only for the tech community?
For example, the search box here at stackoverflow doesn't have a submit button, but I don't think anyone is complaining (and I sure don't).
On the other hand, someone suggested using Google as an example: would people notice if the buttons were removed?
I just started reading Don't Make Me Think by Steve Krug and he mentions that every search box should have something that tells me I can click on it to launch the search.
Your thoughts?
Why you should have a button:
Not everyone knows they can hit
enter, so you are leaving some less
savvy people out in the cold.
Some devices like phones and consoles may not have a way to submit without a button. The PC based browser is still dominant but don't assume it is the only way people access your site.
You may not have a button if (both conditions must be satisfied):
Your audience is tech savvy (as on SO)
You provide a visual cue that the search box actually is a search box
By adding text inside it mentioning it should be used to search
By adding an icon inside the box
Generally I would think that hitting enter is a shortcut to submit rather than the primary means.
I think it depends on your target market. If you are StackOverflow it's not too hard too think they know how to use a browser (using a back button on a browser to navigate is a similair design convention) and pressing Enter = submit for search.
However if your target market is say mechanics (no offence to mechanics) that don't use a browser/computer often then look at how Google does it (and they target the broadest scope) - they have a button to submit.
There is a middle ground you could look at, which is have a water mark like StackOverflow which tells users "Click here, type in search values and press enter to search" - or something like that (hopefully shorter) where you actually catering for users of all levels.
Whether or not a button is required depends on the audience. Here are issues to consider:
Technically oriented users may not need a button and will usually not have to think about hitting enter to submit a search request.
Conversely non-technical people may not even know it is possible to hit enter to submit a search request. So no amount of thinking might work for them.
There may be technology limitations that require a button. If you expect your audience to be browsing your form from a platform that does not provide an implicit way to submit a search request then you may need to provide an explicit button.
So essentially you need to know your audiences and determine where the edge cases lie and how critical they are. Using SO as an example, it is directed at technical users so an explicit button probably isn't required. However for a site like google where you need to be accessible to every single user using every possible platform, a clear explicit search button is a must.
"Don't Make Me Think" - so gimme a button.
There will always be someone using the application for the first time; don't make them think either. And your screen shouldn't be so fussy that it is impossible to fit the button in comfortably - that would indicate a different set of problems.
I think for a non-tech person some sort of submit button is needed. Think about people who don't use computers very much. They often click all of the buttons needed instead of hitting enter because they don't realize enter does the same thing. My opinion...if it isn't for tech guys only then it should be as simple as possible.
It depends on your audience. Steve's audience is everybody. Majority of which are so far from IT you'd need a telescope to see them. If your auditory is a single user, you might skip all clues: button (with or w/o names), in-box label.
For my own login window I leave two fields: no labels, no buttons, no javascript to tell you which one is which. But that's not a public project.
A while ago there was an article on Smashing Magazine about this.
There were some alternatives like a looking glass or another icon, but basically there is always a button, or something which represents it.
Having a button makes it clearer that the text field is a search field. Merely having the text field itself indicate this in its contents is unsufficient.