Skip to content

Instantly share code, notes, and snippets.

View scusi's full-sized avatar
🏠
Working from home

Florian Walther scusi

🏠
Working from home
View GitHub Profile
@scusi
scusi / gist:9f15ab9ac54c0f515819387a64b788c2
Last active February 1, 2024 15:24
Publishing a Certificate in GAL useing powershell
# Source: https://techcommunity.microsoft.com/t5/exchange/upload-s-mime-user-certificate-with-outlook-to-the-gal/m-p/3781147
#
# i do not know if this code works, never tried.
# i just wanted to keep it, just in case or to try it one day.
# Even if it does not work, it might be a good starting point.
# ~scusi
###############################################################################
#Set UserCertificate in EXO
###############################################################################
Connect-ExchangeOnline

Keybase proof

I hereby claim:

  • I am scusi on github.
  • I am scusi (https://keybase.io/scusi) on keybase.
  • I have a public key whose fingerprint is 76E8 BAB1 353D 8C0F F02E 5458 CE76 1F98 7245 6F13

To claim this, I am signing this object:

@scusi
scusi / colors.muttrc
Created February 17, 2022 09:36 — forked from LukeSmithxyz/colors.muttrc
Mutt example colors
# vim: filetype=neomuttrc
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
@scusi
scusi / ldif-to-csv.sh
Created January 26, 2022 10:52 — forked from dansimau/ldif-to-csv.sh
Shell script that reads LDIF data from STDIN and outputs as CSV.
#!/bin/bash
#
# Converts LDIF data to CSV.
# Doesn't handle comments very well. Use -LLL with ldapsearch to remove them.
#
# 2010-03-07
# dsimmons@squiz.co.uk
#
# Show usage if we don't have the right params
@scusi
scusi / .muttrc
Created January 14, 2022 11:29 — forked from ramn/.muttrc
Muttrc example with GMail support
##
## IMAP CREDENTIALS
##
set smtp_url = "smtp://some_user@smtp.gmail.com:587/"
#set smtp_pass = "password"
set from = "someuser@example.com"
set realname = "Some User"
##
## IMAP SETTINGS
@scusi
scusi / desinfect_install.sh
Last active December 30, 2021 10:29 — forked from allenyllee/install_tools.sh
mount vhdx in linux
#!/bin/bash
#
# this shell script will install nbd-client package on desinfect
#
cd ~/Downloads
echo "[*] download nbd-client package for AMD64 architecture"
wget -O -J http://de.archive.ubuntu.com/ubuntu/pool/universe/n/nbd/nbd-client_3.20-1_amd64.deb
echo "[*] install nbd-client package"
sudo dpkg -i nbd-client_3.20-1_amd64.deb
echo "[*] delete downloaded package file"
@scusi
scusi / log-forwarding-with-etw.ps1
Created November 20, 2021 08:50 — forked from ajpc500/log-forwarding-with-etw.ps1
Quick-and-dirty PowerShell script to install Sysmon (SwiftOnSecurity config), SilkService and Winlogbeat, and forward logs to HELK based on IP set in environment variable "HELK_IP" (see Line 224).
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$wc = New-Object System.Net.WebClient
if (!(Test-Path "C:\Tools")) {
New-Item -Path "C:\" -Name "Tools" -ItemType "directory"
}
# SYSMON
# Download Sysmon
$SysmonDirectory = "C:\Tools\Sysmon\"
# powershell script to (re-)enable telemetry in win10
#
# flw@posteo.de
#
# run as admin
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
# Step 1: deactivate DiagTrack service
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\DiagTrack\ -name Start -Value 2
@scusi
scusi / disableTelemetry.ps1
Last active November 9, 2019 10:07
disable telemetry call home in windows10
# powershell script to disable telemetry in win10
#
# Source:
# https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Cyber-Sicherheit/SiSyPHus/Analyse_Telemetriekomponente.pdf?__blob=publicationFile&v=3
# run as admin
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
# Step 1: deactivate DiagTrack service
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\DiagTrack\ -name Start -Value 4
@scusi
scusi / xor.go
Last active May 18, 2017 07:52
rolling xor implementation in go
package main
import (
"container/ring"
"flag"
"io/ioutil"
"log"
)
var keyFile string