This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# Stringクラスにxor(^)を追加してみるテスト。主にCTF用? | |
# | |
class String | |
def ^(str) | |
sho = self | |
lon = str | |
sho, lon = lon, sho if sho.size > lon.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IO | |
def readb; return self.read(1).unpack("C")[0]; end | |
def readw; return self.read(2).unpack("v")[0]; end | |
def readl; return self.read(4).unpack("V")[0]; end | |
def readbw; return self.read(2).unpack("n")[0]; end | |
def readbl; return self.read(4).unpack("N")[0]; end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'stringio' | |
module IOExtend | |
def readq; self.read(8).unpack("Q")[0]; end | |
def readd; self.read(4).unpack("V")[0]; end | |
def readw; self.read(2).unpack("v")[0]; end | |
end | |
class IO; include IOExtend; end | |
class StringIO; include IOExtend; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IDA .fds Loader | |
# usage: | |
# 1. Place into $IDA/loader/ | |
# 2. Open .fds file by IDA (select "Python FDS Loader") | |
# 3. "import fds; fds.add()" and select additional file | |
# Enjoy! | |
# reference: | |
# http://park19.wakwak.com/~fantasy/fds/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// charcount.mac | |
// 文字数を数えるマクロ(秀丸向け、8.32で動作確認) | |
// 実行すると、文書全体の文字数か、文を選択していればその部分の文字数をメッセージボックスで表示する。 | |
// 文字数は、すべての文字の数、改行抜き、さらに空白抜き、さらに句読点抜きの4つを表示する。 | |
// ただし/*……*/で囲まれた部分はカウントしない。 | |
// 「-- 」だけの行を発見するとそこまでの文字数を表示する。 | |
// なにかメモ書きしながら決められた文字数の文書を書く時には、 | |
// "-- "の行より上に本文、下にメモを書いておくと、本文を選択せずとも簡単に本文の文字数が求められる。 | |
// 参考: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <tchar.h> | |
#include <sddl.h> | |
#include <stdio.h> | |
#include <string> | |
#include <vector> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cl randomd.cpp /nologo /O2 /MD ws2_32.lib bcrypt.lib | |
// http://www.geekpage.jp/programming/winsock/ | |
// http://code.msdn.microsoft.com/windowsdesktop/Random-Number-Generation-e5b88ccc/sourcecode?fileId=42843&pathId=1800936463 | |
#include <windows.h> | |
//#include <tchar.h> | |
//#include <winsock2.h> | |
#include <bcrypt.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require "fiddle/import" | |
require "time" | |
require "optparse" | |
module Kernel32 | |
extend Fiddle::Importer | |
dlload "kernel32.dll" | |
extern "int CreateFile(void*, unsigned int, unsigned int, void*, unsigned int, unsigned int, int)", :stdcall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# usage: fetchall.rb <username> | |
CA_BUNDLE_FILE = "ca-bundle.pem" | |
require "json" | |
require "net/http" | |
require "net/https" | |
require "cgi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! GNU() | |
se ts=8 sw=2 | |
se cino=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 | |
endfunction | |
command! GNU call GNU() |
OlderNewer