Skip to content

Instantly share code, notes, and snippets.

View mpgn's full-sized avatar
🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.

mpgn

🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.
View GitHub Profile
@mpgn
mpgn / jsbin.cocatuta.html
Created August 9, 2014 19:57
YouTube Player paused when iframe is not visible on the screen. Live example http://jsbin.com/cocatuta/15/
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<iframe id="player" type="text/html" width="640" height="390"
@mpgn
mpgn / index.html
Created August 30, 2014 10:47
YouTube Javascript Player API Tutoriel : http://youtu.be/2liztlOx0NY.
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Player YouTube JS</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
@mpgn
mpgn / main.c
Last active August 29, 2015 14:07
C pow vs shift
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
int main() {
const size_t nTests = 10000000;
@mpgn
mpgn / app.js
Last active August 29, 2015 14:17
angular-vlc example
var app = angular.module('app', [
'ngResource',
'ngRoute',
'ui.bootstrap',
'kdarcel.vlc-player',
'kdarcel.vlc-player.tpl',
]);
@mpgn
mpgn / express-subdomain.js
Last active August 30, 2020 01:16
express-subdomain example
var subdomain = require('express-subdomain');
var express = require('express');
var app = express();
var router = express.Router();
app.use(subdomain('api', router));
app.get('/', function (req, res) {
@mpgn
mpgn / list_to_matrix.py
Last active November 10, 2015 21:15
List to matrix python
def split_r(arr, size):
arrs = []
while len(arr) > size:
pice = arr[:size]
arrs.append(pice)
arr = arr[size:]
arrs.append(arr)
return arrs
K = separation
@mpgn
mpgn / brutus-combinaison.go
Last active March 18, 2016 10:35
brute force hash (md5, sha1) first char in Go using combinaison from Python or rand
package main
import (
"fmt"
"os"
"crypto/md5"
//"crypto/sha1"
//"math/rand"
"time"
"encoding/hex"
# Padding Oracle Attack against PKCS7
# From https://github.com/mpgn/Padding-oracle-attack
# martial puygrenier
####################################
# CUSTOM YOUR RESPONSE ORACLE HERE #
####################################
''' the function you want change to adapte the result to your problem '''
def test_validity(response, error):
@mpgn
mpgn / check_list_owasp.md
Created December 1, 2016 14:34
Check list OWASP

Check list OWASP

Information Gathering

  • Conduct Search Engine Discovery and Reconnaissance for Information Leakage
  • Fingerprint Web Server
  • Review Webserver Metafiles for Information Leakage
  • Enumerate Applications on Webserver
  • Review Webpage Comments and Metadata for Information Leakage
  • Identify application entry points
@mpgn
mpgn / test.md
Last active April 1, 2017 18:00

test test

Test for dynamic rendering :

[{{ config['WEBSITE_NAME'] }}]({{ url_for("home.index") }})