Posting data to a form using curl


 
Thread Tools Search this Thread
# 1  
Old 05-30-2010
Posting data to a form using curl

Hello all.

I have an incredible number of servers that I need to change a parameter on using a web interface. I'd like to be able to do this via curl, but I'm having some trouble. I filled out the form and hit update while snooping (tcpdump) my interface. That gave the the following as what is being posted:

Code:
sink_type=0&sev0typeACE_LOG=on&sev1typeACE_LOG=on&sev2typeACE_LOG=on&sev0typeASSERT=on&sev1typeASSERT=on&sev2typeASSERT=on&sev0typeASYNC=on&sev1typeASYNC=on&sev2typeASYNC=on&sev0typeCM_INTR=on&sev1typeCM_INTR=on&sev2typeCM_INTR=on&sev0typeCOMM_ID=on&sev1typeCOMM_ID=on&sev2typeCOMM_ID=on&sev0typeCONTENT=on&sev1typeCONTENT=on&sev2typeCONTENT=on&sev0typeCOUNT_TIME=on&sev1typeCOUNT_TIME=on&sev2typeCOUNT_TIME=on&sev0typeHTTP_CLIENT=on&sev1typeHTTP_CLIENT=on&sev2typeHTTP_CLIENT=on&sev0typeHTTP_SERVER=on&sev1typeHTTP_SERVER=on&sev2typeHTTP_SERVER=on&sev0typeINGEST=on&sev1typeINGEST=on&sev2typeINGEST=on&sev0typeLIVELIHOOD=on&sev1typeLIVELIHOOD=on&sev2typeLIVELIHOOD=on&sev0typeLOGGING=on&sev1typeLOGGING=on&sev2typeLOGGING=on&sev0typeMEMORY=on&sev1typeMEMORY=on&sev2typeMEMORY=on&sev0typeMETADATA=on&sev1typeMETADATA=on&sev2typeMETADATA=on&sev0typeONLINE_TIM=on&sev1typeONLINE_TIM=on&sev2typeONLINE_TIM=on&sev2typePVFS=on&sev0typePVFS-BITRAT=on&sev1typePVFS-BITRAT=on&sev2typePVFS-BITRAT=on&sev0typePVFS-CACHE=on&sev1typePVFS-CACHE=on&sev2typePVFS-CACHE=on&sev0typePVFS-CDN=on&sev1typePVFS-CDN=on&sev2typePVFS-CDN=on&sev0typePVFS-JOB=on&sev1typePVFS-JOB=on&sev2typePVFS-JOB=on&sev0typePVFS-MNG=on&sev1typePVFS-MNG=on&sev2typePVFS-MNG=on&sev0typePVFS-RAID=on&sev1typePVFS-RAID=on&sev2typePVFS-RAID=on&sev0typeRTSP=on&sev1typeRTSP=on&sev2typeRTSP=on&sev0typeRTSP_SERVER=on&sev1typeRTSP_SERVER=on&sev2typeRTSP_SERVER=on&sev0typeSERIALIZE=on&sev1typeSERIALIZE=on&sev2typeSERIALIZE=on&sev0typeSOCK_POOL=on&sev1typeSOCK_POOL=on&sev2typeSOCK_POOL=on&sev0typeSTATMUX=on&sev1typeSTATMUX=on&sev2typeSTATMUX=on&sev0typeSTREAMER=on&sev1typeSTREAMER=on&sev2typeSTREAMER=on&sev3typeSTREAMER=on&sev4typeSTREAMER=on&sev0typeSTREAMER_IO=on&sev1typeSTREAMER_IO=on&sev2typeSTREAMER_IO=on&sev0typeSTREAM_ERR=on&sev1typeSTREAM_ERR=on&sev2typeSTREAM_ERR=on&sev3typeSTREAM_ERR=on&sev4typeSTREAM_ERR=on&sev0typeSTREAM_PTS=on&sev1typeSTREAM_PTS=on&sev2typeSTREAM_PTS=on&sev0typeSYS_OPER=on&sev1typeSYS_OPER=on&sev2typeSYS_OPER=on&sev3typeSYS_OPER=on&sev4typeSYS_OPER=on&sev0typeUSER_OPER=on&sev1typeUSER_OPER=on&sev2typeUSER_OPER=on&sev3typeUSER_OPER=on&sev4typeUSER_OPER=on&contextinhidden=&contextouthidden=&Update=Update

