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
In a terminal, execute: | |
openssl req -out csr.csr -new -newkey rsa:2048 -nodes -keyout privatekey.key | |
Then: | |
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privatekey.key -out certificate.crt |
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 <sys/resource.h> | |
// core dumps may be disallowed by parent of this process; change that | |
struct rlimit core_limits; | |
core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY; | |
setrlimit(RLIMIT_CORE, &core_limits); |
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
Encrypt | |
% tar cz folder_to_encrypt | \ | |
openssl enc -aes-256-cbc -e > out.tar.gz.enc | |
Decrypt | |
% openssl enc -aes-256-cbc -d -in out.tar.gz.enc | tar xz |
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
VBoxManage clonehd --format RAW Windows_95.vdi Windows_95.img |
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
#!/bin/sh | |
sudo ssh -f -N -w 0:0 my_server | |
sudo ifconfig tun0 192.168.1.102 pointopoint 192.168.1.101 | |
ssh my_server sudo ifconfig tun0 192.168.1.101 pointopoint 192.168.1.102 | |
ssh my_server sudo arp -n | |
sudo route add 123.456.789.123 gw 10.0.2.2 eth0 | |
sudo route add default gw 192.168.1.101 tun0 | |
sudo route del default gw 10.0.2.2 eth0 | |
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
awk '{ if (length($0) > max) {max = length($0); maxline = $0} } END { print maxline }' FILENAME |
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
# got from here https://developer.apple.com/library/ios/qa/qa1798/_index.html | |
# from binary | |
codesign -d --entitlements :- "Payload/YourApp.app" | |
# from profile | |
security cms -D -i "Payload/YourApp.app/embedded.mobileprovision" |
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
sudo dscacheutil -flushcache |
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 perl | |
use strict; | |
use warnings; | |
use autodie qw(:all); | |
my $str = do { local $/; <STDIN> }; | |
$str =~ s/[^0-9a-fA-F]//gm; | |
$str = pack('H*', $str); |
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
ssh -p 29418 smirn0v@johann gerrit create-account --email [email protected] yurtaev |
NewerOlder