Skip to content

Instantly share code, notes, and snippets.

View quoidautre's full-sized avatar

Dark Passenger quoidautre

View GitHub Profile
@quoidautre
quoidautre / django_create_user.gist
Created November 8, 2021 13:25 — forked from makeittotop/django_create_user.gist
Create / remove user / superuser in a django app
>>> from django.contrib.auth.models import User
# Create a regular user 'foo'
>>> user = User.objects.create_user('foo', 'foo.bar@xxx.com', 'bar')
# List all users
>>> User.objects.all()
[<User: admin>, <User: abegail>, <User: foo>]
>>> User.objects.all()[1].is_superuser
@quoidautre
quoidautre / plate-snitch.js
Created September 9, 2017 19:56 — forked from taitems/plate-snitch.js
Image processing to identify license plate
openalpr.IdentifyLicense(imagePath, function (error, output) {
// handle result
});
@quoidautre
quoidautre / plate-snitch.js
Created September 9, 2017 19:55 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {
@quoidautre
quoidautre / wget.sh
Last active September 22, 2015 07:49 — forked from nepsilon/3-handy-wget-tips.md
Wget tips
# Copy a whole site locally,
# including images, css, js
# and converting links
wget -p -m -k fullweb​.io
# Check for 404 links
wget --spider your-url-list.txt
# give it an HTML page with -F
wget --spider -F you-webpage.html

XSS-game by Google

Welcome, recruit! Cross-site scripting (XSS) bugs are one of the most common and dangerous types of vulnerabilities in Web applications. These nasty buggers can allow your enemies to steal or modify user data in your apps and you must learn to dispatch them, pronto!

At Google, we know very well how important these bugs are. In fact, Google is so serious about finding and fixing XSS issues that we are paying mercenaries up to $7,500 for dangerous XSS bugs discovered in our most sensitive products.

In this training program, you will learn to find and exploit XSS bugs. You'll use this knowledge to confuse and infuriate your adversaries by preventing such bugs from happening in your applications.

There will be cake at the end of the test.

@quoidautre
quoidautre / application.js
Created November 23, 2012 10:01 — forked from codeschool-courses/models.js
Challenge 7-6 // BackBoneJS - codeschool
var AppRouter = Backbone.Router.extend({
routes: { "appointments/:id": "show", "": "index" },
initialize: function(options){
this.appointmentList = options.appointmentList;
},
index: function(){
var appointmentsView = new AppointmentListView({collection: this.appointmentList});
appointmentsView.render();