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 struct import pack | |
from random import sample | |
dist = lambda a, b: (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2 | |
nn = lambda rgb, centers: min((dist(rgb, c), i) for i, c in enumerate(centers))[1] | |
class GIF(object): | |
def __init__(self, data, size): | |
self.size = size | |
self.data = data |
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
sc.killAutoHandle(); | |
sc.getService("ns:am2", (hndle) => { | |
utils.log("got handle 0x" + hndle.toString(16)); | |
// GetApplicationManagerInterface | |
var res = sc.ipcMsg(7996).data(0).sendTo(hndle).assertOk(); | |
sc.withHandle(res.movedHandles[0], (amih) => { | |
utils.log("got handle 0x" + amih.toString(16)); | |
// launch |
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
#!/usr/bin/python3 | |
""" | |
IMPORTANT - READ BEFORE CONTINUING: | |
1. This tool is only intended to repair machines that have been infected and never turned back on again. i.e. NO ENCRYPTION HAS HAPPENED YET | |
2. You should make a full disk backup before continuing. I am not responsible if this makes things worse. | |
3. This tool does not repair part of NTLDR which is corrupted by the malware (The second sector of the NTFS partition), you will need a secondary tool to do this. |
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
#!/usr/bin/env python | |
import sys | |
import array | |
import usb.core | |
import usb.util | |
import os | |
path = "/tmp/backlight-value" | |
# decimal vendor and product values |
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
sc.killAutoHandle(); | |
function c32to8(data) | |
{ | |
var len = data.length; | |
var ret = new Uint8Array(len * 4); | |
var offs = 0; | |
for(i = 0; i < len; i++) | |
{ |
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
// SPDX-FileCopyrightText: 2020 Nicolás Alvarez <nicolas.alvarez@gmail.com> | |
// | |
// SPDX-License-Identifier: MIT | |
#include <boost/preprocessor.hpp> | |
// Utilities to convert from numbers (bytes) or words (highbyte,lowbyte pairs) | |
// into nibbles. | |
// a -> (a1,a0) |
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
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 | |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 | |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12 | |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 | |
Mozilla/5.0 (Windows NT 6.1; WOW64; |
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
/* Support for executing system calls in the context of the game process. */ | |
static const int injection_size = 4; | |
static const char nop_code_bytes[injection_size] = { | |
/* This is the byte pattern used to pad function | |
addresses to multiples of 16 bytes. It consists | |
of RET and a sequence of NOPs. The NOPs are not | |
supposed to be used, so they can be overwritten. */ | |
0xC3, 0x90, 0x90, 0x90 |
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
/* | |
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: | |
* |
OlderNewer