Skip to content

Instantly share code, notes, and snippets.

@azet
azet / grsec
Last active June 19, 2017 07:24
PaX/grsec log rotation on production systems [file: `/etc/logrotate.d/grsec`] (Debian)
# this: `/etc/logrotate.d/grsec`.
/var/log/messages /var/log/syslog /var/log/kern.log {
daily
rotate 14
missingok
notifempty
compress
}
# Usage: ./dns_check.py <list_of_domain_names.txt>
import dns.resolver
import requests
import re
import json
import sys
resolver = dns.resolver.Resolver()
resolver.timeout = 5
resolver.lifetime = 5
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active June 1, 2024 04:56 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@Alliages
Alliages / elevation.py
Created April 28, 2016 12:44
A very simple python script that get elevation from latitude and longitude with google maps API
#
# elevation: A very simple python script that get elevation from latitude and longitude with google maps API by Guillaume Meunier
#
# -----------------------------------
# NO DEPENDANCIES except JSON and URLLIB
# -----------------------------------
#
# Copyright (c) 2016, Guillaume Meunier <alliages@gmail.com>
# GEOJSON_export is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
@bridgeythegeek
bridgeythegeek / MyFirstPANDA.md
Last active August 15, 2023 10:48
My First PANDA

My First PANDA

Introduction

Being someone who tries to play a lot with Windows memory, I really wanted to play with PANDA, but I was slightly scared because I'd never touched qemu before - all my experience had been with VirtualBox and VMware.

My goal was to install PANDA into a (relatively) clean install of Debian 8 'Jessie', capture a recording and successfully run a PANDA plugin.

1. Get PANDA

@alirobe
alirobe / reclaimWindows10.ps1
Last active June 7, 2024 16:24
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@dchest
dchest / randomString.js
Last active December 22, 2019 08:19
Generates cryptographically secure uniform random string in browsers and Node.js [IN DEVELOPMENT]
// randomString(length)
// --------------------
//
// Generates and returns a cryptographically secure
// uniform alphanumeric random string.
//
// Examples:
//
// randomString(14) // "oXYWpc1vODNR3M"
// randomString.hex(8) // "663c722b65943b9b"
@joepie91
joepie91 / vpn.md
Last active June 21, 2024 14:42
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@mcnees
mcnees / Deprecated Favmoji.css for Twitter
Last active March 30, 2017 21:47
Install Stylish for your browser, then add this code as a new style that applies to the domain twitter.com. It let's you replace your fav button and notification stream icons with the emojis of your choice, and replaces "Likes" with "Favorites" on your profile page. You can also change the "Block" option under a user's drop-down menu to "Drop In…
/* Install the Stylish extension for your browser, then add this code
as a new Style. Make sure it applies to the domain 'twitter.com' */
/* You can get Stylish here: */
/* Safari - http://sobolev.us/stylish/ */
/* Chrome - https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe */
/* Tweet improvements, comments, or corrections to @mcnees. */
/* Thanks to: @pbausch, @mathowie, @blakestacey, @ukuleledan and others! */