Gmail API: python application error - javascript

https://developers.google.com/gmail/api/quickstart/python#step_1_turn_on_the_api_name
i executed python quickstart.py
and it opened browser-like window.
i've typed my email address and the password and reached a screen where i need to press "allow" button
when I did that I get this error:
"You've reached this page because we have dtected that Javascript is disabled in your browser. The age you attempted to load cannot display properly if script is disabled. Please enabled scripts and retry the opration or go back in your browser."
But im running this on a putty window.
how do i get pass this?

i had to add an option --noauth_local_webserver to python quickstart.py and it gave me the link to open on a browser to authenticate

Related

Script to automatically submit form in any browser

Note: I could not think words for this question to search in Google. That's why asking my question. Please bear with me.
I have internet subscription of xyz company and it's login based connection. But what happens is that sometimes login screen reappears and is asking for password. I have already stored user name and password in web page but I have to click on login button to relogin again.
Can I have any script written for this login page that whenever internet connection goes and asks for relogin again, script automatically submit form and get connected with internet?
You're looking for content scripts. There is no cross-browser way to inject code into a web page, but each major browser has a well documented way to do it:
Firefox
Chrome
Internet Explorer
Technically you could also write a script that sniffs HTTP requests using a tool like Wireshark and posts form data whenever it detects the page is displayed, but that doesn't seem like a great solution.

Browser Scripts in VB.net

I have a Windows form application with a browser in it. The browser opens to a secure website that will call a POPUP window asking for the Username and Password. Once logged in the site throws a bunch of Javascript Error Messages. I was wondering if there is a way to prevent these messages or at least automatically choose YES KEEP RUNNING SCRIPTS for the user so it is transparent.
In the Control Properties I set SUPPRESS ERRORS to TRUE but then the website does not prompt for the USERNAME and PASSWORD it just says YOU DO NOT HAVE ACCESS TO VIEW THIS PAGE. So setting the SUPPRESSION to TRUE will not work. Any ideas? Thanks!
Oh, also, I'm using Visual Basic Express 2010.

Apple Captive Portal displaying "Success" instead of closing

I developed a login portal for a Wifi hotspot. When I connect to that hostpot, the CNA appears with no problem, and I can go through the entire process of login. However, when it comes to reach the "Success.html" page, the CNA doesn't close itself. The page is just display and the user can see "Success" on the screen.
The user is redirected to this page using JS (I tried both window.open and window.location.href commands).
Any clue on how I can make this page close? Is there a specific way to redirect the user to this "Success" page to make the CNA understand it should be closed?
Additional info: The login portal is under https. I don't know if it has anything to do with that...
Thanks a lot!
Nikkow.
Try to intercept the "success" page in a script, after choose the action to do !
If the captive portal is detected by the Captive Network Assistant.app (located in /System/Library/CoreServices/) then the user will hav to click the “Done” button to close the window. You might not be allowed to intercept that as it might be a security vulnerability. See if you can do what #Lord St. John suggests.

Refreshing same browser window from windows run command

I have one web application. When client enters the address and after successfully logging in. He gets the home page with some data over the page. Now when any third party tool or from run command if i give the same url on which the client is with changed parameter values, i want the same browser window to be refreshed with updated/changed values without opening the new browser window.
Whats happening now is that when i'm triggering the url from different source, its opening in new browser window. Plz help me out with few suggestions.
Ars.
The best solution would be for the web application to poll the server and refresh itself when there is an update.
Your command line tool can then contact the server and update the parameters directly, and the application in the user's browser will pick up those changes automatically.
Attaching to a running Internet Explorer instance is also possible, for example see this article: http://www.codeproject.com/Articles/9683/Automating-Internet-Explorer, or the Selenium project at http://seleniumhq.org/. But you're almost certainly going to make it easier for yourself by changing your application to refresh automatically.

Can I Create Chrome Application Shortcuts Programmatically from a Web Page?

I've thought about using Chrome and HTML5 local storage to create a useful app and sell it. The problem I think I would have, however, is the delivery mechanism to get this installed on one's computer. Let's say the app was wikipedia.com (although it isn't). Manually one can go there with Chrome, then choose the wrench icon, Tools, Create Application Shortcuts, and make a desktop and application menu icon for the app.
Okay, fine, but is there a way I can compose a web page link or form button such that it does this for me? In other words, one clicks a button or link and it shows the Create Application Shortcuts form. I am hoping that there's this little-known way on Google Chrome to use either HTML or Javascript to trigger showing that form.
As for those who don't have Chrome, I can detect that and give them a button they click that emails them. In the email, it will give them instructions for installing Chrome and then another link so that they can visit this page in Chrome in order to get the button that shows the Create Application Shortcuts form.
For now, until a better answer can be provided, this is sort of the technique for deploying a desktop app with Chrome, the manual way, and without having to register in the Chrome Store:
After the user purchases a product, email them the serial number for registering their product and a web URL to install this new product.
The web URL is the actual URL of the web app. However, it doesn't display its normal content by default. Instead, the web app is in "installer mode". It does this by looking at a 200 year persistent, encrypted, registration cookie that may not already be installed. (Note if they delete cookies, there's no harm done -- it just asks them to re-register again.)
The first thing the web app does in Installer Mode is detect user agent. If it finds this is not Chrome, it gives them a link to install Chrome and tells them to follow the instruction email again that they have already been sent, but using Chrome to do this. (You might also want to provide a form to resend them the instructions and serial number again.)
The user either installs Chrome and returns back to this page again, or is already a Chrome user. The Installer Mode then shows a message that reads, please press the ALT-F key in Chrome, or press the Wrench icon in your toolbar, and choose Tools > Create Application Shortcuts, check the two checkboxes, click OK, and then click the "Task Performed" button below.
The user follows the instructions and creates their desktop/application shortcut and then clicks "Task Performed".
The user then sees a registration form where they are to type in their serial number they were emailed. The user enters this in and clicks the Register button.
The server validates the registration and then stores a persistent, 200 year encrypted cookie that basically says, "This guy is registered." This keeps the web app from running in Installer Mode.
The Installer Mode is still active, however, and shows them the final prompt: "You may close your browser and run the icon for the new app from your desktop or application shortcut that you created. The icon is named '{insert name here}'."
They close their browser and doubleclick the icon. The application loads, the registration cookie is read, and the web app no longer runs in Installer Mode -- it shows the application content like it normally would. Besides the fact that this is not a 100% truly automated install, the only drawback is that, since the main page is not a local file (cached), the web app can't really work offline completely. Sure, it can use HTML5 offline storage, but doubleclicking the desktop shortcut will always connect to your web app site.

Categories

Resources