Skip to content

Instantly share code, notes, and snippets.

View jh00nbr's full-sized avatar
🌎
Saiyajin in training living on Earth

Jhonathan Davi jh00nbr

🌎
Saiyajin in training living on Earth
View GitHub Profile
#!/usr/bin/python
#Exemplo encrypt e decrypt by jh00n - Cifra de Cesar
import sys
def encrypt(mensagem):
cifra = ''
mensagem = mensagem.lower()
for letras in mensagem:
if letras in alfabeto:
x = alfabeto.find(letras) + chave
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from lxml import html
url = "http://www.freeproxylists.net/?c=br&f=1&s=rs"
req = requests.get(url)
string = html.fromstring(req.content)
#result = string.xpath('//title/text()')
from flask import Flask, render_template, request
import os , shelve , atexit , threading , urllib2 , time
app = Flask(__name__)
poll_data = {
'question' : 'You agree that the Brazilian internet should be stapled?',
'fields': ['Yes', 'No']
}
db = shelve.open("votes.db",writeback=True)
#!/usr/bin/env python
import requests
for i in xrange(0,3):
req = requests.get("http://v0t3.pwn2win.party/poll?field=No")
req2 = requests.get("http://v0t3.pwn2win.party/results")
print req2.content
from flask import Flask, render_template, request
import os , shelve , atexit , threading , urllib2 , time
app = Flask(__name__)
poll_data = {
'question' : 'You agree that the Brazilian internet should be stapled?',
'fields': ['Yes', 'No']
}
db = shelve.open("votes.db",writeback=True)
# -*- coding: utf-8 -*-
# _ _
# ___ ___ _ _| |_ ___| |_
# | _| . | | | _| -_| |
# |_| |___|___|_| |___|_|_|
#
# Page: www.facebook.com/InurlBrasil
# Blog: blog.inurl.com.br
#Dependencias
@jh00nbr
jh00nbr / intercepted_writeup_icectf.py
Last active February 15, 2017 14:17
Writeup - Intercepted Conversations Pt.1 - IceCTF 2016
#!/usr/bin/env python
# By Jhonathan Davi A.K.A jh00nbr_ / Team RTFM - Red Team Freakin' Maniacs - rtfm-ctf.org
# jh00nbr: http://jhonathandavi.com.br
# Writeup - Intercepted Conversations Pt.1 - IceCTF 2016
hids_codes = {"0x04":"a","0x05":"b","0x06":"c","0x07":"d","0x08":"e","0x09":"f","0x0A":"g","0x0B":"h","0x0C":"i","0x0D":"j","0x0E":"k","0x0F":"l","0x10":"m","0x11":"n","0x12":"o","0x13":"p","0x14":"q","0x15":"r","0x16":"s","0x17":"t","0x18":"u","0x19":"v","0x1A":"w","0x1B":"x","0x1C":"y","0x1D":"z","0x1E":"1","0x1F":"2","0x20":"3","0x21":"4","0x22":"5","0x23":"6","0x24":"7","0x25":"8","0x26":"9","0x27":"0","0x36":",","0x33":":","0x28":"\n","0x2C":" ","0x2D":"_","0x2E":"=","0x2F":"{","0x30":"}"}
layout_dvorak = { 'q':"'", 'w':',', 'e':'.', 'r':'p', 't':'y', 'y':'f', 'u':'g', 'i':'c', 'o':'r', 'p':'l', '_':'_', ':':'S','[':'/', '{':'{', '}':'}' ,']':'=','a':'a', 's':'o', 'd':'e', 'f':'u', 'g':'i', 'h':'d', 'j':'h', 'k':'t', 'l':'n', ';':'s', "'":'-','z':';', 'x':'q', 'c':'j', 'v':'k', 'b':'x', 'n':'b', 'm
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# _ _
# ___ ___ _ _| |_ ___| |_
# | _| . | | | _| -_| |
# |_| |___|___|_| |___|_|_|
#
# Page: www.facebook.com/InurlBrasil
# Blog: blog.inurl.com.br
@jh00nbr
jh00nbr / generate_ips.py
Last active October 27, 2017 00:11
Script utilizado para gerar a lista de ips com base nos prefixies
#!/usr/bin/env python
import subprocess
import sys
#Script utilizado para gerar a lista de ips com base nos prefixes
output_file = open("output_ips","a")
prefixes_ovh = ['109.190.0.0/16','151.127.0.0/16','46.105.0.0/16','37.187.0.0/16','46.105.192.0/20','46.105.192.0/23','46.105.194.0/23','54.36.0.0/16','51.254.0.0/15','54.38.0.0/16','51.254.0.0/15','91.121.0.0/16','91.134.0.0/16']
@jh00nbr
jh00nbr / gist:354440e806f9d8e891255d0e87330a4d
Created November 11, 2017 15:22 — forked from dalethedeveloper/gist:1503252
Mobile Device Detection via User Agent RegEx

#Mobile Device Detection via User Agent RegEx

Yes, it is nearly 2012 and this exercise has been done to death in every imaginable language. For my own purposes I needed to get the majority of non-desktop devices on to a trimmed down, mobile optimized version of a site. I decided to try and chase down an up-to-date RegEx of the simplest thing that could possibly work.

I arrived at my current solution after analyzing 12 months of traffic over 30+ US based entertainment properties (5.8M+ visitors) from Jan - Dec 2011.

The numbers solidified my thoughts on the irrelevancy of including browsers/OSes such as Nokia, Samsung, Maemo, Symbian, Ipaq, Avant, Zino, Bolt, Iris, etc. The brass tacks of the matter is that you certainly could support these obscure beasts, but are you really going to test your site on them? Heck, could you even find one?! Unless the folks that pay you are die hard Treo users my guess is "No".

Interestingly enough my research shows that /Mobile/ is more efficient than **/iP(