Skip to content

Instantly share code, notes, and snippets.

View juffaz's full-sized avatar

Juffaz juffaz

  • Baku
View GitHub Profile
@uyorum
uyorum / boot.ipxe
Last active December 2, 2022 01:14
Preseed for Debian stretch (Replace "root-password-crypted" line)
#!ipxe
dhcp
initrd http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
kernel http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux auto=true priority=critical url=http://${dhcp-server}/preseed.cfg suite=stretch
boot
@ksingh7
ksingh7 / HP_ILO_user_management
Last active August 9, 2022 13:51
HP ILO user create from CLI
# Script to create admin and administrator user
#!/bin/bash
IPs=`echo 86.50.1.{150..168}`
for ip in $IPs
do
echo Starting $ip
sshpass -p 'ROOTPWD' ssh -o StrictHostKeyChecking=no -l root $ip "create /map1/accounts1 username=Administrator password=ADMINISTRATORPWD name=Administrator group=admin,config,oemhp_rc,oemhp_power,oemhp_vm"
sshpass -p 'ROOTPWD' ssh -o StrictHostKeyChecking=no -l root $ip "create /map1/accounts1 username=admin password=ADMINPASSWORD name=admin group=admin,config,oemhp_rc,oemhp_power,oemhp_vm"
@nopslider
nopslider / modsec.rules
Created February 11, 2015 14:11
ModSec Rule Examples
# Redirect to a different page when a PHP file is uploaded
SecRule FILES "(?i)\.php$" "t:none,log,redirect:http://cyberis.co.uk,msg:'PHP file upload blocked',id:1"
# Deny when a semi-colon is found in the 'ip' parameter
SecRule ARGS:ip ";" "t:none,log,deny,msg:'semi colon test',id:2"
# Disable ModSecurity for a given page - NOTE THE ESCAPE OF THE '?'
SecRule REQUEST_URI "/joomla/index.php/component/users/\?task=registration.register" "allow,id:3"
@seriyps
seriyps / server.py
Created September 24, 2012 01:16
TornadoWEB streaming file server
# -*- coding: utf-8 -*-
'''
Created on 2012-09-24
@author: Sergey <me@seriyps.ru>
How to test:
$ head -c 100M /dev/urandom > static_file.bin
$ python