Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'd like to test auto-vote protection on my site (not published yet).

I've found Expect program, but I can't get it working with telnet http.

share|improve this question
    
Using it in a telnet / command line way is not preferred. Expect is a perl module, and as such you can use it together with LWP::Simple and create a very simple web client. –  Tommy Sep 24 '12 at 8:03
    
@Tommy, I don't understand your comment: Expect is not merely a perl module: en.wikipedia.org/wiki/Expect –  glenn jackman Sep 24 '12 at 13:30
    
@glennjackman : Perhaps I should have sais 'Expect is a perl module as well'. You can find expect bindings to most popular programming languages. And thus, create your very own (simple) http client. –  Tommy Sep 24 '12 at 18:56
add comment

1 Answer 1

up vote 3 down vote accepted

I'd use the "curl" command line tool to do this. I'm presuming that you have a form submission, in which a field vote can choose A, B, or C, for example:

curl -F vote=A http://example.com/submitvote/

or, if there were a name field to go with it, for example:

curl -F vote=C -F name="my name" http://example.com/submitvote/
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.