Skip to content

Instantly share code, notes, and snippets.

@kaito834
kaito834 / curl_multipart-mixed_sample.bat
Created June 27, 2015 06:10
send a HTTP request which Content-Type is 'multipart/mixed' by cURL
@echo off
REM http://curl.haxx.se/docs/manpage.html#-F
REM http://curl.haxx.se/mail/archive-2010-03/0049.html
REM cURL installed with msysgit is used on this batch.
REM Output of "curl -V" is below
REM curl 7.41.0 (i386-pc-win32) libcurl/7.41.0 OpenSSL/0.9.8zf zlib/1.2.8
REM Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
REM Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz
set curlPath="C:\Program Files (x86)\Git\bin\curl.exe"
@kaito834
kaito834 / diff_win.txt
Created July 11, 2015 04:16
Compare two files on Windows instead of "diff" command; "fc" command or Compare-Object cmdlet
$>type diff-test_a.txt
This is test string.
hoge fuga.
This is test.
$>type diff-test_b.txt
This is test string.
@kaito834
kaito834 / splitStrByComma.py
Created July 18, 2015 03:08
Split str by comma, and validate the str whether those are decimal between 0 and 10
#!/usr/bin/env python
# tested by Python 3.4.3 on Windows 8.1
# Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
def main():
numbers = []
str = input('Please input numbers separated by comma: \n> ')
# https://docs.python.org/3/library/stdtypes.html#string-methods
@kaito834
kaito834 / refForBurpSuite.md
Created July 18, 2015 06:17
References for Burp Suite
@kaito834
kaito834 / import-myTestModule.py
Last active August 29, 2015 14:26
This is snippet to import my module; myTestModule.py and import-myTestModule.py were saved on same directory.
#!/usr/bin/env python
# coding: utf-8
# tested by Python 3.4.3 on Windows 8.1
# Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
'''
If you does NOT create .pyc file, run python.exe with -B option or
set non-empty value on PYTHONDONTWRITEBYTECODE, environment variable.
Ref.
@kaito834
kaito834 / pyCrypto_setup.py_build.txt
Last active August 29, 2015 14:26
This is snippet to encrypt or decrypt string by pyCrypto.
## Git Bash on Windows 10
$ git clone git@github.com:dlitz/pycrypto.git
Cloning into 'pycrypto'...
Enter passphrase for key '(snip)':
remote: Counting objects: 6554, done.
remote: Total 6554 (delta 0), reused 0 (delta 0), pack-reused 6554
Receiving objects: 100% (6554/6554), 3.78 MiB | 1.37 MiB/s, done.
Resolving deltas: 100% (3401/3401), done.
Checking connectivity... done.
@kaito834
kaito834 / Diff_暗号技術入門第3版_新版.md
Last active September 26, 2015 13:22
Difference between "暗号技術入門 第3版" and "新版暗号技術入門"

目次

  • 第3章 対称暗号(共通鍵暗号)
    • [追加] 差分解読法と線形解読法, DES
  • 第4章 ブロック暗号のモード
    • [追加] パディングオラクル攻撃, CBCモード
    • [追加] 初期化ベクトル(IV)への攻撃, CBCモード
    • [追加] Column: CTSモード, CBCモード
  • [追加] Column: GCMモード, CTRモード
@kaito834
kaito834 / cpu-meltdown-spectre.md
Last active January 14, 2018 10:04
Notes for Meltdown and Spectre

Related Links を読みながら、Meltdown/Spectre に関する理解を整理しました。 もしこの記事における間違いを見つけた場合には、コメントいただけると嬉しいです。

What is Meltdown/Spectre

Meltdown/Spectre は、CPU 実装に起因する Cache side-channel attack です。 これらの攻撃手法では、CPU の実装を悪用して、本来プロセスの実行権限でアクセスできないメモリ上のデータ(user/kernel space)を CPU キャッシュに書き出し、そのキャッシュから対象データを取得します。Meltdown/Spectre ともに CPU 実装を悪用しますが、 それぞれ悪用する CPU 実装が異なります(下表を参照)。

| Meltdown/Spectre | 攻撃手法 | 悪用する CPU 実装 | CVE番号 | CVSSv3 Base Metrics(Red Hat 評価) |

XCOM 2 の難易度「コマンダー」のアイアンマンモードを攻略すべく、 注意したこと・実践したことなどを整理しておきます。歯ごたえがある難易度で没頭したプレイしたことから、またプレイしたくなりそう。 そのときには、プレイする前にこのメモで振り返ってみたい。

What is "XCOM 2"

GAME WATCH の記事を読むと、どのようなゲームかイメージが沸きます。 ただ、結構ネタバレに踏み込んでいるため、それを承知の上で読む必要があります。

@kaito834
kaito834 / myNotes_create-root-ca.md
Created August 15, 2019 14:56
Notes for section:"11.4 プライベートCAを作る", "プロフェッショナルSSL/TLS"

This text is my notes to understand deeply section:"11.4 プライベートCAを作る" on プロフェッショナルSSL/TLS.

Versions of each tools

[ec2-user@ip-10-0-1-184 ~]$ curl -V
curl 7.61.1 (x86_64-koji-linux-gnu) libcurl/7.61.1 OpenSSL/1.0.2k zlib/1.2.7 libidn2/2.0.4 libssh2/1.4.3 nghttp2/1.31.1
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy Metalink