- https://www.blackhat.com/us-20/arsenal/schedule/#xgitguard-detecting-publicly-exposed-secrets-on-github-at-scale-21188
- Test repo: https://github.com/bahmanrashidi/test_xgitguard
- ?
#include <windows.h> | |
#include <wininet.h> | |
#include <stdio.h> | |
#pragma comment (lib, "Wininet.lib") | |
int main(int argc, char *argv[]) { | |
HINTERNET hSession = InternetOpen( | |
L"Mozilla/5.0", // User-Agent |
#include <stdio.h> | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <openssl/ssl.h> | |
#include <openssl/err.h> | |
// include order is important. | |
using namespace std; | |
#pragma comment (lib, "Ws2_32.lib") |
(async function() { | |
const baseline = await fetch('').then(r => r.text()); | |
const header_keys = [ | |
"CACHE_INFO", "CF_CONNECTING_IP", "CF-Connecting-IP", "CLIENT_IP", "Client-IP", | |
"COMING_FROM", "CONNECT_VIA_IP", "FORWARD_FOR", "FORWARD-FOR", "FORWARDED_FOR_IP", | |
"FORWARDED_FOR", "FORWARDED-FOR-IP", "FORWARDED-FOR", "FORWARDED", "HTTP-CLIENT-IP", | |
"HTTP-FORWARDED-FOR-IP", "HTTP-PC-REMOTE-ADDR", "HTTP-PROXY-CONNECTION", "HTTP-VIA", "HTTP-X-FORWARDED-FOR-IP", | |
"HTTP-X-IMFORWARDS", "HTTP-XROXY-CONNECTION", "PC_REMOTE_ADDR", "PRAGMA", "PROXY_AUTHORIZATION", | |
"PROXY_CONNECTION", "Proxy-Client-IP", "PROXY", "REMOTE_ADDR", "Source-IP", | |
"True-Client-IP", "Via", "VIA", "WL-Proxy-Client-IP", "X_CLUSTER_CLIENT_IP", |
// ECDH.c | |
// $ gcc -o ECDH -lcrypto -lssl ECDH.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <openssl/ec.h> | |
#include <openssl/ecdh.h> | |
#include <openssl/obj_mac.h> | |
typedef struct _KEYPAIR { | |
BIGNUM *x, *y; |
import urllib2 | |
import urllib | |
import itertools | |
import mimetools | |
import mimetypes | |
from cStringIO import StringIO | |
class MultiPartForm(object): | |
"""Accumulate the data to be used when posting a form.""" |
import { Service } from 'typedi' | |
@Service() | |
export class ExampleInjectedService { | |
printMessage() { | |
console.log('I am alive!') | |
} | |
} |
class FairPlayer: AVPlayer { | |
private let queue = DispatchQueue(label: "com.icapps.fairplay.queue") | |
func play(asset: AVURLAsset) { | |
// Set the resource loader delegate to this class. The `resourceLoader`'s delegate will be | |
// triggered when FairPlay handling is required. | |
asset.resourceLoader.setDelegate(self, queue: queue) | |
// Load the asset in the player. |
If you have trobble with installing M2Crypto, please install libssl-dev
and swig
.
$ sudo apt install libssl-dev swig
ERROR: Command errored out with exit status 1:
command: /home/notroot/.virtualenvs/tad/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8NAhTW/M2Crypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8NAhTW/M2Crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fvI7gc/install-record.txt --single-version-externally-managed --compile --install-headers /home/notroot/.virtualenvs/tad/include/site/python2.7/M2Crypto
#include <iostream> | |
#include <map> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
void findAtFirstAndChangeSecond( | |
std::vector<std::pair<std::string, std::string>>& v, | |
const std::string key, | |
const std::string val |