Skip to content

Instantly share code, notes, and snippets.

View dolmen's full-sized avatar
😁
Happy!

Olivier Mengué dolmen

😁
Happy!
View GitHub Profile
@dolmen
dolmen / find-pi.md
Last active March 29, 2023 13:50
How to find my Raspberry Pi IP address?

The MAC address of Raspberry Pi are in B8:27:EB:**:**:**. http://hwaddress.com/?q=Raspberry

# Scan the local network to put IPs in the ARP cache
nmap -sn -n $(route | sed -n '/^[1-9]/{s/ .*$//p;q}')/24 >/dev/null
# Look for Pi' MACs in the arp cache
arp -n | grep -i 'b8:27:eb:'
@kentfredric
kentfredric / winrar.pl
Created January 23, 2015 17:15
Abuse CPANM by hacking its library loading process to allow injecting arbitrary code.
#!/usr/bin/env perl
# FILENAME: unfatten.pl
# CREATED: 01/24/15 04:55:06 by Kent Fredric (kentnl) <kentfredric@gmail.com>
# ABSTRACT: Attempt to extract files from a codes fatpacked library.
use strict;
use 5.010001;
use warnings;
{
@maddingue
maddingue / SerializerUtils.pm
Last active August 29, 2015 14:13
types coercion
sub coerce_types {
my $struct = shift;
my $ref = ref $struct;
croak "can only work with references" unless $ref;
if ($ref eq "ARRAY") {
for my $i (0..$#{$struct}) {
next unless defined $struct->[$i];
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
use v5.10;
use strict;
use warnings;
BEGIN {
package Macro::Simple;
use Carp;
use Parse::Keyword {};
sub import
@dagolden
dagolden / version-pm-evolution.txt
Last active January 4, 2016 19:25
version number evolution discussions from Lyon 2014
Broad decisions about rationalizing version object behavior based on
discussions at the Lyon QAH. Participants: David Golden, Ricardo Signes,
Karen Etheridge, Leon Timmermans, Peter Rabbitson and Graham Knop
- version comparision should be done irrespective of the presence of
underscores in the string used to initialize the version object
- underscore should no longer be used as a tuple separator in vstrings or
vstring-like strings; vstrings are converted to tuples by splitting into
*characters* (not bytes) and converting to codepoints; any elements after
@sdeseille
sdeseille / gist:8402731
Last active January 3, 2016 03:29
Exercice proposé par Dolmen voir le GIST https://gist.github.com/dolmen/8352763 avec la coloration syntaxique Perl c'est mieux
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Spreadsheet::XLSX;
use Text::CSV;
use Data::Dumper;
my %city_data;
@sdeseille
sdeseille / exercice proposé par Dolmen
Last active January 2, 2016 16:49
Trouver la capacité d'accueil (en personne) regroupée par le nombre d'étoiles des établissements à partir des données en provenance de ce lien http://www.data.gouv.fr/fr/dataset/villages-de-vacances-classes-en-france
#!/usr/bin/perl
use strict;
use warnings;
my $infile = $ARGV[0];
my @data_struct;
my %data_idx;
my %capacity_groupby;
my $index=0;
@ingydotnet
ingydotnet / Feature:README-extension.md
Last active December 26, 2015 18:08
Feature request: README extensions detected from symlink

Hi guys,

I always hated that I have to add a filetype extension like .markdown or whatever. It would be nice if there was another way to detect the filetype, and just call the file README.

I just thought of a way to do this where nobody loses.

I often symlink my README.md file to a file call doc/my-project.md. And you guys render that as markdown. Great!

Since it's a symlink you can get the extension from the referent file (doc/whatever.ext) and I can call the file just README!

Retrieves MetaCPAN favourites and gets the associated GitHub repositories.
Checks if repository is starred and prompts to star the GitHub repository if
not already starred.