Skip to content

Instantly share code, notes, and snippets.

@mrtc0
mrtc0 / issue-1397-peda.md
Last active August 29, 2015 14:11
すごい広島#82-issue#1397.md

すごい広島 #82

issue #1397

PEDAを使ってみた

DEP,SSP,ASLR無効の状態でsuidなvulnで試した.
最終的にsecret.txtを読み出すことをゴールとした.

@mrtc0
mrtc0 / shoboi_anime.py
Created March 1, 2015 16:00
今日のアニメ確認スクリプト
#!/usr/bin/env python
# coding=utf-8
import feedparser
import datetime
# rss2.php https://sites.google.com/site/syobocal/spec/rss2-php
url = 'http://cal.syoboi.jp/rss2.php?usr=mrtc0&titlefmt=$(Mark)%20[$(ChName)]%20$(Title)%20$(SubTitleB)'
item = feedparser.parse(url)
@mrtc0
mrtc0 / password-gen.py
Last active November 2, 2019 08:24
Password Generator for Python3
#!/usr/bin/python3
import random
chars = "abcdefghijklmnopqrstuvwxyziABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890^?!?$%&/()=?`'+#*'~';:_,.-<>|"
password = ""
print("Use Char list = %s \n" % chars)
length = int(input("[*] Input Password Length: "))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrtc0
mrtc0 / web-honeypot.py
Last active February 27, 2016 18:42
my-webhoneypot
import sys
import SimpleHTTPServer
import SocketServer
import cgi
import logging
class Honey(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
logging.error(self.headers)
@mrtc0
mrtc0 / sshd_config
Last active August 29, 2015 14:20
sshd_configのテンプレート
#####
# 2015.5.7
# sshd_configのテンプレート
# OpenSSH_6.8p1で動作確認
# rootユーザーのログインを拒否
# 公開鍵認証 + password認証の2段階認証
# さらに強固にしたいならGoogle認証システムを使った2段階認証にしたりする
# 転送機能をすべて禁止
# 暗号方式をAESに限定
# TCP Keep Aliveではなく, ClientAliveを使用
@mrtc0
mrtc0 / md4-length4.py
Created June 25, 2015 01:19
Lengthが8のmd5ハッシュ値を生成し, 且つ, 0e[E]で始まるもの
import string, hashlib, re, itertools
for word in itertools.imap(''.join, itertools.product(string.uppercase + string.lowercase + string.digits, repeat=8)):
if re.match(r'0+[eE]+\d+$', hashlib.sha1(word).hexdigest()):
print word
@mrtc0
mrtc0 / network-vis.py
Created November 5, 2015 11:11
ネットワークのグラフを作成するスクリプト
import networkx as nx
from scapy.all import *
import matplotlib.pyplot as plt
# 無向グラフを作成
g = nx.Graph()
# 自分のIPアドレスを取得
myip = [x[4] for x in conf.route.routes if x[2] != '0.0.0.0'][0]
@mrtc0
mrtc0 / chinachu.nse
Created January 24, 2016 17:30
Get to recorded full-title from Chinachu
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local json = require "json"
description = [[
Get to recorded full-title from Chinachu
]]
@mrtc0
mrtc0 / nofity_python.py
Created April 2, 2016 05:22
Desktop Notification
#!/usr/bin/python
from gi.repository import Notify
Notify.init ("Hello world")
Hello=Notify.Notification.new ("Hello world","This is an example notification.","dialog-information")
Hello.show ()