This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import wingdbstub | |
| # wingdbstub.Ensure() | |
| import time | |
| from threading import Thread | |
| from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket | |
| import idaapi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 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 |
NewerOlder