Skip to content

Instantly share code, notes, and snippets.

#coding:utf-8
import sys
from urllib import urlopen
from bs4 import BeautifulSoup
if __name__=='__main__':
argvs = sys.argv
"""
@epcnt19
epcnt19 / edmt.py
Created September 20, 2016 16:38
#coding:utf-8
import cv2
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import RandomizedPCA
from sklearn import svm
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
/*
* 駅データのAPIサイト(http://www.ekidata.jp)からXMLデータを取得し,パースするプログラム.
# coding:utf-8
import json
import base64
import urllib
import urllib2
import time
import tweepy
from bs4 import BeautifulSoup
@epcnt19
epcnt19 / setup_peda
Last active September 20, 2017 14:34
sudo apt-get install build-essential gcc-multilib git gdb
git clone https://github.com/zachriggle/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
#!/bin/bash
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
$ ./bin/exitmap dnspoison
2017-06-07 23:10:13,644 exitmap [INFO] Attempting to invoke Tor process in directory "/tmp/exitmap_tor_datadir". This might take a while.
2017-06-07 23:10:13,644 exitmap [INFO] No first hop given. Using randomly determined first hops for circuits.
2017-06-07 23:10:13,848 util [INFO] Tor Bootstrapped 0%: Starting
2017-06-07 23:10:15,837 util [INFO] Tor Bootstrapped 80%: Connecting to the Tor network
2017-06-07 23:10:15,837 exitmap [INFO] Successfully started Tor process (PID=30465).
2017-06-07 23:10:15,960 exitmap [INFO] Running module 'dnspoison'.
2017-06-07 23:10:17,148 modules.dnspoison [INFO] Domain whitelist: {'torrentfreak.com': [u'104.25.104.105', u'104.25.103.105'], 'www.youporn.com': [u'67.22.32.168'], 'blockchain.info': [u'104.16.55.3', u'104.16.54.3'], 'youporn.com': [u'67.22.32.168'], 'www.wikileaks.org': [u'95.211.113.154', u'141.105.69.239', u'95.211.113.131', u'195.35.109.53', u'141.105.65.113', u'195.35.109.44'], 'www.torproject.org': [u'89.45.235.21', u'138.201.14.1
@epcnt19
epcnt19 / http.py
Last active March 28, 2019 19:55
#coding:utf-8
import random
from scapy.all import *
HOST = 'www.example.com'
PORT = 80
if __name__=='__main__':
@epcnt19
epcnt19 / dllmain.cpp
Last active February 23, 2019 10:40
#include "stdafx.h"
#include "Windows.h"
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved){
switch (ul_reason_for_call){
case DLL_PROCESS_ATTACH:
MessageBox(NULL,"helloworld", "helloworld", NULL);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
#include "stdafx.h"
#include <iostream>
#include <Windows.h>
using namespace std;
int main(int argc,char *argv[])
{
int pid;
char* dllpath = "C:\\users\\user\\documents\\visual studio 2015\\Projects\\injector\\x64\\Debug\\dllexample.dll";