Skip to content

Instantly share code, notes, and snippets.

View achraf52's full-sized avatar

Achraf Almouloudi achraf52

View GitHub Profile
@ArduinoBasics
ArduinoBasics / Tutorial4_RFRemoteReplay.ino
Created August 29, 2017 04:59
Use Arduino to receive and transmit RF Remote signal
/*
433 MHz RF REMOTE REPLAY sketch
Written by ScottC 24 Jul 2014
Arduino IDE version 1.0.5
Website: http://arduinobasics.blogspot.com.au/2014/07/433-mhz-rf-module-with-arduino-tutorial_30.html
Receiver: XY-MK-5V Transmitter: FS1000A/XY-FST
Description: Use Arduino to receive and transmit RF Remote signal
------------------------------------------------------------- */
#define rfReceivePin A0 //RF Receiver data pin = Analog pin 0
@eelsivart
eelsivart / heartbleed.py
Last active June 7, 2024 02:16 — forked from sh1n0b1/ssltest.py
Heartbleed (CVE-2014-0160) Test & Exploit Python Script
#!/usr/bin/python
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
#
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
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
@mariotaku
mariotaku / wps_checksum.c
Created February 1, 2014 04:35
wps checksum tool
#include <stdio.h>
unsigned int wps_pin_checksum(unsigned int pin);
int main(int argc, char *argv[])
{
int pin;
if ((argc == 2 && sscanf(argv[1], "%i", &pin)) || fscanf(stdin, "%i", &pin))
{
if (pin > 9999999)
@amfeng
amfeng / index.php
Last active August 8, 2022 19:33
Stripe OAuth Example -- PHP
<?php
define('CLIENT_ID', 'YOUR_CLIENT_ID');
define('API_KEY', 'YOUR_API_KEY');
define('TOKEN_URI', 'https://connect.stripe.com/oauth/token');
define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize');
if (isset($_GET['code'])) { // Redirect w/ code
$code = $_GET['code'];
@jboner
jboner / latency.txt
Last active September 22, 2024 11:36
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD