Skip to content

Instantly share code, notes, and snippets.

View initbrain's full-sized avatar

Julien Deudon initbrain

View GitHub Profile
@initbrain
initbrain / NOTICE.md
Last active January 24, 2024 19:37
Python Wi-Fi Positioning System, use Google Maps Geolocation API, tested on GNU/Linux (require iw) and Mac OS X (require airport), special thanks go to contributors!
@initbrain
initbrain / livebox_utility.py
Last active November 4, 2023 17:35
Script de renouvellement d'adresse IP (prise en charge des Livebox 1 et 2)
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain)
# Livebox_utility v0.2 du 26/09/2011
# Testé sous Windows XP SP3 (32bits) avec VirtualBox
# et sous Windows 7 Pro SP1 (64bits) grâce à Py2exe :
# https://www.initbrain.fr/static/code/Livebox_utility.rar
import urllib2, base64, re
@initbrain
initbrain / screenshot.py
Last active June 1, 2023 14:02
Python screenshot tool (fullscreen/area selection)
#!/usr/bin/env python3
# Python screenshot tool (fullscreen/area selection)
# Special thanks to @tomk11, @frakman1, @aspotton and @lucguislain for the improvements
import sys
from PyQt5 import QtCore, QtGui
from PyQt5.QtGui import QPixmap, QScreen
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QSizePolicy
from PyQt5.QtWidgets import QGroupBox, QSpinBox, QCheckBox, QGridLayout
from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout
@initbrain
initbrain / threadqueue_example.py
Created October 17, 2013 11:21
Python thread-safe queue example
#!/usr/bin/env python
from Queue import Queue
from threading import Thread
from urllib2 import urlopen
from re import compile, MULTILINE
from time import time
class ThreadUrl(Thread):
@initbrain
initbrain / http-tomcat-manager.nse
Last active November 29, 2021 07:11
Nmap NSE script that performs a dictionary/bruteforce attack over login and password fields of Apache Tomcat default web management pages
local shortport = require "shortport"
local http = require "http"
local stdnse = require "stdnse"
local brute = require "brute"
local creds = require "creds"
description = [[
Performs a dictionary/bruteforce attack over login and password fields of Apache Tomcat default web management pages.
]]
@initbrain
initbrain / kivy_spectrogram.py
Created March 16, 2017 00:14
Kivy + Matplotlib + Scipy spectrogram test
#!/usr/bin/env python2.7
# Kivy + Matplotlib + Scipy spectrogram test
# Julien Deudon (initbrain)
# 201703160114
# See :
# https://github.com/kivy-garden/garden.matplotlib/tree/master/examples
# https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.spectrogram.html
@initbrain
initbrain / ripe_search_browser.py
Last active December 14, 2018 09:59
RIPE Database - Full Text Search Scraper (using QtWebKit.QWebView from PySide)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import re
from PySide import QtCore, QtGui, QtWebKit
class Browser(QtGui.QMainWindow):
def __init__(self):
@initbrain
initbrain / google_pic_search.py
Created October 8, 2013 16:19
Script permettant d'effectuer des recherches d'images sur Google
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Pour les tests :
# python google_pic_search.py -l https://twimg0-a.akamaihd.net/profile_images/2298747498/n9hzj4nx98tgsxnpdagd.png
# python google_pic_search.py -i /home/initbrain/Images/initbrain.png
# Importations
import sys
import os
@initbrain
initbrain / urlquery_parser.py
Last active March 8, 2018 14:16
urlquery.net parser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from lxml.etree import tostring
from lxml.html import fromstring
import urllib2
def req(url, http_proxy=None, timeout=30, retry=2):
result = None
@initbrain
initbrain / motion_recorder.py
Created September 24, 2016 15:41
A Python/OpenCV script that detect motion on webcam and allow record it to a file.
#!/usr/bin/env python
import cv2.cv as cv
from datetime import datetime
import time
class MotionDetectorAdaptative():
def onThresholdChange(self, val): # Callback when the user change the detection threshold
self.threshold = val