LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-08-2004, 08:52 AM   #1
gmartin
Member
 
Registered: Mar 2003
Location: PA
Distribution: Slackware 13.37 Linux Reg # 341245
Posts: 285

Rep: Reputation: 40
javascript from the command-line


I have a linksys router that has parental control (PC) software installed. I also have a linux (Slackware 9.1) server that needs to stay logged into the PC software in order to do what it needs to do.

The login process is an html page with a bunch of accompanying javascript. I need to be able to capture that script and somehow program it so I can submit the login from the command-line. I've done a fair amount of scripting and programming (most on Windows - some linux) but have done little web or javascript.

Can someone help me assess whether I can do this and if so what tools I'll need to make it happen?

Here are a few things I do know:
  • The login page has a half-dozen hidden form fields that are supplied when the page is loaded. I know I'll likely have to 'get' the login page each time a scrape those variables.
  • The login page contains a fair amount of script.
Let me know what you think
 
Old 09-08-2004, 10:54 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Use curl tool, it is certainly installed in your GNU/Linux system, it is capable to submit form from scripts or command-line

man curl and look closely to :

-A (in case of the page react with a certain browser) it is the user agent option
-d send POST data
-b send cookie data

...and much more
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
can i run a javascript from the command line ? nephish Linux - Software 2 11-08-2005 07:04 AM
Is there a browser command line tool for testing javascript websites? MensaWater Linux - Software 9 09-06-2005 12:22 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM


All times are GMT -5. The time now is 01:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration