This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 компоненты: | |
1. простенький api service, который чем-то похож на апи rucaptcha для приёма recaptcha. Нужно передать рекапча ключ и урл. | |
2. простенький socks5 прокси, который умеент подменять запросы, когда это нужно (чтобы домен (url) совпадал с доменом разгадываемой капчей) | |
3. браузер работника должен быть настроен на проксирование через наш socks5 прокси | |
Первым делом нужно запустить прокси и апи серверы. | |
Потом нужно дождаться, когда подключится работник (тот, кто капчу разгадывает), при этом работник должен настроить в браузере прокси socks5 с разыменование домена. | |
Потом сделать запрос на добавление капчи: | |
curl -XPOST --data-urlencode "googlekey=<публичный ключ рекапчи>" --data-urlencode "pageurl=<страница на которой разгадываем>" "http://127.0.0.1:3000/in.php" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use Mojo::IOLoop; | |
use Devel::Peek; | |
use Data::Dumper; | |
my $DEBUG = 1; | |
my $users = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use Socket ':all'; | |
socket(my $client, AF_INET, SOCK_DGRAM, IPPROTO_UDP) || die "socket: $!"; | |
bind($client, pack_sockaddr_in(7777, inet_aton('192.168.88.114'))); | |
send($client, "hi, vasya", 0, pack_sockaddr_in(12345, inet_aton('192.168.88.114'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use SOAP::Lite +trace => 'all'; | |
use DDP; | |
my $soap = new SOAP::Lite->new; | |
$soap->autotype(0); | |
$soap->readable(1); | |
$soap->service('http://ws.dpd.ru/services/geography2?wsdl'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use Mojo::IOLoop; | |
use Mojo::UserAgent; | |
use Mojo::URL; | |
my $ua = Mojo::UserAgent->new(max_redirects => 3); | |
sub find_new_url { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base; | |
use Mojo::IOLoop; | |
use Mojo::IOLoop::Client; | |
use Mojo::IOLoop::TLS; | |
use IO::Socket::IP; | |
my $s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use Socket; | |
use Mojo::IOLoop; | |
use IO::Socket::Socks qw/:constants $SOCKS_ERROR/; | |
my @configs = ({ | |
proxy_addr => '127.0.0.1', | |
proxy_port => 12345, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Mojo::Base -strict; | |
use Mojo::JSON::MaybeXS; | |
use Mojo::JSON 'decode_json'; | |
use Mojolicious::Lite; | |
use IPC::Open3; | |
use Mojo::IOLoop; | |
my $mystem_path = '/usr/local/bin/mystem'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package Reactor::Select; | |
use Mojo::Base -base; | |
use IO::Select; | |
sub new { | |
my $self = shift->SUPER::new; | |
$self->{select}{read} = IO::Select->new; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table test (id int primary key, a int, b int, unique (a, b)); | |
\d+ test | |
begin; | |
insert into test values (1, 1, 1); | |
do $$ | |
declare | |
_cn text; | |
begin | |
insert into test values (1, 2, 2); |
NewerOlder