2012-04-01 10 views
0

は4shared.comのログインパネルとして働く簡単なログインページです:cURL:ログインスクリプト(httpsプロトコル)の作成方法ここ

<form id="login_form" method="post" action="https://www.4shared.com/index.jsp"> 
    <input type="text" placeholder="username" name="login" id="iloginfield"> 
    <input type="password" placeholder="password here" name="password" id="ipassfield"> 
    <input type="submit" value="Login"> 
</form> 

それは動作します。

働いているはずです
curl "http://www.4shared.com/index.jsp" -d "login=xxxxxxx&password=yyyyyyyyyyyyy" -D "/tmp/header.txt" 

を: そして私は、私は単純に実行できると思っていました。 しかし、それは失敗しました。

なぜですか?どうしたらいいですか?

+0

どのような方法で失敗しますか?また、フォームが 'https://' URLを参照していますが、あなたは' http:// 'を使っています。これは具体的な理由ですか?フォーム内のURL参照を使用しても失敗しますか? – larsks

+1

私はちょうど間違ったコード化されたパスフレーズを打ち込んだことがわかりました...なんて恥... – Determinant

答えて

0

あなたはどのような出力を見ていますか?サーバーが送信するクッキーを保存することができます。

-c/--cookie-jar <file name> 
      Specify to which file you want curl to write all cookies after a 
      completed operation. Curl writes all cookies previously read 
      from a specified file as well as all cookies received from 
      remote server(s). If no cookies are known, no file will be writ‐ 
      ten. The file will be written using the Netscape cookie file 
      format. If you set the file name to a single dash, "-", the 
      cookies will be written to stdout. 

      NOTE If the cookie jar can't be created or written to, the whole 
      curl operation won't fail or even report an error clearly. Using 
      -v will get a warning displayed, but that is the only visible 
      feedback you get about this possibly lethal situation. 

      If this option is used several times, the last specified file 
      name will be used. 
+0

申し訳ありません。私はちょうど間違ってコード化されたパスフレーズを入力したことがわかりました... – Determinant

関連する問題