Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -!- coding:utf-8 -!-
import os
from twython import Twython
from twython.exceptions import TwythonError
def get_secrets():
#!/usr/bin/env python
import sys
import socket
def load_document(filename):
with open(filename, 'rb') as f:
return f.readlines()
0
000
01
010
02
03
080
09
1
10
@p3t3r67x0
p3t3r67x0 / scan.md
Last active January 11, 2018 10:59
GET /ccvv
GET /index.action

Tomcat 5.0.x status servlet

GET /status?full=true
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import tarfile
import datetime
def get_time_string():
d = datetime.datetime.now()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
def download_stream(video_url, video_name):
with open(video_name, 'wb') as handle:
response = requests.get(video_url, stream=True)
{
"randomize": {
"0": "chrome"
},
"browsers": {
"chrome": [
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36",

You need to add the following entry in /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:

deb http://deb.torproject.org/torproject.org xenial main
deb-src http://deb.torproject.org/torproject.org xenial main

Then add the gpg key used to sign the packages by running the following commands at your command prompt:

@p3t3r67x0
p3t3r67x0 / extract_arte_mp4.py
Last active October 29, 2017 15:59
Extract mp4 url from ARTE.tv and a proper title
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import requests
from lxml import html
from urlparse import urlparse
from fake_useragent import UserAgent
@p3t3r67x0
p3t3r67x0 / extract_records.py
Last active January 29, 2017 22:30
Retrieves domains from the database and tries to get records for each entry and updates the database when neccessary
#!/usr/bin/env python
from dns import resolver
from dns.name import EmptyLabel
from dns.resolver import NoAnswer
from dns.resolver import NXDOMAIN
from pymongo import MongoClient
from pymongo.errors import DuplicateKeyError