Skip to content

Instantly share code, notes, and snippets.

View benoitjpnet's full-sized avatar
🇯🇵
Working from home

Benoit benoitjpnet

🇯🇵
Working from home
View GitHub Profile
Je fais partie des gens qui « piratent » puis achètent et je reste toujours incompréhensif devant ces gens et ces entreprises (comme @Wakanim) qui n'arrêtent pas de râler à propos du téléchargement illégal.
Selon moi, que vous le vouliez ou non, il n'y a rien à faire pour le « piratage ».
Exemple, je suis allé voir en août 2012 (sorti en juillet) au cinéma <a href="http://www.allocine.fr/film/fichefilm_gen_cfilm=206736.html">Les Enfants Loups</a> et j'ai adoré, du coup voici ce qui que j'ai fait :
— Tiens, je le reverrais bien en Blu-ray, quand est-ce qu'il sort en France ? Quoi ? En Juin 2013 ? Are you fucking kidding me?
— Bon quand est-ce qu'il sort au Japon (vosta) ? Février 2013.
— Ok donc en France on doit attendre 10 mois pour acheter le Blu-ray et 6 mois au Japon (déjà trop !).
— Février 2013 : Let's download it! (vosta)
<?php
/* Geolocalization part. */
$bannedCountry = array();
$bannedCountry['Love Lab'] = array('FR', 'BE'); // BE pour tester ;)
$visitorCountry = geoip_country_code_by_name($_SERVER['REMOTE_ADDR']);
$post = get_post();
$postTitle = $post->post_title;
foreach($bannedCountry as $animeTitle => $bannedCountryCode) {
if($animeTitle == $postTitle) {
file = /var/log/squid3/access.log
pattern = "TCP_DENIED"
mailto = xxx
template = /etc/log2mail/mail
;
; BIND reverse data file for reverse 2001:0bc8:dead::/48
;
@ IN SOA dns1.domain.fr. webmaster.domain.fr. (
2013112022 ; Serial
1h ; Refresh
30m ; Retry
1w ; Expire
1d ) ; Negative Cache TTL
;
@benoitjpnet
benoitjpnet / gr.sh
Created December 16, 2013 15:59
Get the groups of an user and add another user into these groups.
for group in $(grep user1 /etc/group | cut -d':' -f1 | sed '/user1/d'); do adduser user2 $group; done
# Yout need to register a repository.
# This action need to be only done one time.
# $ curl -XPUT 'http://localhost:9200/_snapshot/backup' -d '{
# "type": "fs",
# "settings": {
# "location": "/home/backup/elasticsearch",
# "compress": true
# }
# }'
$ aacskeys -va /media/bd
aacskeys 0.4.0e by arnezami, KenD00, Key, Nobu1789
Current path: /usr/share/aacskeys
MKBv: 12
Device key: 810827A76E5B2CC1685E3217A23E2186
Processing key: 973940BB180E83266231EE596CEF65B2
Encrypted C-value: 3F68BC4C168C01CDF97C55D08B5BE16C
Corresponding uv: 00000080
@benoitjpnet
benoitjpnet / bridge-fbx6hd
Last active August 29, 2015 13:56
Bridge to analyze network trafic from Freebox v6 Player and Freebox v6 Server
# brctl addbr br0
# brctl adif br0 eth0
# brctl adif br0 eth1
# ifconfig br0 up
# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.0000aa002005 no eth0
eth1
@benoitjpnet
benoitjpnet / dhclient.sh
Last active August 29, 2015 14:02
online IPv6 sucks :(
#!/bin/bash
# Relaunch dhclient when it crash...
mailaddr="[email protected]"
IPv6=true
pgrep -f dhclient6 > /dev/null
status=$?
if [[ $status != 0 ]]; then
IPv6=false
@benoitjpnet
benoitjpnet / addmailsvmail.sh
Created July 1, 2014 12:50
add mails vmail
#!/bin/bash
regex="(.*);(.*);(.*)"
#regex2=";([^\"]+)"
lastuidNumber=2024
while read line; do
[[ $line =~ $regex ]]
# Get name
name=${BASH_REMATCH[2]}
# Get uid