Skip to content

Instantly share code, notes, and snippets.

View GreeeenApple's full-sized avatar
🏠
Working from home

GreenApple GreeeenApple

🏠
Working from home
View GitHub Profile
# -*- coding: utf-8 -*-
import sys
import json
import urllib
import urllib2
import oauth2 as oauth
from multiprocessing import Process
import datetime
import base64
# -*- coding: utf-8 -*-
import smtplib
import email
import wx
HOST = "hogehoge.jp"
def click_post(event):
# -*- coding: utf-8 -*-
import telnetlib
import wx
HOST = "127.0.0.1" # hoge.jp
PORT = 25 # smtp
def click_post(event):
# -*- coding: utf-8 -*-
import wave
INFILE = "beatefll.dll"
OUTFILE = "beatefll.wav"
f = open(INFILE, "rb")
wv = wave.open(OUTFILE, "wb")
data = f.read()
@GreeeenApple
GreeeenApple / ああああああ
Last active October 22, 2015 10:57
ああああ
import lxml.html
res_html = lxml.html.parse("http://seccon2015.connpass.com/event/21425/").getroot()
target_path = "/html/body/div/div/div/div/div/h4/a"
print(res_html.xpath(target_path)[0].text)
def f(i):
if i == 0:
return 1
else:
return i * f(i - 1)
s = str(f(int(raw_input())))
i = len(s) - 1
while s[i] == "0":
#alias python="bpython"
#for i in `seq 5`do echo 1; done
alias ls='ls -CF'
alias s='ls'
alias l='ls -CF'
alias ...='cd ../../'
alias ....='cd ../../..'
alias la='ls -a'
import requests
Dest = "http://localhost:8080/{0}"
req = requests.get(Dest.format("wp-login.php"))
cookie_value = dict(req.cookies)
# create post id,pw
login_id = ["test", "wei", "a", "admin", "admin", "admin", "nimda"]
login_pw = ["test", "wei", "a", "admin", "wei", "password", "password"]
@GreeeenApple
GreeeenApple / lineproxy.py
Created February 16, 2016 19:21
already fixed(?) yo yo
import os
from libmproxy import controller, proxy
from libmproxy.proxy.server import ProxyServer
import commands
def themerequest(flow):
target_host = "dl.shop.line.naver.jp"
target_path = "theme.zip"
replace_path = "/themeshop/v1/products/5b/8f/d2/5b8fd2d0-03ba-45d2-9c81-c5ad9b1abfe0/2/ANDROID/theme.zip"
@GreeeenApple
GreeeenApple / hoge.py
Created September 13, 2016 13:14
callbackメモ
def callback(i, d, z):
z += [i]
def hoge(callback, d=0):
for i in range(10):
callback(i, d=d)
if __name__ == "__main__":
p = []
hoge(lambda x, d, z=p: callback(x, d, z))