Skip to content

Instantly share code, notes, and snippets.

# -*- coding:utf-8 -*-
import zipfile
import os.path
# 対象となるファイル
with open("hello.txt", "w") as wf:
wf.write("hello world")
# zip圧縮する
@syed
syed / amazon_api_search.py
Created August 3, 2012 04:32
Gets data about books from amazon
from BeautifulSoup import BeautifulStoneSoup as bs
from quick_orm.core import Database
from sqlalchemy import Column,String,Text,Boolean
import bottlenose
import pprint
import logging
import re
import time
import xlrd
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 19 14:20:28 2012
@author: Nick Coblentz
"""
from burp import IBurpExtender
from burp import IMessageEditorTabFactory
from burp import IMessageEditorTab
@zxlooong
zxlooong / repo.py
Created June 16, 2013 15:07
repo.py
#!/usr/bin/env python
## repo default configuration
##
from __future__ import print_function
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
REPO_REV = 'stable'
# Copyright (C) 2008 Google Inc.
#
from burp import IBurpExtender
from burp import IContextMenuFactory
from burp import IExtensionHelpers
from javax.swing import JMenuItem
from java.awt.event import ActionListener
from java.awt.event import ActionEvent
from java.awt.event import KeyEvent
import traceback
# Burp is configured to look for python modules in c:\python27\lib.
# If the following file exists in that directory, it will be loaded
@venoms
venoms / buffaloNASshutdown.html
Created January 24, 2016 03:31
scans for, and shuts down buffalo NAS-s in the local network
<head>
<title>buffalo nas shutdown</title>
</head>
<body>
<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
<div id="output"></div>
<script>
var output = document.getElementById("output");
//stolen from https://github.com/diafygi/webrtc-ips
@thomaspatzke
thomaspatzke / CSRFToken.py
Created February 3, 2015 14:01
Burp extension: extract CSRF tokens from responses of selected Burp tools and update them with a custom session handling rule.
from burp import (IBurpExtender, IBurpExtenderCallbacks, ISessionHandlingAction, IHttpListener)
import re
class BurpExtender(IBurpExtender, ISessionHandlingAction, IHttpListener):
def registerExtenderCallbacks(self, callbacks):
self.callbacks = callbacks
self.helpers = callbacks.getHelpers()
callbacks.setExtensionName("Session CSRF Token Handling")
self.callbacks.registerSessionHandlingAction(self)
self.callbacks.registerHttpListener(self)
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 28 14:16:12 2012
@author: Nick Coblentz
Some of this code is borrowed from Brian Holyfield's Burp plugin located here: https://github.com/GDSSecurity/WCF-Binary-SOAP-Plug-In
It is also fully dependent on having NBFS.exe from his plugin in the same directory as Burp.
"""
from burp import IBurpExtender
@ecampidoglio
ecampidoglio / Out-Diff.ps1
Created January 18, 2012 21:48
A PowerShell function to colorize a sequence of text lines that represent an Universal Diff. For more information, see http://megakemp.com/2012/01/19/better-diffs-with-powershell/
function Out-Diff {
<#
.Synopsis
Redirects a Universal DIFF encoded text from the pipeline to the host using colors to highlight the differences.
.Description
Helper function to highlight the differences in a Universal DIFF text using color coding.
.Parameter InputObject
The text to display as Universal DIFF.
#>
[CmdletBinding()]
@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う