Skip to content

Instantly share code, notes, and snippets.

@shimarin
shimarin / call_python.go
Last active April 28, 2021 07:18
Goで Pythonを呼ぶ実験
/**
* Goから Pythonの関数を呼び出す実験
* 適当な文字列を返してくる手頃な関数 platform.platform() を呼んでみる。
* http://docs.python.jp/2/library/platform.html
*
* Cから Pythonを呼び出す方法
* http://docs.python.jp/2/extending/embedding.html
* が基本となる。Go -> C -> Pythonという呼び出しフローになるのでやや煩雑
*/
package main
@kawasima
kawasima / 0_概要
Last active April 19, 2019 03:11
Struts1脆弱性の検証 [S2-020]
今回の問題は、StrutsでHttpリクエストパラメータをFormに入れる際に、commons-beanutilsの
BeanUtils.populateを使っていることに起因する。
populateの中で使われている、BeanUtils.setPropertyはノーチェックでBeanのプロパティを探すので、
プロパティ名を"class.classLoader.xxx"のように書いておくと、BeanのgetClassをよんで、
ClassオブジェクトのgetClassLoaderをよんで、…と連鎖してクラスローダが取得される。
そしてドットでつないだ最後のプロパティ名で値をセットにいくので、TomcatのWebAppClassLoaderが
途中でゲットされてしまうと、Struts2の脆弱性と同じ問題が発生してしまう。
@seansu4you87
seansu4you87 / geektools-multi-monitor.md
Last active January 4, 2025 22:04
GeekTools Multi Monitor Reposition

Geektools with Varying Monitor Setups

While I love my Geeklets, I had a pretty hard time to set them up consistently across varying monitor setups (home, work, on the go,...). The bad news first: There is no built in mechanism (as of 01/2013) to take care of this problem. Still there are good news: With some minor tinkering, you can automagically position your Geeklets across multiple setups.

The initial step is to add your Geeklets - you can totally ignore the positioning for the moment.

Which Geeklets Am I Running?

@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@kelseyhightower
kelseyhightower / gist:6191348
Last active July 5, 2018 05:20
go.crypto/ssh example
package main
import (
"bytes"
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/terminal"
"crypto"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
@rummelonp
rummelonp / zsh_completion.md
Last active February 22, 2023 15:06
zsh の補完関数の自作導入編

zsh の補完関数の自作導入編

あまり深く理解してないので識者のツッコミ大歓迎

補完を有効にする

取り敢えず最低限だけ

# 補完を有効にする
@fabrizioc1
fabrizioc1 / http-proxy.go
Last active October 27, 2020 12:32
Http proxy server in Go
package main
import (
"fmt"
"io"
"log"
"net/http"
)
type HttpConnection struct {
@aheadley
aheadley / 0800271375c4.pxe
Created October 5, 2012 00:01 — forked from robinsmidsrod/_INSTALL.md
Trying out the native iPXE menu feature with Ubuntu 12.04 preseed install working (and also pxe-dispatcher menu default set)
#!ipxe
echo
echo Booting UbuntuVM
set menu-default ubuntu
chain --replace --autofree default.pxe
@joernchen
joernchen / gist:3623896
Created September 4, 2012 17:34
XXE to RCE
This turns https://www.sec-consult.com/files/20120626-0_zend_framework_xxe_injection.txt
into a Remote Command Execution:
NOTE: It relies on the PHP expect module being loaded
(see http://de.php.net/manual/en/book.expect.php)
joern@vbox-1:/tmp$ cat /var/www/server.php
<?
require_once("/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php");
Zend_Loader_Autoloader::getInstance();
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。