Skip to content

Instantly share code, notes, and snippets.

View sdovnic's full-sized avatar
🐱
Inspector Cat

Svenja Dovnic sdovnic

🐱
Inspector Cat
  • DNN digital-nerv.net
  • Allemagne
View GitHub Profile
#!/usr/bin/env bash
# Copyright 2018 - 2018
groups=$(cat /var/lib/extrausers/group | awk -F ':' '{print $1}')
hash=$(md5sum /etc/ssh/sshd_config)
echo "" > /tmp/sshd_froxlor
for group in ${groups}; do
echo "Match Group ${group}" >> /tmp/sshd_froxlor
echo " ChrootDirectory /var/customers/sftp/${group}" >> /tmp/sshd_froxlor
echo " ForceCommand internal-sftp" >> /tmp/sshd_froxlor
@ErikAugust
ErikAugust / spectre.c
Last active May 22, 2024 23:07
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@karlvr
karlvr / 00README.md
Last active November 26, 2023 14:21
Roadwarrior configuration for macOS 10.12, iOS 10 and Windows 10 using strongSwan and user certificates

strongSwan setup for Road Warriors on macOS 10.12, iOS 10 and Windows 10

This setup is for remote users to connect into an office/home LAN using a VPN (ipsec). This is based on (but not the same as) the strongSwan documentation and this guide: https://raymii.org/s/tutorials/IPSEC_vpn_with_Ubuntu_16.04.html

I used strongSwan 5.5.1.

apt-get install -y strongswan strongswan-pki
@tiernan
tiernan / service-worker.d.ts
Last active June 3, 2024 07:00
Typings for using the Service Worker API with TypeScript
/**
*
* DEPRECIATED: Please use the updated type definitions:
* Service Worker Typings to Supplement lib.webworker.d.ts
* https://gist.github.com/tiernan/c18a380935e45a6d942ac1e88c5bbaf3
*
*
* Copyright (c) 2016, Tiernan Cridland
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby
#!/usr/bin/python
import os
import re
import sys
binarypath = "/usr/sbin/hpacucli"
if len(sys.argv) > 2:
print 'Usage: hpacucli-status [-d]'
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 23, 2024 22:08
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
###
###
@abixalmon
abixalmon / avistaz_bonus.php
Last active August 29, 2015 14:22
AvistaZ bonus point formula
<?php
if (count($bonus_users)) {
foreach ($bonus_users as $user_id => $bonus_user) {
$torrents = count($bonus_user['torrents']);
if ($torrents < 10) {
$bonus = max(0.1, (0.05 * $torrents));
} else {
$bonus = min(2, 1 + (0.01 * $torrents));
}
@wendelb
wendelb / logoff.ps1
Created October 11, 2014 14:29
Auto-Lock your workstation after Idle-Timeout with PowerShell
#
# This background job automatically locks your Workstation after a specified amount of
# time. It will come in handy if you cannot access the screensaver settings due to policy
# restriction but want to lock your screen after a idle timeout. Or you could just
# press [Win]+[L] everytime you leave your desk ;) .
#
# start with
# powershell.exe -windowstyle hidden -executionpolicy Unrestricted P:\ATH\TO\logoff.ps1
#
# `-windowstyle hidden` will make your PowerShell disappear/run in background
@eelsivart
eelsivart / heartbleed.py
Last active June 7, 2024 02:16 — forked from sh1n0b1/ssltest.py
Heartbleed (CVE-2014-0160) Test & Exploit Python Script
#!/usr/bin/python
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
#
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser