Skip to content

Instantly share code, notes, and snippets.

View wesinator's full-sized avatar

Wes wesinator

View GitHub Profile
python -c 'import datetime;print "Week: %s" % datetime.date.today().isocalendar()[1]'
@halos
halos / doc_equations.yar
Created March 21, 2018 13:14
Yara rule to detect word documents with equations (CVE-2017-11882 / CVE-2018-0802)
rule doc_equations {
meta:
author = "Javier Rascon Mesa"
description = "Detects documents that contains equations"
strings:
$hdr_0 = {d0 cf 11 e0}
$hdr_1 = "{\\rt" ascii
@agostini01
agostini01 / printBatteryInfo.sh
Created April 25, 2018 04:08
Print Battey Information in Linux
#!/bin/bash
upower -i /org/freedesktop/UPower/devices/battery_BAT0
@fracz
fracz / Readme.md
Last active May 2, 2023 07:25
Restore intentionally deleted commits in Git

Restore intentionally deleted commits in Git (remote)

Situation

  1. You own a Git repository server and the developers do not have access to it (i.e. they can only read & write to the repo, but not gc it).
  2. You had a developer that wrote a project for you.
  3. He got angry for whatever reason and deleted all branches from the remote repo. He also push -fed the master branch leaving only one silly commit there.
  4. He escaped from the country leaving you without any code at all (at least this is what he believe in).
  5. You have never cloned the repo to other machine. There were only two copies of it: the developer's one and the server's one.
@WnndGws
WnndGws / firefox_about_conf.md
Last active December 1, 2018 08:42
These are all the privacy and personal preferance flags i have come across

Firefox about:config flags

These are all the privacy and personal preferance flags i have come across

Flags

  1. privacy.firstparty.isolate = true
    • A result of the Tor Uplift effort, this preference isolates all browser identifier sources (e.g. cookies) to the first party domain, with the goal of preventing tracking across different domains. (Don't do this if you are using the Firefox Addon "Cookie AutoDelete" with Firefox v58 or below.)
  2. privacy.resistFingerprinting = true
    • A result of the Tor Uplift effort, this preference makes Firefox more resistant to browser fingerprinting.
  3. privacy.trackingprotection.enabled = true
  • This is Mozilla’s new built in tracking protection. It uses Disconnect.me filter list, which is redundant if you are already using uBlock Origin 3rd party filters, therefore you should set it to false if you are using the add-on functionalities.
val mSquare = arrayOf(
arrayOf('А', 'Б', 'В', 'Г', 'Д', 'Е'),
arrayOf('Ё', 'Ж', 'З', 'И', 'Й', 'К'),
arrayOf('Л', 'М', 'Н', 'О', 'П', 'Р'),
arrayOf('С', 'Т', 'У', 'Ф', 'Х', 'Ц'),
arrayOf('Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь'),
arrayOf('Э', 'Ю', 'Я', '-', '-', '-')
)
# Curl
sudo apt -y install curl
# Atom
curl -L https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt update
sudo apt -y install atom
@lsdr
lsdr / docker_cheatsheet.md
Last active December 2, 2019 18:27
Docker Cheatsheet for the ages!

stop all running containers

docker ps | awk 'NR>1 {print $1}' | xargs docker stop

Brute force; list all and try to stop everything

docker ps -aq | xargs docker stop

Firefox recently introduced DNS over HTTPS (DoH) and Trusted Recursive Resolver (TRR) in nightly builds for Firefox 62.

DoH and TRR are intended to help mitigate these potential privacy and security concerns:

  1. Untrustworthy DNS resolvers tracking your requests, or tampering with responses from DNS servers.
  2. On-path routers tracking or tampering in the same way.
  3. DNS servers tracking your DNS requests.

DNS over HTTPs (DoH) encrypts DNS requests and responses, protecting against on-path eavesdropping, tracking, and response tampering.

Trusted Recursive Resolver (TRR) allows Firefox to use a DNS resolver that's different from your machines network settings. You can use any recursive resolver that is compatible with DoH, but it should be a trusted resolver (one that won't sell users’ data or trick users with spoofed DNS). Mozilla is partnering with Cloudflare (but not using the 1.1.1.1 address) as the initial default TRR, however it's possible to use another 3rd party TRR or run

@wdormann
wdormann / flash_killbit.reg
Last active June 1, 2021 15:03
Disable Flash ActiveX in all Windows versions (including 10)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftEdge\ActiveX Compatibility\{D27CDB6E-AE6D-11cf-96B8-444553540000}]
"Compatibility Flags"=dword:00000400
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11cf-96B8-444553540000}]
"Compatibility Flags"=dword:00000400
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11cf-96B8-444553540000}]
"Compatibility Flags"=dword:00000400