Skip to content

Instantly share code, notes, and snippets.

View ozuma's full-sized avatar

Osumi, Yusuke ozuma

View GitHub Profile
@ozuma
ozuma / _gvimrc
Created December 12, 2014 07:40
Windows版gvimの設定
set formatoptions=q
set list
set lines=48
set columns=150
set statusline=%<%f\ %m%r%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l/%L,%v
set guifont=MS_Gothic:h10
set guioptions-=T
set noautoindent
set guicursor=a:blinkon0
set noundofile
@ozuma
ozuma / gist:2228c8dacb83cfc070b0
Created April 19, 2015 19:53
CVE CentOS Red hat
http://2ch.hork.info/res/maguro.2ch.sc/linux/1401022481
921 :login:Penguin:2014/12/23(火) 08:39:26.88 ID:OPRM/DVe.net
>>920
これですね
https://rhn.redhat.com/errata/rhel-server-6-errata.html
https://rhn.redhat.com/errata/RHSA-2014-2024.html
922 :login:Penguin:2014/12/23(火) 08:55:56.02 ID:OPRM/DVe.net
@ozuma
ozuma / rpm-qa-cent6.6.txt
Created May 21, 2015 00:43
CentOS 6.6のminimalリスト
acl-2.2.49-6.el6.x86_64
attr-2.4.44-7.el6.x86_64
audit-2.3.7-5.el6.x86_64
audit-libs-2.3.7-5.el6.x86_64
authconfig-6.1.12-19.el6.x86_64
b43-openfwwf-5.2-4.el6.noarch
basesystem-10.0-4.el6.noarch
bash-4.1.2-29.el6.x86_64
binutils-2.20.51.0.2-5.42.el6.x86_64
bridge-utils-1.2-10.el6.x86_64
@ozuma
ozuma / ssl_tls_history.md
Created September 16, 2015 13:59
SSLとTLSの歴史 (日経ネットワーク2015/09より)

SSLとTLSの歴史

日経ネットワーク 2015/09 号よりメモ:

  • SSL 1.0: 1994/07
    • Netscape社が仕様完成、脆弱性が見つかり実装はされず
  • SSL 2.0: 1994/12
    • Netscape社がNetscape Navigator 1.1に実装
  • SSL 3.0: 1995/12
  • Netscape Navigator 2.0に実装
@ozuma
ozuma / postdump.cgi
Last active December 17, 2015 03:48
Perl CGI: Dump POST(HTTP) body to a temporary file.
#!/usr/bin/perl
use strict;
my $postdata;
read(STDIN, $postdata, $ENV{'CONTENT_LENGTH'});
my $time = time();
open(FP, ">/var/tmp/post-${time}.dat");
print FP $postdata;
close(FP);
@ozuma
ozuma / post_rawcontent.pl
Created May 9, 2013 13:13
POST(HTTP) raw content body.
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $url = "http://localhost/~ozuma/postdump.cgi";
my $post_body = <<POST_XML;
<?xml version="1.0" encoding="utf-8"?>
<sample>
@ozuma
ozuma / response_headers_list.pl
Created May 9, 2013 13:59
GET HTTP Response Headers as Array.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:20.0) Gecko/20100101 Firefox/20.0");
my $req = HTTP::Request->new(GET => 'http://www.example.com/');
my $res = $ua->simple_request($req);
@ozuma
ozuma / response_headers_asstring.pl
Created May 9, 2013 13:58
Get HTTP Response Headers as string.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:20.0) Gecko/20100101 Firefox/20.0");
my $req = HTTP::Request->new(GET => 'http://www.example.com/');
my $res = $ua->simple_request($req);
@ozuma
ozuma / send_udp.rb
Created May 15, 2013 02:18
Send a UDP test packet.
#!/usr/bin/ruby
require "socket"
udp = UDPSocket.open()
sockaddr = Socket.pack_sockaddr_in(53, "192.168.0.1")
udp.send("HELLO", 0, sockaddr)
udp.close
@ozuma
ozuma / recv_udp.rb
Last active December 17, 2015 15:29
Receive a UDP Packet. (As server)
#!/usr/bin/ruby
require "socket"
udp = UDPSocket.open()
udp.bind("0.0.0.0", ARGV[0])
p udp.recv(65535)
udp.close