Skip to content

Instantly share code, notes, and snippets.

View redpist's full-sized avatar

Jeremy Lecerf redpist

View GitHub Profile
@redpist
redpist / root.sh
Created October 27, 2016 09:09 — forked from Arinerron/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@redpist
redpist / FizzBuzz.rb
Last active June 10, 2016 13:59
Factorized FizzBuzz based on prime Factorization
(1..100).each do |n|
magic = n % 3 * 7 + n % 5 * 11
print 'Fizz' if [0, 11, 22, 33, 44].include? magic
print 'Buzz' if [0, 7, 14].include? magic
print n unless [0, 7, 11, 14, 22, 33, 44].include? magic
print "\n"
end
@redpist
redpist / gcc-w_this.c
Last active April 21, 2016 14:26
\o/
puts(const*);main(){const*_=__COUNTER__+__COUNTER__+__COUNTER__+
__COUNTER__+__COUNTER__-__COUNTER__+__COUNTER__+__COUNTER__
+__COUNTER__-sizeof(void);auto/**/$=_,_$=$<<2,$$=(_$<<3)-_$
,*$_=&$,(*main)()=puts;$=($=444)*0+$$*((($<<3)+($<<1))+1);
main(&0[$_]);{
{{{{{{}}}}}}}
}
function equal(obj1, obj2) { return (obj1 >= obj2 && obj1 <= obj2); }
@redpist
redpist / patch.css
Last active January 12, 2020 21:21
css properties : 'text-align: center' and 'letter-spacing: ...' product broken behaviour. Here is a patch.
h1 {
/* e.g. */
font-size: 5em;
/* problem */
letter-spacing: 0.4em; /* have fun when they went */
text-align: center; // both of them together!!
/* solution To fight end-of-line letter-spacing : */
template <typename T>
class CRTP
{
};
class Commonplace : public CRTP<Commonplace>
{
};
template <typename T>
struct Commonplace
{
typedef T Type;
};
#include <list>
class Wolf
{
public:
typedef std::list<Wolf> Pack;
};
class Wolf
{
public:
class Head
{
};
};
typedef int Integer;