Skip to content

Instantly share code, notes, and snippets.

View deajan's full-sized avatar

Orsiris de Jong deajan

View GitHub Profile
@deajan
deajan / dialogs
Created September 24, 2023 19:45
grommunio-setup/common/dialogs
#!/bin/bash
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-FileCopyrightText: 2021 grommunio GmbH
dialog >/dev/null 2>&1
if [ "$?" -eq 127 ]; then
echo ERROR: /usr/bin/dialog not installed
exit 1
fi
@deajan
deajan / setup.sh
Created September 24, 2023 19:43
grommunio-setup/setup.sh
#!/bin/bash
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-FileCopyrightText: 2021-2023 grommunio GmbH
# Interactive grommunio setup
DATADIR="${0%/*}"
if [ "${DATADIR}" = "$0" ]; then
DATADIR="/usr/share/grommunio-setup"
else
DATADIR="$(readlink -f "$0")"
{"calls": [["Crypto", "Crypto"], ["Crypto.Cipher", "Crypto.Cipher"], ["Crypto.Cipher.AES", "Crypto.Cipher"], ["Crypto.Cipher._create_cipher", "Crypto.Cipher"], ["Crypto.Cipher._mode_cbc", "Crypto.Cipher._mode_cbc"], ["Crypto.Cipher._mode_cbc._create_cbc_cipher", "Crypto.Cipher._mode_cbc"], ["Crypto.Cipher._mode_ccm", "Crypto.Cipher._mode_ccm"], ["Crypto.Cipher._mode_ccm._create_ccm_cipher", "Crypto.Cipher._mode_ccm"], ["Crypto.Cipher._mode_cfb", "Crypto.Cipher._mode_cfb"], ["Crypto.Cipher._mode_cfb._create_cfb_cipher", "Crypto.Cipher._mode_cfb"], ["Crypto.Cipher._mode_ctr", "Crypto.Cipher._mode_ctr"], ["Crypto.Cipher._mode_ctr._create_ctr_cipher", "Crypto.Cipher._mode_ctr"], ["Crypto.Cipher._mode_eax", "Crypto.Cipher._mode_eax"], ["Crypto.Cipher._mode_eax._create_eax_cipher", "Crypto.Cipher._mode_eax"], ["Crypto.Cipher._mode_ecb", "Crypto.Cipher._mode_ecb"], ["Crypto.Cipher._mode_ecb._create_ecb_cipher", "Crypto.Cipher._mode_ecb"], ["Crypto.Cipher._mode_gcm", "Crypto.Cipher._mode_gcm"], ["Crypto.Cipher._mode_
@deajan
deajan / service.py
Created January 24, 2019 01:17
python_service
import win32serviceutil
import win32service
import win32event
import win32api
import servicemanager
import os
import sys
from time import sleep
import socket
@deajan
deajan / admin_elevator.py
Last active October 28, 2024 19:18
Python elevation code that works on Windows and Linux, with Nuitka, PyInstaller and CPython
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017-2020 Orsiris de Jong
# This file is part of command_runner module
"""
elevate is a Windows/ unix compatible function elevator for Python 3+
usage:
@deajan
deajan / csv2json.sh
Created July 9, 2018 07:54 — forked from DecisionNerd/csv2json.sh
CSV to JSON converter using BASH. Original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
#!/bin/bash
# CSV to JSON converter using BASH
# original script from http://blog.secaserver.com/2013/12/convert-csv-json-bash/
# thanks SecaGuy!
# Usage ./csv2json.sh input.csv > output.json
input=$1
[ -z $1 ] && echo "No CSV input file specified" && exit 1
[ ! -e $input ] && echo "Unable to locate $1" && exit 1
@deajan
deajan / backup_tool_script
Last active November 29, 2018 10:38
backup_tool_script v0.4.4
#!/usr/bin/env bash
PROGRAM="backup_tool_script"
PROGRAM_VERSION=0.4.4
PROGRAM_BUILD=2018110501
AUTHOR="(C) 2017-2018 by Orsiris de Jong"
CONTACT="http://www.netpower.fr - [email protected]"
IS_STABLE=yes
## backup_tool_script - A script to check burp backup sanity
#!/usr/bin/env bash
PROGRAM="backup_tool_script"
PROGRAM_VERSION=0.4.0
PROGRAM_BUILD=2018021403
AUTHOR="(C) 2017-2018 by Orsiris de Jong"
CONTACT="http://www.netpower.fr - [email protected]"
IS_STABLE=yes
#TODO
# postponed arrays / files grow a lot. Consider having them "rolling"
@deajan
deajan / burp_tool.sh
Created December 4, 2017 18:13
burp_tool script
#!/usr/bin/env bash
PROGRAM="burp_tool"
PROGRAM_VERSION=0.2.0
PROGRAM_BUILD=2017120402
AUTHOR="(C) 2017 by Orsiris de Jong"
CONTACT="http://www.netpower.fr - [email protected]"
IS_STABLE=no
## burp-tool.sh - A script to check burp backup sanity
@deajan
deajan / Burp protocol 1 backups
Created November 13, 2017 19:33
Burp_tests_1
Run 1
2017-11-09 09:32:04 +0100: burp[27137] Client version: 2.1.22
2017-11-09 09:32:04 +0100: burp[27137] Protocol: 1
2017-11-09 09:32:04 +0100: burp[27137] Client is Windows
2017-11-09 09:32:04 +0100: burp[27137] Begin phase1 (file system scan)
2017-11-09 09:40:29 +0100: burp[27137] End phase1 (file system scan)
2017-11-09 09:40:29 +0100: burp[27137] Begin phase2 (receive file data)
2017-11-09 09:46:35 +0100: burp[27137] End phase2 (receive file data)
2017-11-09 09:46:35 +0100: burp[27137] Backup ending - disconnect from client.