This file contains 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
This bug was also called moonshine in the beginning | |
Basically the following bug is present in all bootroms I have looked at: | |
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output | |
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code | |
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer | |
4. it then returns wLength which is the length it wants to recieve into the buffer | |
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages | |
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already | |
7. if all the data was recieved th |
This file contains 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 torch | |
from torch import nn | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
import torch.optim as optim | |
# toy feed-forward net | |
class Net(nn.Module): | |
def __init__(self): |
This file contains 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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder] |
This file contains 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 PIL import Image | |
import argparse | |
from collections import OrderedDict | |
def parseMask(string): | |
mask = [] | |
for val in string.split(","): | |
if "-" in val: | |
min, max = val.split("-") | |
mask += [1 << (i - 1) for i in range(int(min), int(max) + 1)] |
This file contains 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
Select all and delete (actually move to buffer) | |
:%d | |
Select all and copy to buffer | |
:%y | |
Use p to paste the buffer. |
This file contains 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
# **************** READ THIS FIRST ****************** | |
# | |
# This is not a script for you to run. I repeat, do not download and run this! | |
# | |
# This is only a guide to show the required steps for successful UEFI + GRUB2 installation | |
# Many of the choices are examples or assumptions; don't blindly type shit into your machine | |
# until/unless you at least read the comments around each command | |
# | |
# These steps assume you've booted in UEFI mode by preparing your USB stick per these instructions: | |
# https://wiki.archlinux.org/index.php/UEFI#Archiso |
This file contains 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
/** | |
* Poor version of checksec.sh script for PE (checks for ASLR, NX, Integrity, SEH flags) | |
* | |
* Copy/Paste commands | |
* c:\> dir /s /b *.dll > DllList.txt | |
* c:\> checksec.exe -f DllList.txt > DllList_checksec.txt | |
* | |
* @ref | |
* https://msdn.microsoft.com/en-us/library/windows/desktop/ms680339(v=vs.85).aspx | |
*/ |
This file contains 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
python | |
sys.path.insert(0, '/path/to/module/dir') | |
import hexdump | |
end |
This file contains 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
[Colors] | |
AbstractTableViewBackgroundColor=#272822 | |
AbstractTableViewHeaderTextColor=#000000 | |
AbstractTableViewSelectionColor=#363930 | |
AbstractTableViewSeparatorColor=#555A4C | |
AbstractTableViewTextColor=#FFFFFF | |
DisassemblyAddressBackgroundColor=#XXXXXX | |
DisassemblyAddressColor=#AE81FF | |
DisassemblyAutoCommentBackgroundColor=#XXXXXX | |
DisassemblyAutoCommentColor=#CF780D |
This file contains 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
# $Id: vim-keys.conf,v 1.2 2010/09/18 09:36:15 nicm Exp $ | |
# | |
# vim-keys.conf, v1.2 2010/09/12 | |
# | |
# By Daniel Thau. Public domain. | |
# | |
# This configuration file binds many vi- and vim-like bindings to the | |
# appropriate tmux key bindings. Note that for many key bindings there is no | |
# tmux analogue. This is intended for tmux 1.3, which handles pane selection | |
# differently from the previous versions |