I hereby claim:
- I am guillaumerose on github.
- I am guillaumerose (https://keybase.io/guillaumerose) on keybase.
- I have a public key whose fingerprint is 4C92 A833 9C48 C34E D917 7017 4FAB 23B1 A548 D15C
To claim this, I am signing this object:
require "rubygems" | |
require "mechanize" | |
agent = Mechanize.new | |
page = agent.get "https://cas.it-sudparis.eu/cas/login?service=http://si-etudiants.it-sudparis.eu/opdotnet/noyau/SSO/cas.aspx" | |
session = page.body.match(/jsessionid\=(.*?)\?service/)[1] | |
lt = page.body.match(/name\=\"lt\" value=\"(.*?)\"/)[1] |
TP 3: Working with netfilter and libnetfilter-queue | |
The objective of this TP is to work with netfilter kernel module creation and user-space processing of queued packets using libnetfilter-queue. | |
Important: The result of this TP should be sent to: [email protected] or [email protected] with TP3-yourname as a subject. | |
If you don't finish on time, consider it as a homework and send it before Friday April 15 at 8:00PM. | |
Context: | |
-------- | |
Whenever the host receives an incomming ssh connection (on port 22), the module drops the packet. |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <linux/types.h> | |
#include <linux/netfilter.h> /* for NF_ACCEPT */ | |
#include <linux/ip.h> | |
#include <linux/tcp.h> |
#include <linux/module.h> //these are for every module | |
#include <linux/kernel.h> | |
#include <linux/types.h> //u_int && co | |
#include <linux/skbuff.h> //struct sk_buff | |
#include <linux/in.h> //basic internet shiat | |
#include <linux/ip.h> //protocol headers | |
#include <linux/tcp.h> | |
#include <linux/netfilter.h> //need this for register_ | |
#include <linux/netfilter_ipv4.h> //.. |
# language: fr | |
Fonctionnalité: DHCP | |
Afin de distribuer des IPs | |
En tant qu'API appelée par le serveur DHCP | |
Je souhaite pouvoir répondre à celui-ci | |
Scénario: Répondre correctement | |
Soit un adhérent ayant la chambre 1005 | |
Et une date de départ dans 1 an | |
Et un ordinateur avec pour mac 00-11-22-33-44-55 |
module Backend | |
class DHCP < Sinatra::Base | |
get '/options' do | |
content_type "application/json" | |
ordinateur = Ordinateur.where(:mac => params["mac"].try(:gsub, ":", "-")).limit(1).first | |
return '{}' if ordinateur.nil? || ordinateur.desactive? | |
ordinateur.vu! |
hello = (name) -> | |
print "Hello #{name} !" | |
hello "Java" |
Serveur = | |
2013-11-06 16:56:43.127 HTTPElevator http://0.0.0.0:9292/reset?cause=Connexion+refus%C3%A9e | |
2013-11-06 16:56:44.126 HTTPElevator http://0.0.0.0:9292/call?atFloor=0&to=UP | |
2013-11-06 16:56:44.143 HTTPElevator http://0.0.0.0:9292/nextCommand UP | |
2013-11-06 16:56:45.126 HTTPElevator http://0.0.0.0:9292/call?atFloor=3&to=UP | |
2013-11-06 16:56:45.139 HTTPElevator http://0.0.0.0:9292/nextCommand UP | |
Client, premier essai = | |
127.0.0.1 - - [06/Nov/2013 16:56:43] "GET /reset?cause=Connexion+refus%C3%A9e HTTP/1.1" 200 - 0.0190 | |
127.0.0.1 - - [06/Nov/2013 16:56:44] "GET /nextCommand HTTP/1.1" 200 2 0.0027 |
I hereby claim:
To claim this, I am signing this object:
find . -iname "*.asc" -exec gdal_translate -a_nodata none -a_srs EPSG:2154 {} {}.tif \; | |
gdal_merge.py -o france.tif *.tif | |
gdalwarp -overwrite -s_srs EPSG:2154 -t_srs EPSG:4326 france.tif france.wgs84.tif | |
gdal_translate -of AAIGrid -ot Int32 france.wgs84.tif france.asc |