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
static void xorFile(string inputFilename, string outputFilename, byte xorValue) | |
{ | |
const int CHUNK_SIZE = 4096; | |
using (FileStream inputStream = new FileStream(inputFilename, FileMode.Open, FileAccess.Read)) | |
{ | |
BinaryReader binaryReader = new BinaryReader(inputStream, Encoding.ASCII); | |
using (FileStream outputStream = new FileStream(outputFilename, FileMode.Create, FileAccess.Write)) | |
{ | |
BinaryWriter binaryWriter = new BinaryWriter(outputStream, Encoding.ASCII); | |
byte[] chunk = binaryReader.ReadBytes(CHUNK_SIZE); |
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 | |
from struct import unpack, pack | |
import sys | |
x = '' | |
with open(sys.argv[1], 'rb') as f: | |
x = f.read() | |
with open(sys.argv[2], 'wb') as f: |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
struct Object | |
{ | |
Object(string name) : name(name) {} | |
void func() { cout << "Object func " << name << endl; } | |
string name; |
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
uint16_T one = 1U; | |
enum { | |
LittleEndian, | |
BigEndian | |
} machByteOrder = (*((uint8_T *) &one) == 1U) ? LittleEndian : BigEndian; | |
switch (machByteOrder) { | |
case LittleEndian: | |
// code here | |
break; | |
case BigEndian: |
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 service that monitors the currently connected network using netsh | |
Installation: | |
1) Edit the desired network name (replace "DesiredSsidName") | |
2) python WifiMonitor.py install | |
3) Open the Windows Service Control Manager and start the service | |
4) If there are problems, eg Python exceptions, use Event Viewer to see them | |
Description: |
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
// http://www.rohitab.com/discuss/topic/39611-malware-related-compile-time-hacks-with-c11/ | |
#include <stdio.h> | |
#include <stdint.h> | |
//-------------------------------------------------------------// | |
// "Malware related compile-time hacks with C++11" by LeFF // | |
// You can use this code however you like, I just don't really // | |
// give a shit, but if you feel some respect for me, please // | |
// don't cut off this comment when copy-pasting... ;-) // |
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/python | |
import sys | |
from keystone import * | |
from unicorn import * | |
from unicorn.arm_const import * | |
from capstone import * | |
from capstone.arm import * | |
from capstone.x86 import * |
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
::::::::::::::::::::::::::::::::::::::::: | |
:: Automatically check & get admin rights | |
::::::::::::::::::::::::::::::::::::::::: | |
@echo off | |
CLS | |
ECHO. | |
ECHO ============================= | |
ECHO Running WiFi Monitor | |
ECHO ============================= |
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 | |
import argparse | |
import csv | |
import sys | |
import time | |
import datetime | |
import logging | |
import logging.handlers | |
import hashlib |
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 yfinance as yf | |
from pprint import pprint | |
goog = yf.Ticker("GOOG") | |
option_dates = goog.options | |
for date in option_dates: | |
opt = goog.option_chain(date) | |
calls = opt.calls |
OlderNewer