Skip to content

Instantly share code, notes, and snippets.

View cenrak's full-sized avatar

Raed Alkharboush cenrak

View GitHub Profile
@cenrak
cenrak / sans-sec660-recommended-reading.md
Created June 13, 2020 08:00 — forked from thesubtlety/sans-sec660-recommended-reading.md
SANS SEC660 GXPN Recommended Reading
@cenrak
cenrak / golang-tls.md
Created August 29, 2019 12:23 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# A weekend challenge:
# Configure server1 and/or server2 so `ping 10.0.1.102 -I eth1` on server1 shows server2's replies
Vagrant.configure("2") do |config|
$script = <<-SCRIPT
# In case for some network work!
@cenrak
cenrak / Vagrantfile
Created May 3, 2018 17:41
Vagrantfile to prepare a quick katello infrastructure.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define "foreman" do |foreman|
@cenrak
cenrak / getpagetitle.sh
Last active July 1, 2017 08:03
getpagetitle.herokuapp.com
$ curl -X GET http://getpagetitle.herokuapp.com/get_title?url=https://www.facebook.com/
{
"return_code": 200,
"title": "Facebook - Log In or Sign Up",
"url": "https://www.facebook.com/"
}
#!/usr/bin/env python
import sys
def permutations(input):
possibilities = set()
def _perm(prev, rem):
if len(rem):
for i in range(len(rem)):
module AIO
require 'nokogiri'
require 'open-uri'
class R
class << self
def class
#include <iostream>
int main()
{
int num = 0;
int count = 0, sum = 0, i, j, p;
char c;
#/bin/bash
iptables --flush
service iptables save
service iptables stop
service iptables start
BIPS=`cat /tmp/blocked_ips.list`
#/bin/bash
LIST=`cat ips.list`
for ip in $LIST
do
scp blocked_ips.list $ip:/tmp
ssh $ip "bash update-blocked-ips; rm -f /tmp/blocked_ips.list"
done