I'm now trying to reproduce this using curl, but I don't know how. I've tried
Code:
curl -d "sink_type=0&sev0typeACE_LOG=on&sev1typeACE_LOG=on&sev2typeACE_LOG=on&sev0typeASSERT=on&sev1typeASSERT=on&sev2typeASSERT=on&sev0typeASYNC=on&sev1typeASYNC=on&sev2typeASYNC=on&sev0typeCM_INTR=on&sev1typeCM_INTR=on&sev2typeCM_INTR=on&sev0typeCOMM_ID=on&sev1typeCOMM_ID=on&sev2typeCOMM_ID=on&sev0typeCONTENT=on&sev1typeCONTENT=on&sev2typeCONTENT=on&sev0typeCOUNT_TIME=on&sev1typeCOUNT_TIME=on&sev2typeCOUNT_TIME=on&sev0typeHTTP_CLIENT=on&sev1typeHTTP_CLIENT=on&sev2typeHTTP_CLIENT=on&sev0typeHTTP_SERVER=on&sev1typeHTTP_SERVER=on&sev2typeHTTP_SERVER=on&sev0typeINGEST=on&sev1typeINGEST=on&sev2typeINGEST=on&sev0typeLIVELIHOOD=on&sev1typeLIVELIHOOD=on&sev2typeLIVELIHOOD=on&sev0typeLOGGING=on&sev1typeLOGGING=on&sev2typeLOGGING=on&sev0typeMEMORY=on&sev1typeMEMORY=on&sev2typeMEMORY=on&sev0typeMETADATA=on&sev1typeMETADATA=on&sev2typeMETADATA=on&sev0typeONLINE_TIM=on&sev1typeONLINE_TIM=on&sev2typeONLINE_TIM=on&sev2typePVFS=on&sev0typePVFS-BITRAT=on&sev1typePVFS-BITRAT=on&sev2typePVFS-BITRAT=on&sev0typePVFS-CACHE=on&sev1typePVFS-CACHE=on&sev2typePVFS-CACHE=on&sev0typePVFS-CDN=on&sev1typePVFS-CDN=on&sev2typePVFS-CDN=on&sev0typePVFS-JOB=on&sev1typePVFS-JOB=on&sev2typePVFS-JOB=on&sev0typePVFS-MNG=on&sev1typePVFS-MNG=on&sev2typePVFS-MNG=on&sev0typePVFS-RAID=on&sev1typePVFS-RAID=on&sev2typePVFS-RAID=on&sev0typeRTSP=on&sev1typeRTSP=on&sev2typeRTSP=on&sev0typeRTSP_SERVER=on&sev1typeRTSP_SERVER=on&sev2typeRTSP_SERVER=on&sev0typeSERIALIZE=on&sev1typeSERIALIZE=on&sev2typeSERIALIZE=on&sev0typeSOCK_POOL=on&sev1typeSOCK_POOL=on&sev2typeSOCK_POOL=on&sev0typeSTATMUX=on&sev1typeSTATMUX=on&sev2typeSTATMUX=on&sev0typeSTREAMER=on&sev1typeSTREAMER=on&sev2typeSTREAMER=on&sev3typeSTREAMER=on&sev4typeSTREAMER=on&sev0typeSTREAMER_IO=on&sev1typeSTREAMER_IO=on&sev2typeSTREAMER_IO=on&sev0typeSTREAM_ERR=on&sev1typeSTREAM_ERR=on&sev2typeSTREAM_ERR=on&sev3typeSTREAM_ERR=on&sev4typeSTREAM_ERR=on&sev0typeSTREAM_PTS=on&sev1typeSTREAM_PTS=on&sev2typeSTREAM_PTS=on&sev0typeSYS_OPER=on&sev1typeSYS_OPER=on&sev2typeSYS_OPER=on&sev3typeSYS_OPER=on&sev4typeSYS_OPER=on&sev0typeUSER_OPER=on&sev1typeUSER_OPER=on&sev2typeUSER_OPER=on&sev3typeUSER_OPER=on&sev4typeUSER_OPER=on&contextinhidden=&contextouthidden=&Update=Update" 192.168.5.117:5555

But that gives me the error "Could not find handler for URL /"

Anyone have any advise?

---------- Post updated at 03:34 AM ---------- Previous update was at 03:17 AM ----------

Never mind. Me and my coworker figured it out using wget --post-data
 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
CURL - Post Form Isssue ( sequel ) Fred13 Web Development 4 2 Weeks Ago 12:33 PM
Curl - post form issue Fred13 Web Development 3 2 Weeks Ago 06:11 AM
Get data from GitHub using Curl Kochappa Shell Programming and Scripting 0 04-02-2017 05:13 AM
How to use cURL to download web page with autentification (form)? MarcelOrMittal UNIX for Beginners Questions & Answers 1 08-04-2016 12:15 PM
Python: Value Not Posting To Form Azrael UNIX for Advanced & Expert Users 0 07-29-2015 03:00 AM
Data Post with curl iddfcr Web Development 1 11-17-2014 11:34 AM
Curl Script - Post a file (multipart/form-data) Anooja G Shell Programming and Scripting 0 04-28-2014 09:08 AM
Getting data in table form Vivekit82 Shell Programming and Scripting 7 01-24-2014 05:07 PM
Transpose Data form Different form asavaliya Shell Programming and Scripting 2 10-18-2012 12:29 AM
Using cURL to submit a post form hansvg Shell Programming and Scripting 2 07-24-2012 03:50 PM
Posting Multiple Files using cURL MarkPaxo Red Hat 4 04-05-2012 05:13 AM
libcurl - how to do GET form posting in C? jaeezzy Programming 1 11-14-2010 06:34 PM
maintaining form post session using curl Allasso Shell Programming and Scripting 1 01-13-2009 06:26 PM
changing data into matrix form g0600014 UNIX for Dummies Questions & Answers 1 06-19-2008 03:24 PM
data form harsh_guru UNIX for Dummies Questions & Answers 3 02-18-2006 10:26 AM