Hatena::ブログ(Diary)

satoru.netの自由帳 このページをアンテナに追加 RSSフィード

190127Sunday

https失敗するcentos6系さばーでやること

https失敗するcentos6系さばーでやること


yum install openssl-devel

cd /usr/bin/ ; curl -LOk http://xrl.us/cpanm ; chmod +x cpanm

cpanm Net::SSLeay

cpanm LWP::Protocol::https::Socket

181110Satday

[] nes resources ..

https://www.spriters-resource.com/nes/

ファミコン系ゲームつくりたいとき用の素材サイト

180921Friday

[]perlからphpのsession read

いまさらperlつかってるひとなんて化石なんだろうなあとおもいつつーperlだいすき


https://www.h-fj.com/blog/archives/2013/02/27-152952.php

use Data::Dumper

use CGI::Cookie;

use PHP::Serialization qw( unserialize );

my %ck = fetch CGI::Cookie;;

my $data = $memd->get($ck{PHPSESSID}->value);

$data =~ s/^[^\|]+\|//;

my $ref = PHP::Serialization::unserialize($data);

print Dumper($ref);

180626Tueday

when https disabled memo

yum -y install perl-Net-SSLeay perl-Crypt-SSLeay perl-IO-Socket-SSL
cpanm LWP::Protocol::https

180112Friday

coincheck-API perl

#!/usr/bin/perl

use HTTP::Tiny;
use Digest::SHA qw/hmac_sha256_hex/;
use strict;

my $ACCESS_KEY = ACCESS_KEY;
my $SECRET_KEY = SECRET_KEY;

my $dt = time*10000;
my $url = "https://coincheck.com/api/ticker";
my $signature = hmac_sha256_hex($dt . $url ,$SECRET_KEY);
my $tiny = new HTTP::Tiny(
	default_headers => {
		"ACCESS-KEY" => $ACCESS_KEY,
		"ACCESS-NONCE"=> $dt,
		"ACCESS-SIGNATURE"=> $signature,
	}
);

my $res = $tiny->get("$url");
print $res->{content};

©satoru.net
Mail Twitter