Jump to content

Recommended Posts

Posted

What up? hehe

I think of a python script that does everything for me ... I'm at an enterprise that makes a "Web Authentication" ("https://10.10.17.10/login.html")

I have "User Name" & "Password", but I have to enter it!!! uff...

I think that it is HTML Python, but what is it??

<input type="TEXT" value="" maxlength="80" size="25" name="username">

<input type="Password" value="" maxlength="127" size="25" onkeypress="submitOnEnter(event);" autocomplete="off" emweb_type="PASSWORD" name="password"

and

<input class="button" type="button" onclick="submitAction()" value="Submit" name="Submit">

I know that the internet has everything, but I go into the forums before I go online ....

Posted

Are you talking about the call in @onclick or @onkeypress? That's not Python it's JavaScript.

JavaScript can't I do, but python that I can do....

ssl server ----> username ---> password ---> accept !!!

import httplib
conn = httplib.HTTPSConnection("https://10.10.17.10/login.html")
conn.request("GET", "/login.html")
r1 = conn.getresponse()

that is what I have ...

GET might be wrong .. Perhaps POST? maybe it's the two of them?

httplib is it right? What with urllib?

hehe, that can be wrong ,but I will try... :rolleyes:

Posted

It's just a form.

The university I went to used this and it was simple enough to auto login with a script I can't remember what language it was written in. As I recall it doesn't even do any thing as elaborate as set a session when the form displays, you can just instantly POST having no prior communication with it and it will work.

Posted

JavaScript can't I do, but python that I can do....

ssl server ----> username ---> password ---> accept !!!

import httplib
conn = httplib.HTTPSConnection("https://10.10.17.10/login.html")
conn.request("GET", "/login.html")
r1 = conn.getresponse()

that is what I have ...

GET might be wrong .. Perhaps POST? maybe it's the two of them?

httplib is it right? What with urllib?

hehe, that can be wrong ,but I will try... :rolleyes:

So you're trying to log in with a Python script? you need to check the <form> to see if it's doing a POST or GET. It's probably POST. Also you need to send your username and password in the POST request.

Posted (edited)

emweb_type is specifically for an embedded web server in the device itself that treats the code as HTML part of the form, and the Cisco router accepts the form using this server side type code extension, possibly compiling it on the fly. Its not normal HTML or Python, but a hybrid of HTML and server side code for the embedded webserver. The onclick events look like normal JavaScript.

See:

http://www.prnewswire.com/news-releases/virata-announces-software-license-agreement-with-cisco-systems-75355147.html

http://en.wikipedia.org/wiki/Virata_Corporation

Edited by digip
Posted

but in python .... I have created a web browser + Javascript, but it works not ...

hehe, I want anything to work with one touch ..

import webbrowser
import sys

url = "Web_Hysnes.html"
webbrowser.open(url + 'javascript:document.forms["HACK"].submit();')

or

import webbrowser
import sys

url = "Web_Hysnes.html"
webbrowser.open(url + '@javascript:document.forms["HACK"].submit();')

I am a beginner but I want to learn! :unsure:

Posted

hmm, if I have a html file with a new windows + I have javascript in the SAME windows?

i have done this, but it is not working..

url = "Web_Hysnes.html"
webbrowser.open(url)
webbrowser.open('javascript:document.forms["HACK"].submit();', new=0)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...