Skip to content

Instantly share code, notes, and snippets.

@Ludo6431
Ludo6431 / dsisavpatch.diff
Created April 10, 2011 21:28
dsisavpatch little fix
diff --git a/exploits/dsisavpatch_py/dsisavpatch.py b/exploits/dsisavpatch_py/dsisavpatch.py
index 4ab6304..1a01bb9 100644
--- a/exploits/dsisavpatch_py/dsisavpatch.py
+++ b/exploits/dsisavpatch_py/dsisavpatch.py
@@ -108,13 +108,13 @@ if location[0:5] != 'http:':
end_of_redirect_host = location.find('/', 7)
redirect_host = location[7:end_of_redirect_host]
redirect_query = location[end_of_redirect_host:]
end_of_path = redirect_query.find('?')
redirect_path = redirect_query[0:end_of_path]
@Ludo6431
Ludo6431 / arm9.c
Created April 30, 2011 18:44
assert(0) shutdown DS
/*---------------------------------------------------------------------------------
Basic template code for starting a DS app
---------------------------------------------------------------------------------*/
#include <nds.h>
#include <stdio.h>
#include <assert.h>
//---------------------------------------------------------------------------------
@Ludo6431
Ludo6431 / main.c
Created June 4, 2011 13:07
exemple de définition de structure
#include <stdlib.h>
#include <stdio.h>
#include "pion.h"
int main(int argc, char *argv[]) {
Pion p;
pion_init(&p);
@Ludo6431
Ludo6431 / main.c
Created June 23, 2011 00:20
What makes including inline functions in headers impossible ?
#include <stdlib.h>
#include <stdio.h>
#include "test.h"
int main(int argc, char *argv[]) {
printf("inl_fun:%d\n", inl_fun(4));
printf("ninl_fun:%d\n", ninl_fun(4));
return 0;
@Ludo6431
Ludo6431 / sub_203A0A4.c
Created July 1, 2011 15:37
REing an arm asm function...
#if 0
sub_203A0A4:
LDR R3, [R1,#4]
CMP R3, #0
LDRNE R2, [R1]
STRNE R2, [R3]
LDR R2, [R1]
CMP R2, #0
LDREQ R0, [R1,#4]
LDRNE R1, [R1,#4]
@Ludo6431
Ludo6431 / irqs.c
Created July 4, 2011 19:41
ninty's irq functions
#include "irqs.h"
u32 irq_ack(u32 irqs) {
u16 ime = REG_IME;
REG_IME = 0;
u32 ifs = REG_IF;
REG_IF = irqs;
REG_IME = ime;
def answer_privmsg(c, e, s):
dest = ''
if e.eventtype() in ['pubmsg', 'action', 'pubnotice', 'join', 'part', 'kick', 'mode']:
dest = e.target()
else:
dest = nm_to_n(e.source())
c.privmsg(dest, s)
ludo6431@ludo6431-maverick-Aspire5100:~$ sudo fdisk -l /dev/sdb1
Disque /dev/sdb1 : 3960 Mo, 3960995840 octets
122 têtes, 62 secteurs/piste, 1022 cylindres
Unités = cylindres de 7564 * 512 = 3872768 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Identifiant de disque : 0x00000000
#!/bin/bash
cd "`dirname $0`"
BASESRC="fsroot"
IMGFILE="fsimg.img"
IMGSIZE="256" # in MB
TMPDIR="`mktemp -d`"
# <-- verifying mandatory things
/* Fork, handling errors. Returns the pid of the newly made child, or 0.
COMMAND is just for remembering the name of the command; we don't do
anything else with it. ASYNC_P says what to do with the tty. If
non-zero, then don't give it away. */
pid_t
make_child (command, async_p)
char *command;
int async_p;
{
int forksleep;