Skip to content

Instantly share code, notes, and snippets.

@matteyeux
matteyeux / ios_dcsd_output_set.c
Last active August 29, 2019 02:40 — forked from alexhude/ios_dcsd_output_set.c
Setting up /dev/uart.debug-console output for DCSD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <assert.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <sys/event.h>
#!/bin/bash
mkdir temp
cd temp
wget http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip
unzip futurerestore-latest.zip
cp futurerestore_linux futurerestore
chmod +x futurerestore
sudo cp futurerestore /usr/local/bin
cd ..
rm -rf temp
http://appldnld.apple.com/ios11.0/091-31329-201700919-35AC292C-9027-11E7-8C48-1D35B64D2808/iPhone10,6_11.0_15A372_Restore.ipsw
@matteyeux
matteyeux / xnu-4570.1.46-arm64-steps.txt
Created October 9, 2017 06:45 — forked from Proteas/xnu-4570.1.46-arm64-steps.txt
steps to build arm64 version of xnu-4570.1.46
Following are my steps to build the ARM64 version of xnu-4570.1.46, hope this is helpfull for saving time.
1. Use Xcode 9.0
2. Preparation is same as macOS, and there is a guide: https://0xcc.re/building-xnu-kernel-macosx-sierrra-10-12-x/
3. There is an ARM64 version libfirehose: https://github.com/Proteas/install_firehose_lib
4. Copy and edit the ARM64 config(CFLAGS, LDFLAGS) from darwin-on-arm/xnu to your target project
5. Example CFLAGS: -Darm64 -DARM64 -D__arm64__ -D__ARM64__ -DLP64 -DCONFIG_EMBEDDED -mkernel -DARM64_BOARD_CONFIG_T8011=1
6. Fix compiling stage errors by directly importing the missing headers or editing the code
7. Fix linking stage errors by implementing place holder funcitons for: chudxnu_cpu_alloc, etc
8. If missing symbol __divti3 in linking stage, get the runtime from llvm.
void cool_delay(int timeinms){
if (bitRead (TIFR2, 0) == 1)
{
TCNT2 = 9;
bitSet (TIFR2, TOV2);
if (++varCompteur == 12)
{
varCompteur = 0;
ledon;
Reading 40 bytes:
Reading at malicious_x = 0xfffffffffffffeb6... Success: 0x54=’T’ score=19 (second best: 0x02 score=7)
Reading at malicious_x = 0xfffffffffffffeb7... Unclear: 0x68=’h’ score=998 (second best: 0x02 score=917)
Reading at malicious_x = 0xfffffffffffffeb8... Unclear: 0x65=’e’ score=999 (second best: 0x02 score=696)
Reading at malicious_x = 0xfffffffffffffeb9... Success: 0x20=’ ’ score=2
Reading at malicious_x = 0xfffffffffffffeba... Unclear: 0x4D=’M’ score=996 (second best: 0x02 score=926)
Reading at malicious_x = 0xfffffffffffffebb... Success: 0x02=’▒’ score=13 (second best: 0x61 score=4)
Reading at malicious_x = 0xfffffffffffffebc... Unclear: 0x67=’g’ score=998 (second best: 0x02 score=912)
Reading at malicious_x = 0xfffffffffffffebd... Unclear: 0x69=’i’ score=995 (second best: 0x02 score=922)
Reading at malicious_x = 0xfffffffffffffebe... Unclear: 0x63=’c’ score=999 (second best: 0x02 score=930)
@matteyeux
matteyeux / Alerts.strings
Last active January 8, 2018 18:14
TypeStatus Plus 1.4
<!-- Explanation of the alert type setting. -->
<key>ALERT_TYPE_EXPLANATION</key>
<string>S'applique uniquement aux notifications prévues pour TypeStatus Plus.</string>
<!-- Explanation of the above setting. -->
<key>WAKE_WHEN_LOCKED_EXPLANATION</key>
<string>Allume l'écran lorsque vous recevez une notification de TypeStatus lorsque celui-ci est verrouillé.</string>
<!-- Option to use the respective app icon. -->
<key>ICON</key>
  • créer une box vagrant
  • trouver la private_key
  • "load private_key" dans Puttygen
  • sauvegarder la private key

putty : ssh -> auth -> selectionner private key

# dump database
mysqldump -u root -p'root' -h localhost ragnarok_bdd > ragnarok_bdd.sql
# restore database
mysql -u root -p -Dragnarok_bdd < ragnarok_bdd.sql
# run sql command from bash
mysql --user="root" -p --database="ragnarok_bdd" --execute="show tables;"
@matteyeux
matteyeux / is_wireless.c
Created June 9, 2018 10:06 — forked from edufelipe/is_wireless.c
C example code to list all network interfaces and check whether they are wireless or not. Linux only. Tested on Ubuntu 10.04 and 12.04, but should be compatible with pretty much everything out there.
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <ifaddrs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/wireless.h>