Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Alternative Computing > Linux Support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Linux Support Linux - Operating Systems and Applications Support

Reply
 
LinkBack Thread Tools
Old 04-09-2009, 04:39 PM   #1 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 6
OS: ubuntu 8.10


wget to submit form

I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below).


Here is my wget command:
Code:
wget --http-user=xyz --http-password=xyz --post-data='submit_button=Filters&change_action=&submit_type=save&action=Apply&blocked_service=&filter_web=&filter_policy=&f_status=0&services_array=53%3A53%3A17%3ADNS%28%26nbsp%3B%290%3A0%3A1%3APing%28%26nbsp%3B%29443%3A443%3A6%3AHTTPS%28%26nbsp%3B%2921%3A21%3A6%3AFTP%28%26nbsp%3B%29110%3A110%3A6%3APOP3%28%26nbsp%3B%29143%3A143%3A6%3AIMAP%28%26nbsp%3B%2925%3A25%3A6%3ASMTP%28%26nbsp%3B%29119%3A119%3A6%3ANNTP%28%26nbsp%3B%2923%3A23%3A6%3ATelnet%28%26nbsp%3B%29161%3A161%3A17%3ASNMP%28%26nbsp%3B%2969%3A69%3A17%3ATFTP%28%26nbsp%3B%29500%3A500%3A17%3AIKE%28%26nbsp%3B%2980%3A80%3A6%3AHTTP%28%26nbsp%3B%29&services_length=13&service_applist=&blocked_service0=&blocked_service1=&blocked_service2=&blocked_service3=&blocked_service4=&blocked_service5=&blocked_service6=&blocked_service7=&blocked_service8=&blocked_service9=&wait_time=3&start=&f_id=1&f_name=faceboook&f_status1=disable&f_status2=allow&day_all=1&time_all=1&host0=www.facebook.com&host1=&host2=&host3=&url0=facebook&url1=&url3=&url4=&Add_Service_Name=&Add_Service_Port_S=0&Add_Service_Port_E=0&Add_Service_Protocol=23&end=' http://10.0.0.1/Filters.asp
--2009-04-08 13:58:03--  http://10.0.0.1/Filters.asp
Connecting to 10.0.0.1:80... connected.
HTTP request sent, awaiting response... No data received.
Retrying.
I can succesfully authenticate to this routers web interface, with the following:
Code:
wget --keep-session-cookies --http-user=xyz --http-password=xyz http://10.0.0.1/
Connecting to 10.0.0.1:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to 10.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 Ok
Length: unspecified [text/html]
Saving to: `index.html.4'

    [   <=>                                                                                                                       ] 73,195       126K/s   in 0.6s    

2009-04-08 14:04:10 (126 KB/s) - `index.html.4' saved [73195]
Looking for a hint. This is so I can enable/disable a setting on a linksys router page.
Thanks.
Attached Images
File Type: jpg screenshot.jpg (32.7 KB, 5 views)
mike909 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 04-09-2009, 06:45 PM   #2 (permalink)
Moderator/Fedora Amb.
 
wmorri's Avatar
 
Join Date: May 2008
Location: /pm/etc
Posts: 2,835
OS: Window 7/Fedora 10

My System

Send a message via AIM to wmorri
Re: wget to submit form

Hi,

Can you get a larger screenshot of that, I can't see what you are wanting to turn on.

Cheers!
__________________


Linux Forever!

wmorri is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-09-2009, 11:49 PM   #3 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 6
OS: ubuntu 8.10


Re: wget to submit form

Are you looking for just the POSTDATA ? You can get that from the command (after the --post-data option). Seems like that's the only thing getting cut off from the screenshot. I can pretty easily see everything else...is there a specific field you want me to zoom in on? Sorry, just trying to figure out what info to provide you.
Thanks for offering to help,
mike909 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-10-2009, 08:45 AM   #4 (permalink)
Moderator/Fedora Amb.
 
wmorri's Avatar
 
Join Date: May 2008
Location: /pm/etc
Posts: 2,835
OS: Window 7/Fedora 10

My System

Send a message via AIM to wmorri
Re: wget to submit form

Hi,

I am just looking for a bigger picture of your firefox session. It is just too small to read. I don't need a specific section, just the entire image.

Cheers!
__________________


Linux Forever!

wmorri is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-10-2009, 09:05 AM   #5 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 6
OS: ubuntu 8.10


Re: wget to submit form

wierd, the "attachment" is only 640 px wide, but the image inside the post is 1400...I guess the forum automatically scales down the "attachment"?
Anyway, here is a link to a 1400px × 1050px version of the image:
http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127
Thanks.
mike909 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-11-2009, 01:28 PM   #6 (permalink)
Registered User
 
Join Date: Apr 2009
Posts: 6
OS: ubuntu 8.10


Re: wget to submit form

Ok, I think ive figured it out. I just need to clean it up a bit so it doesn't DL temp files, but here's basically what I did:
This example used to enable/disable a filter on my linksys router:
use "tamper-data" plugin in firefox to get the information that is actually being submitted and where. Take the URL form the top window (not the "referrer URL from the "request header" window). Use that URL in the following command:
wget --http-user=<user> --http-password=<password> --post-file=<file containing the "POSTDATA"> http://10.0.0.1/apply.cgi
The post-file should contain only the data taken from the "request header value" (ie everything AFTER the "POSTDATA=" if you copy it out of tamper-data...which in this case begins with "submit_button...")
mike909 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 04-11-2009, 08:24 PM   #7 (permalink)
Moderator/Fedora Amb.
 
wmorri's Avatar
 
Join Date: May 2008
Location: /pm/etc
Posts: 2,835
OS: Window 7/Fedora 10

My System

Send a message via AIM to wmorri
Re: wget to submit form

If you got it to work that is great. I wasn't sure how to do it to be honest. I haven't done much with wget yet, but I will be working on that more now. I need to learn how to do it.

Cheers!
__________________


Linux Forever!

wmorri is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 03:37 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85