Skip to content

Instantly share code, notes, and snippets.

View schlomo's full-sized avatar

Schlomo Schapiro schlomo

View GitHub Profile
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=IS24 VPN Client for SSLGW
Comment=Use to connect the VPN with a simple GUI
Exec=is24vpn-gui
Terminal=false
Icon=is24vpngui
Type=Application
Categories=Network;X-IS24;
[Desktop Entry]
Version=1.0
Type=Directory
Icon=is24-applications
Name=IS24
Comment=IS24 tools and utilities
Comment[de]=IS24 Werkzeuge und Hilfsmittel
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Menu>
<Name>Network</Name>
<Exclude>
<Or>
<Category>X-IS24</Category>
<Filename>exo-mail-reader.desktop</Filename>
@schlomo
schlomo / demo1.ipxe
Last active August 29, 2015 14:01
iPXE system inventarisation demo for Linux Magazin article. See https://docs.google.com/forms/d/1_wIEKGIMbSX1Qd5JqpaM_vLGglsl_rCOCB8SNJqHCtw/viewanalytics for results
#!ipxe
imgload https://docs.google.com/forms/d/1_wIEKGIMbSX1Qd5JqpaM_vLGglsl_rCOCB8SNJqHCtw/formResponse?entry.1027223351=${uuid}&entry.1507713783=${asset}&entry.46865035=${manufacturer}&entry.2129135320=${product}&entry.1181250351=${serial}&entry.2095563838=${mac}&entry.615831042=${chip} && echo Thank you for participating ||
sanboot --no-describe --drive 0x80 || shell
@schlomo
schlomo / demo2.ipxe
Last active August 29, 2015 14:01
iPXE protected installation menu demo
#!ipxe
console -x 800 -y 600 --picture http://www.linux-magazin.de/extension/lnm/design/linux_magazin/images/lm_logo_online.png --top 350
:menu
menu Was moechten Sie jetzt machen?
item --key n local Normaler Systemstart
item --gap Fuer den Systemverwalter
item --key i install Installationsmenue aufrufen
item --key d diag PC-Diagnose starten
item --key r reboot Neu starten
@schlomo
schlomo / login.php
Last active August 29, 2015 14:01
PHP Basic Auth Gateway. Requests basic auth (password is reversed username) and redirects to URL passed as query string
<?php
$username = 1;
$revpwd = 0;
if (isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW'])) {
$username = $_SERVER['PHP_AUTH_USER'];
$password = $_SERVER['PHP_AUTH_PW'];
$revpwd = strrev($password);
}
if ($username == $revpwd) {
if (isset($_SERVER['QUERY_STRING'])) {
@schlomo
schlomo / demo3.ipxe
Last active October 27, 2015 04:51
iPXE Installation menu with several Linux Distributions and Live CDs
#!ipxe
menu Bitte waehlen Sie ein Betriebssystem zur Installation aus
item ubuntu Ubuntu installieren
item fedora Fedora installieren
item --gap
item back Zurueck zum Hauptmenue
choose --timeout 20000 --default back target && goto ${target} || goto menu
:ubuntu
set ubuntu http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386
@schlomo
schlomo / amazon-id.conf
Created September 10, 2014 15:34
Amazon ID plugin for YUM. This will add 2 headers to the HTTP requests. With these headers the YUM repo server can identify the EC2 instance. These files come from the rh-amazon-rhui-client RPM package found on RHEL EC2 instances, probably part of the Red Hat Update Infrastructure (https://access.redhat.com/products/red-hat-update-infrastructure/)…
[main]
enabled=1
@schlomo
schlomo / aws_mfa.sh
Created September 18, 2014 09:03
Helper Bash function to set up temporary AWS credentials for MFA protected accounts.
function aws_mfa {
if [[ -z "$AWS_ACCESS_KEY_ID" ]] ; then
echo "Please set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY"
return 1
fi
if [[ -z "$REAL_AWS_ACCESS_KEY_ID" ]] ; then
REAL_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
REAL_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
fi