Can't submit a form.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can't submit a form.
# 1  
Old 02-11-2013
Can't submit a form.

hello
my script is submitting POST-data to a site
(its not my first script, i've done these before many times (include parsing scripts) but this one is tough)

so the problem is i'm submitting a form with firefox
and in firebug i see WHAT exactly i'm submitting
then
when i do EXACTLY the same with my script
it's simply not working
so i have the question to pro's:
WHYYYYYYYYYYYY Smilie

there is one thing.. the data have about 20 parameters and some of them:
Code:
__EVENTARGUMENT
__EVENTTARGET
__EVENTVALIDATION
__LASTFOCUS
__VIEWSTATE
>datahere<

can change their position in the block of post-data
they can be like:
Code:
__LASTFOCUS
>datahere<
__EVENTARGUMENT
__EVENTTARGET
__EVENTVALIDATION
__VIEWSTATE

or:
Code:
__LASTFOCUS
__EVENTARGUMENT
__EVENTTARGET
__VIEWSTATE
>datahere<
__EVENTVALIDATION

or somewhere else

and i think maybe javascript doing this somehow but dunno if this can be a problem
the whole site looks like writting by a monkey. rly. have bugs in JS and in HTML also.
there's also the key which is changing when loading this page but i'm catching it

PS plx don't put this topic to "web-programming" last answer there was a week ago Smilie

Moderator's Comments:
Mod Comment edit by bakunin: please keep the thread titles as concise as possible. We'll gladly help even we are not "your last hope". Coming across desperate will gain you nothing here. Thank you.

Last edited by bakunin; 02-11-2013 at 06:28 PM..
tip78
# 2  
Old 02-11-2013
What error r u gtting. Can u paste ur code?
# 3  
Old 02-11-2013
no errors
it's just reloading the same page
my code:
Code:
$socket=IO::Socket::INET->new("$host:80");
defined $socket or die "!!! 029 $!\n";
        
print $socket "POST /script.aspx HTTP/1.1
Host: $host
User-Agent: $ua
Connection: keep-alive
Referer: http://$host/script.aspx
Cookie: $cookie
Content-Type: application/x-www-form-urlencoded
Content-Length: ".(length$content)."
        
$content";

same problem with LWP btw
it's perl

Last edited by tip78; 02-11-2013 at 05:51 PM..
tip78
# 4  
Old 02-11-2013
If you cannot post your code, we cannot help you.

[edit] edit it in under me, why don't you. Smilie

Last edited by Corona688; 02-11-2013 at 05:55 PM..
# 5  
Old 02-11-2013
Quote:
Originally Posted by kg_gaurav
What error r u gtting. Can u paste ur code?
From simple rules of the UNIX.COM forums:
Quote:
(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.
Regards,
Alister
# 6  
Old 02-11-2013
What is $host ? What is $content?

I'm not sure this looks right:
Code:
length$content

Code:
length $content

# 7  
Old 02-11-2013
Quote:
Originally Posted by Corona688
What is $host ? What is $content?

I'm not sure this looks right:
Code:
length$content

Code:
length $content

you can't try it by yourself there's authorization
length$content works fine for all times
there's no mistakes in code, i've done it many times
my question was - why there some options changing places in data?
and why it working fine in browser and not working in script?

btw this __EVENTDATA some shit from ASP.net
some protection mechanism maybe
tip78
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies

2. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

3. Programming

Html form to submit data to bash script

hi all, im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies

4. UNIX for Dummies Questions & Answers

How to submit form on an php webpage from command line?

Hello, i have page domain.com/form.php the form fields on form.php are named: name=ipaddress name=port and submit button is named: submit i want to ask how the linux command will look like to submit the form filled with: ipaddress: 127.0.0.1 port: 80 I tried various curl and... (5 Replies)
Discussion started by: postcd
5 Replies

5. Shell Programming and Scripting

Transpose Data form Different form

HI Guys, I have data in File A.txt RL03 RL03_A_1 RL03_B_1 RL03_C_1 RL03 -119.8 -119.5 -119.5 RL07 RL07_A_1 RL07_B_1 RL07_C_1 RL07 -119.3 -119.5 -119.5 RL15 RL15_A_1 RL15_C_1 RL15 -120.5 -119.4 RL16... (2 Replies)
Discussion started by: asavaliya
2 Replies

6. Shell Programming and Scripting

Using cURL to submit a post form

I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php . I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies

7. Shell Programming and Scripting

using wget to submit a form on linksys router

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). http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127 Here is my wget command: wget --http-user=xyz --http-password=xyz... (1 Reply)
Discussion started by: mike909
1 Replies

8. Shell Programming and Scripting

PHP Help with Form Submit

Hi, I have a custom HTML form that has a couple radio buttons and a text field that requires a number. I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number. ... (3 Replies)
Discussion started by: nck
3 Replies

9. UNIX for Advanced & Expert Users

Changing Unix form to Microsoft Word form to be able to email it to someone.

Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Discussion started by: Cheraunm
8 Replies
Login or Register to Ask a Question