Skip to content

Instantly share code, notes, and snippets.

View Maroc-OS's full-sized avatar

Yahya Lmallas Maroc-OS

View GitHub Profile
@Maroc-OS
Maroc-OS / cuda10_colab.sh
Created June 14, 2021 15:34 — forked from Ending2015a/cuda10_colab.sh
Install CUDA 10.0 and nvcc on Google Colaboratory
# install cuda 10.0
!apt-get update;
!wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64 -O cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!apt-key add /var/cuda-repo-10-0-local/7fa2af80.pub
!apt-get update
!apt-get -y install gcc-7 g++-7
!apt-get -y install cuda
@Maroc-OS
Maroc-OS / memedit.c
Created December 15, 2018 22:43 — forked from jungjoon/memedit.c
for raw memory dump and edit via /dev/mem in linux
/*
for memory dump and edit via /dev/mem
** Note that any kernel constraints must be removed! ex, CONFIG_STRICT_DEVMEM and etc **
build intruction:
ANDROID_TARGET=android-8
CROSS_COMPILE=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-
SYS_ROOT=${ANDROID_NDK}/platforms/${ANDROID_TARGET}/arch-arm/
@Maroc-OS
Maroc-OS / rootme.c
Created December 15, 2018 22:41 — forked from teknoraver/rootme.c
/*
* rootme Copyright (C) 2018 Matteo Croce <[email protected]>
* a tool to gain root using /dev/mem
*
* This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
* This is free software, and you are welcome to redistribute it
* under certain conditions; type `show c' for details.
*/
#include <stdio.h>
@Maroc-OS
Maroc-OS / peek.c
Created December 15, 2018 22:40 — forked from mr1337357/peek.c
peek and poke for linux
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
int main(int argc,char **argv) {
int devmem = -1;
unsigned int addr = 0;
unsigned int val = 0;
@Maroc-OS
Maroc-OS / pydevmem.py
Created December 15, 2018 22:33 — forked from kylemanna/pydevmem.py
[HACK] Dump AM387x/TI81848 PHY registers
#!/usr/bin/env python
"""
This is designed primarily for use with accessing /dev/mem on OMAP platforms.
It should work on other platforms and work to mmap() files rather then just
/dev/mem, but these use cases aren't well tested.
All file accesses are aligned to DevMem.word bytes, which is 4 bytes on ARM
platforms to avoid data abort faults when accessing peripheral registers.
References:
@Maroc-OS
Maroc-OS / configure.ios
Created June 28, 2017 05:40 — forked from andrep/configure.ios
A script to run `./configure` for various iOS devices. Lightly tested and WorksForMe™.
#!/bin/sh -x -e
case "$ARCH" in
armv6-apple-darwin10|armv7-apple-darwin10|armv7s-apple-darwin10|arm64-apple-darwin10|i386-apple-darwin11)
;;
*)
cat <<EOF
Must set ARCH environment variable to
armv6-apple-darwin10 = All iOS devices
@Maroc-OS
Maroc-OS / Aircrack Commands
Created March 19, 2017 04:50 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@Maroc-OS
Maroc-OS / get_stack_arg.py
Created May 5, 2016 13:55 — forked from syndrowm/get_stack_arg.py
idapython script to resolv stack variable names
from idaapi import *
from idc import *
def get_stack_arg(arg, base='ebp'):
# find the stack frame
stack = GetFrame(here())
size = GetStrucSize(stack)
# figure out all of the variable names
names = []
@Maroc-OS
Maroc-OS / qira_plugin.py
Last active June 11, 2016 06:41
Enhanced QIRA python plugin
# import wingdbstub
# wingdbstub.Ensure()
import time
from threading import Thread
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
import idaapi
@Maroc-OS
Maroc-OS / gist:cdab9c863564919b169d
Created January 19, 2016 01:44 — forked from iamgreaser/gist:13989113cc9fc1e7c0ac
RC4 for ARM, x86 (untested)
/* void rc4_apply(char *stream, int len, char *rc4buf); */
rc4_apply:
push {r4, r5, r6, lr}
mov r3, #0
mov r4, #0
lp_rc4:
add r3, r3, #1
and r3, r3, #0xFF