Skip to content

Instantly share code, notes, and snippets.

View Cryolite's full-sized avatar

Cryolite Cryolite

View GitHub Profile
@Cryolite
Cryolite / client
Created February 7, 2019 16:25
https://qiita.com/nwtgck/items/78309fc529da7776cba0 のプロトコル上に証明書による安全な鍵交換を実装する PoC コード
#!/usr/bin/env bash
set -euo pipefail
if [[ -v VERBOSE ]]; then
set -x
PS4='+$LINENO: '
fi
function print-error-message ()
{
@Cryolite
Cryolite / config.txt
Created September 24, 2018 03:47
ルータ B の WAN 側インタフェイス (LAN2) における不正アクセス検知機能の設定例
# ip lan2 intrusion detection in on
# ip lan2 intrustion detection out on
@Cryolite
Cryolite / config.txt
Created September 24, 2018 03:37
ルータ B の IP マスカレイド適用時における DF ビットの扱いの設定
# nat descriptor masquerade remove df-bit off
@Cryolite
Cryolite / config.txt
Last active September 24, 2018 03:50
ルータ B の WAN 側インタフェイス (LAN2) に対する IP フィルタ設定の例
# ip filter 1 pass 192.168.2.0/24 * icmp 0
# ip filter dynamic 1 * * ping
# ip lan2 filter 1 dynamic 1
# ip filter 2 pass * 192.168.2.0/24 icmp-error
# ip lan2 filter 2
@Cryolite
Cryolite / network1.txt
Created September 24, 2018 02:55
ネットワーク構成
The Internet
~~~~~~~~~~~~
|
|
|
|LAN2
+--------------------------+
| Router B (YAMAHA RTX810) |
+--------------------------+
|LAN1
observer = startObservingAsynchronousEvent(timeout=one_minute);
while (true) {
if (observer.eventOccurs()) break;
if (observer.eventOccursOrTimeout()) {
// if (observer.eventOccurs()) break;
throw TimeoutException();
}
sleep(one_second);
}

We Are Soliciting Private and Company Sponsors

Wandbox is an online service with which source code snippets in many programming languages compile and run.
This service has been made and maintained by @melponn and @kikairoya.

Currently, it is running on three Sakura VPS 2G Plan servers. It takes JPY56,310 a year as the running cost.

It is a hard way to cope with the operating expenses by ourselves.
Therefore, we are soliciting private and company sponsors who support Wandbox.
We ask for cooperation from individuals and companies who usually use Wandbox.

@Cryolite
Cryolite / gist:3269831
Created August 6, 2012 03:44
A test case for nanahan::Map
#include <map/map.hpp>
#include <boost/functional/hash.hpp>
#include <boost/unordered_map.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_smallint.hpp>
#include <boost/random/uniform_real.hpp>
#include <ext/throw_allocator.h>
#include <cstddef>
#include <ctime>
#include <utility>
struct B
{};
struct D
: private B
{};
template<typename T>
T &&declval();
// [conv.lval]/1
// A glvalue (3.10) of a non-function, non-array type T can be converted to
// a prvalue. If T is an incomplete type, a program that necessitates this
// conversion is ill-formed. ...
//
// [expr.cond]/3, /5 and /6
//
// Note: [class.conv.fct] does not require the type specified in
// conversion-type-id of conversion-function-id should be complete.