чекер на HTTPS?

Discussion in 'Болталка' started by DjYos23, 14 Jan 2009.

  1. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    реално ли такоые написат?
     
  2. groundhog

    groundhog Elder - Старейшина

    Joined:
    12 May 2007
    Messages:
    1,159
    Likes Received:
    425
    Reputations:
    180
    А в чём проблема? Есть же софт работающий по протоколу HTTPS...
     
  3. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    логично. на коком язике лехче будит писат такои чекер? php?
     
  4. SVAROG

    SVAROG Elder - Старейшина

    Joined:
    13 Feb 2007
    Messages:
    424
    Likes Received:
    86
    Reputations:
    -1
    PHP cURL
     
  5. SVAROG

    SVAROG Elder - Старейшина

    Joined:
    13 Feb 2007
    Messages:
    424
    Likes Received:
    86
    Reputations:
    -1
    http://ru2.php.net/manual/ru/function.curl-setopt.php
    http://ru2.php.net/manual/ru/book.curl.php
     
  6. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    вроде всо ок.. тем нимение некоторие луди исшезают после пару днеи писаниа скрипта. может комуто в личку скинут саитик ( прокансултириватса ) если не трудно конешно
     
  7. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    не ужели изза етотво? Two things that I noted, one of which has been mentioned earlier, if you are connecting to an SSL site (https) and don't have the appropriate certificate, don't forget to set CURLOPT_SSL_VERIFYPEER as "false"... it's set to "true" by default. Scratched my head over 2 hours to figure this one out as I had a machine with an older version installed and everything worked fine without using this option on that one - but failed on other machines with newer versions.

    Second very important thing, I've never had my scripts work (tried on various machines, multiple platforms) with a Relative path to a COOKIEJAR or COOKIEFILE. In my experience I HAVE to specify the absolute path and not the relative path.

    Small script I wrote to connect to a page, gather all cookies into a jar, connect to another page to login, taking the cookiejar with you for authentication:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_COOKIEJAR, "/Library/WebServer/Documents/tmp/cookieFileName");
    curl_setopt($ch, CURLOPT_URL,"https://www.example.com/myaccount/start.asp");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    ob_start(); // Prevent output
    curl_exec ($ch);
    ob_end_clean(); // End preventing output
    curl_close ($ch);
    unset($ch);

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "field1=".$f1."&field2=".$f2."&SomeFlag=True");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_COOKIEFILE, "/Library/WebServer/Documents/tmp/cookieFileName");
    curl_setopt($ch, CURLOPT_URL,"https://www.example.com/myaccount/Login.asp");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    $result = curl_exec ($ch);
    curl_close ($ch);
    mcbreen at gmail dot com
    13-Jun-2007 01:35
    If you are getting the following error:

    SSL: certificate subject name 'domain-or-ip-1.com' does not match target host name 'domain-or-ip-2.com'

    Then you can set the following option to get around it:

    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
     
  8. groundhog

    groundhog Elder - Старейшина

    Joined:
    12 May 2007
    Messages:
    1,159
    Likes Received:
    425
    Reputations:
    180
    DjYos23, можешь в личку написать проконсультироваться...

    Курл не всегда хорош при разработке в виду своей тормозности и крупногабаритности... Необходимо знание многих констант и некоторых специфичных ситуаций (как то CURLOPT_SSL_VERIFYHOST). Я бы рекомендовал по старинке юзать fsockopen.
     
  9. geezer.code

    geezer.code Elder - Старейшина

    Joined:
    22 Jan 2007
    Messages:
    552
    Likes Received:
    358
    Reputations:
    90
    можно написать на Руби :) если интересует стучи в асю
     
  10. groundhog

    groundhog Elder - Старейшина

    Joined:
    12 May 2007
    Messages:
    1,159
    Likes Received:
    425
    Reputations:
    180
    geezer.code, в задаче ничего сложно кроме капчи... Готов написать распозновалку капчи на руби? :) Капча нетривиальная, с размытием :)
     
  11. geezer.code

    geezer.code Elder - Старейшина

    Joined:
    22 Jan 2007
    Messages:
    552
    Likes Received:
    358
    Reputations:
    90
    капчу бить лучше другими средствами (производительность руби не позволяет), но на капчу готов взглянуть , решить и это думаю возможно :)
     
  12. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    хм.. я так понимаю с етово саита нелза привизат каптчу к анти-каптча или каптчаботу? в етом всо дело? кто сможит дат ответ на етот вопросик? (скину саитик в личку)
     
  13. [dei]

    [dei] Active Member

    Joined:
    24 Nov 2008
    Messages:
    171
    Likes Received:
    112
    Reputations:
    5
    кидай, гляну
     
  14. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    [dei] выслал
     
  15. [dei]

    [dei] Active Member

    Joined:
    24 Nov 2008
    Messages:
    171
    Likes Received:
    112
    Reputations:
    5
    все там можно, curl'ом
     
  16. DjYos23

    DjYos23 New Member

    Joined:
    3 Sep 2008
    Messages:
    0
    Likes Received:
    0
    Reputations:
    0
    даже не знаю што скозат.. с однои сторони говорат што всо ок и нет не коких проблем и с другои сторони кодеры исшезают.

    если ест луди с опытом по данному топику отпишитис. буджет 25-30$
     
    #16 DjYos23, 14 Jan 2009
    Last edited: 14 Jan 2009