LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-25-2014, 11:11 PM   #1
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Rep: Reputation: Disabled
shell script for web page


Hi,

How to give input to webpage and after my input need to do submit in web page.Is possible from shell script preferably Bash
 
Old 05-25-2014, 11:54 PM   #2
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
You should use curl or formfind in your shell script.
http://journalxtra.com/linux/bash-li...curl-and-wget/
http://journalxtra.com/linux/howto-p...ill-web-forms/
 
Old 05-26-2014, 02:19 AM   #3
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
Hi

If i enter this command curl -u bob:!$Bob1987 http://labtoools.cisco.com it automatically takes below command

curl --user bob:http://labtools.cisco.comBob1987 http://labtools.cisco.com

and i wont get any result

Can you plz suggest me how to fix

Actually my requirement is if go some url say http://someurl.com one page will open and i want to enter some number and click on go button and it gives some info i need those information .
 
Old 05-26-2014, 03:12 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,744

Rep: Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924Reputation: 5924
What distribution/ version are you running?

Last edited by michaelk; 05-26-2014 at 03:39 AM.
 
Old 05-26-2014, 03:18 AM   #5
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
Hi,

RHEL 6.3 64 bit

[root@b16-sn-qa-042 ~]# curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz.

Recent work around i found HTTP/1.1 302 Found. see below output in deatil.

* About to connect() to labtools.cisco.com port 80 (#0)
* Trying 10.115.76.203... connected
* Connected to labtools.cisco.com (10.115.76.203) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: labtools.cisco.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Mon, 26 May 2014 08:17:16 GMT
< Server: Apache/2.4.9 (Unix) PHP/5.5.10
< X-Powered-By: PHP/5.5.10
< location: /portal/
< Content-Length: 0
< Content-Type: text/html
<
* Connection #0 to host labtools.cisco.com left intact
* Closing connection #0
 
Old 05-26-2014, 04:52 AM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
@michaelk
Think about the other applications for what he's talking about.
I'm always curious when someone wants to script an HTML interaction.

If the site manager was willing to allow access like that, there'd be an FTP portal.

@sagar666
I'm not sure where your located but I'll tell you if you hit the site managers HTML doorway once too often like that, if you were in the US, there would be police cars outside your house in 45 minutes.
Think about what your asking.

cisco.com

Those are most definitely not the people you want to practice this on.

Last edited by dijetlo; 05-26-2014 at 07:00 AM.
 
Old 05-28-2014, 01:09 AM   #7
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
Hi dijetlo,

I have not modifying cisco.com page and I have access to use pages and more over i fed up with routine jobs day to day I cant enter 1000's of numbers to their page and wait to get a result for each number that is the reason i want to automate my jobs.

Same thing i am trying with curl but it is throwing above error.
 
  


Reply



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
[SOLVED] how to run shell script command from php web page Ankush Seth Linux - Newbie 8 09-03-2013 10:35 AM
How to execute a shell script from a simple html web page Shreerang Patwardhan Linux - Software 7 03-11-2010 11:12 AM
shell script to refresh a web page vinaytp Linux - Newbie 6 06-12-2009 12:55 AM
Running a shell script from a web page anirbande Linux - Newbie 1 12-01-2006 01:36 PM
How do I display real shell script output to web page. farmerjoe Programming 1 04-07-2005 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration