You are not logged in.

#1 2008-12-23 15:38:50

jakadinho
Member
From: Kranj, Slovenia
Registered: 2008-10-25
Posts: 32
Website

[SEMI SOLVED]Python noob needs help with simple script

I looked around a bit and i found that i need to use ClientForm module but i dint know how to use it becouse im complete noob in programing.

What i want to do is open website http://ycollege.xxx.com/index.jsp with values (i copied these from page source) id='f_login' value="xyz" and id='f_pass' value="123"

The second thing i want to do is access http://ycollege.xxx.com/mod-yCollege/Settings.jsp
and somehow change&exec this command (again this is copy from source )

<a href='#' onClick="document.getElementById('frmEDact3138').submit();" class='btn'>Reactivate</a>

.

Last edited by jakadinho (2008-12-26 12:52:50)

Offline

#2 2008-12-23 16:51:40

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: [SEMI SOLVED]Python noob needs help with simple script

If it doesn't need to be Python, I might be able to help with a quick PHP script or C program (using libcurl) that would do the job, but you're going to need to pastebin the HTML before anyone could help, I would think.

-dav7

Last edited by dav7 (2008-12-23 16:53:11)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#3 2008-12-23 17:08:34

jakadinho
Member
From: Kranj, Slovenia
Registered: 2008-10-25
Posts: 32
Website

Re: [SEMI SOLVED]Python noob needs help with simple script

Im open to any sugestions. Python, C+.... doesn't realy matter to me becouse i dont know any smile

/index page http://pastebin.com/m5616e3e4
/main.jsp http://pastebin.com/m796503ff

/mod-yCollege/Settings.jsp  http://pastebin.com/m7886862b

thx for helping

Offline

#4 2008-12-23 20:32:51

jakadinho
Member
From: Kranj, Slovenia
Registered: 2008-10-25
Posts: 32
Website

Re: [SEMI SOLVED]Python noob needs help with simple script

I tried some tutorials in python but nothing works for me
I tried to find help for C but i dont understand it at all. At least python looks a bit like bash so i was at least able to try.

I found twill language wich is based on python and i actualy managed some stuff

setlocal username xyz
setlocal password 123

go http://ycollege.xxxx.cz
formvalue 1 f_login $username
formvalue 1 f_pass $password
submit

go http://ycollege.xxxx.cz/mod-yCollege/Settings.jsp

With this script i loged in and accessed settings page. So what i need now is to somehow include posted (look up) javascript in phyton.


It took me like half of the day to finish this and at the end i have only few lines soo im thinking for someone skillfull this should be simple. I you have any solution in any programing language i would gladly hear it.

Last edited by jakadinho (2008-12-26 12:53:24)

Offline

#5 2008-12-26 12:50:40

jakadinho
Member
From: Kranj, Slovenia
Registered: 2008-10-25
Posts: 32
Website

Re: [SEMI SOLVED]Python noob needs help with simple script

I kind off solved my problem.
I wrote the script in bash http://pastebin.com/f5c5c9605. I know it is not pritty but it works. Bash saved the day lol cool


If anyone find this useful and need some information about this script feel free to ask:)

Offline

Board footer

Powered by FluxBB