View index.js
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
const fetch = (url, cb, options = {}) => { | |
const { protocol } = new URL(url); | |
const http = protocol === 'https:' | |
? require('https') | |
: require('http'); | |
options = { headers: { 'User-Agent': 'node.js' }, ...options }; | |
const error = e => console.log(e.message); |
View SetWallpaper.ps1
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
Add-Type -TypeDefinition @" | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Drawing; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
using System.Linq; | |
using Microsoft.Win32; |
View tweets.php
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
<?php | |
# define api keys. | |
define('CONSUMER_KEY', 'XXX'); | |
define('CONSUMER_SECRET', 'XXX'); | |
define('OAUTH_TOKEN', 'XXX'); | |
define('OAUTH_SECRET', 'XXX'); | |
define('USER_TIMELINE', 'https://api.twitter.com/1.1/statuses/user_timeline.json'); | |
# tweets to retrieve per request. |
View AppLocker.ps1
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
<# examples: | |
# generate a baseline policy. | |
powershell.exe -file applocker.ps1 -baseline -output c:\policies\baseline.xml | |
# generate an application-specific policy. | |
powershell.exe -file applocker.ps1 -application -in c:\policies\baseline.xml -out c:\policies\application.xml | |
# generate an adhoc policy. | |
powershell.exe -file applocker.ps1 -adhoc -in c:\path -filter *.* -out c:\policies\adhoc.xml |
View UserWritableLocations.ps1
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
# Paths that we've already excluded via AppLocker. | |
$exclusions = @() | |
# Paths to process. | |
$paths = @( | |
"C:\Windows" | |
) | |
# Setup log. | |
$log = "$PSScriptRoot\UserWritableLocations.log" |
View profiler.cpp
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 "stdafx.h" | |
#include <windows.h> | |
#include <mapix.h> | |
#include <mapiutil.h> | |
#include <edkmdb.h> | |
#include <atlbase.h> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <sstream> |
View Enigma.php
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
<?php namespace Enigma; | |
class Reflector { | |
protected $table; | |
public function __construct($table) { | |
$this->table = array_combine(range('A', 'Z'), str_split($table)); | |
} | |
public function convert($character) { |
View DisableBorder.ps1
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
Add-Type -TypeDefinition @" | |
using System; | |
using System.Runtime.InteropServices; | |
namespace Utilities { | |
public static class Display { | |
private const uint WM_USER = 0x0400; | |
private const uint WM_MSO = WM_USER + 0x0900; | |
private const uint WM_MSO_WPARAM_OMFRAMEENABLESHADOW = 0x0075; |
View Ciphers.php
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
<?php | |
class Map { | |
/* $table = [ | |
* 'encrypt' => | |
* ['A' => 'A', 'B' => 'B', ...], | |
* ['A' => 'B', 'B' => 'C', ...], | |
* ... | |
* 'decrypt' => | |
* ['A' => 'A', 'B' => 'B', ...], |
View Knockout Live Search
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>User Search</title> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
body { margin: 2em; text-align: center; } | |
form { margin-bottom: 2em; } |