![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| 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: * 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 |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#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. 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]
Thanks. |
|
|
|
| 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 |
|
|
#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, |
|
|
|
|
|
#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. |
|
|
|
|
|
#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...") |
|
|
|
|
|
#7 (permalink) |
|
Moderator/Fedora Amb.
|
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!
|
|
|
|
![]() |
| Thread Tools | |
|
|