PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Handtekening hw
7 sec ago
Untitled
2 sec ago
Untitled
4 sec ago
Untitled
8 sec ago
Untitled
18 sec ago
Untitled
14 sec ago
Untitled
14 sec ago
betaNS
Lua | 30 sec ago
Untitled
By: a guest on
Oct 7th, 2012
| syntax:
C
| size: 2.23 KB | hits: 65 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
This paste has a previous version,
view the difference
.
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
// make_self_npdrm by geohot
// part of geohot's awesome tools for the PS3
// released under GPLv3, see http://gplv3.fsf.org/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmp.h>
#include <time.h>
#include <openssl/sha.h>
#include <openssl/aes.h>
#include "zlib.h"
#include "include/ps3_common.h"
#include "include/elf.h"
#include "include/keys.h"
#include "include/oddkeys.h"
#include "include/sha1_hmac.h"
#include "include/self.h"
#include "include/aes_omac.h"
//#define NO_CRYPT
//#define NPDRM
//#define SPRX
#ifdef NPDRM
#define KEY(SUFFIX) npdrm_##SUFFIX
#else
#define KEY(SUFFIX) appold_##SUFFIX
#endif
u8 nubpadding_static
[
]
=
{
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x30
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
#ifdef SPRX
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7B
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x02
,
0x00
,
0x00
#else
#ifdef NPDRM
// this broke lv2diag.self
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3B
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x20
,
0x00
#else
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x3B
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
#endif
#endif
}
;
// 0x1B in retail
// 0x3B in lv2diag
u8 cflags_static
[
]
=
{
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x30
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
// 0x40000000 == control flag set as Root
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
#ifndef NPDRM
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x62
,
0x7C
,
0xB1
,
0x80
,
0x8A
,
0xB9
,
0x38
,
0xE3
,
0x2C
,
0x8C
,
0x09
,
0x17
,
0x08
,
0x72
,
0x6A
,
0x57
,
0x9E
,
0x25
,
0x86
,
0xE4
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
#else
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x62
,
0x7C
,
0xB1
,
0x80
,
0x8A
,
0xB9
,
0x38
,
0xE3
,
0x2C
,
0x8C
,
0x09
,
0x17
,
0x08
,
0x72
,
0x6A
,
0x57
,
0x9E
,
0x25
,
0x86
,
0xE4
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x5D
,
0xC0
,
#endif
}
;
create a
new version
of this paste
RAW Paste Data
// make_self_npdrm by geohot // part of geohot's awesome tools for the PS3 // released under GPLv3, see http://gplv3.fsf.org/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <gmp.h> #include <time.h> #include <openssl/sha.h> #include <openssl/aes.h> #include "zlib.h" #include "include/ps3_common.h" #include "include/elf.h" #include "include/keys.h" #include "include/oddkeys.h" #include "include/sha1_hmac.h" #include "include/self.h" #include "include/aes_omac.h" //#define NO_CRYPT //#define NPDRM //#define SPRX #ifdef NPDRM #define KEY(SUFFIX) npdrm_##SUFFIX #else #define KEY(SUFFIX) appold_##SUFFIX #endif u8 nubpadding_static[] = { 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, #ifdef SPRX 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00 #else #ifdef NPDRM // this broke lv2diag.self 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x01,0x00,0x00,0x20,0x00 #else 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00 #endif #endif }; // 0x1B in retail // 0x3B in lv2diag u8 cflags_static[] = { 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x40000000 == control flag set as Root 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02, #ifndef NPDRM 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x62,0x7C,0xB1,0x80,0x8A,0xB9,0x38,0xE3,0x2C,0x8C,0x09,0x17,0x08,0x72,0x6A,0x57, 0x9E,0x25,0x86,0xE4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, #else 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x62,0x7C,0xB1,0x80,0x8A,0xB9,0x38,0xE3,0x2C,0x8C,0x09,0x17,0x08,0x72,0x6A,0x57, 0x9E,0x25,0x86,0xE4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0xC0, #endif };