Skip to content

Instantly share code, notes, and snippets.

View maravedi's full-sized avatar
🏒
Slappin' shots

maravedi

🏒
Slappin' shots
View GitHub Profile
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@zyzof
zyzof / UdpSpoofer.py
Created January 3, 2014 12:20
Sending spoofed raw packets with scapy
from scapy.all import *
import time
ip = IP(dst='192.168.1.1', src='192.168.1.1')
udp = UDP(sport=1234,dport=1234)
payload = '\x01\x0f'
packet = ip/udp/payload
while(True):
@gosukiwi
gosukiwi / .vimrc
Last active February 24, 2020 06:01
.vimrc
" ---------------------- USABILITY CONFIGURATION ----------------------
" Basic and pretty much needed settings to provide a solid base for
" source code editting
" don't make vim compatible with vi
set nocompatible
" turn on syntax highlighting
syntax on
" and show line numbers
@ducas
ducas / Create-Administrator.ps1
Last active May 22, 2024 09:29
Create a local administrator account using PowerShell
$Username = "su"
$Password = "password"
$group = "Administrators"
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
if ($existing -eq $null) {
@haukurk
haukurk / syslogger.py
Created December 11, 2014 17:04
Logger that sends to syslog servers.
#!/usr/bin/python
# -*- encoding: iso-8859-1 -*-
"""
Python syslog client.
This code is placed in the public domain by the author.
Written by Christian Stigen Larsen.
This is especially neat for Windows users, who (I think) don't
@maravedi
maravedi / homestead_32bit.md
Last active December 12, 2016 11:54
Setting up Homestead 2.0.7 on Windows 7 32-bit

#Introduction For the most part, you can follow the instructions given by Jeffrey Way at Laracasts - Say Hello to Laravel Homestead 2.

If you are like me and also have a 32-bit installation of Windows with low RAM, the there are a few exceptions.

#Setting up 32-bit Homestead Firstly, the default homestead VM is a 64-bit version of Ubuntu, so you'll need to change that. Thankfully, someone has created a 32-bit version of homestead already. To do this, you will need to go to C:\Users\myusername\AppData\Roaming\Composer\vendor\laravel\homestead\scripts\ and then edit the homestead.rb file.

Following the instructions from here, within the homestead.rb file you will need to change the line

@gfoss
gfoss / PowerShell Command Line Logging
Last active August 4, 2023 18:02
Detect and alert on nefarious PowerShell command line activity
# PowerShell Audit Logging for LogRhythm SIEM - 2015
# For detecting dangerous PowerShell Commands/Functions
Log Source Type:
MS Event Log for Win7/Win8/2008/2012 - PowerShell
Add this file to your PowerShell directory to enable verbose command line audit logging
profile.ps1
$LogCommandHealthEvent = $true
$LogCommandLifeCycleEvent = $true
@gilbitron
gilbitron / .env.travis
Last active August 12, 2023 08:06
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@PeteGoo
PeteGoo / Send-UdpDatagram.ps1
Last active May 26, 2024 01:01
Sending UDP datagrams in powershell
function Send-UdpDatagram
{
Param ([string] $EndPoint,
[int] $Port,
[string] $Message)
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint)
$Address = [System.Net.IPAddress]::Parse($IP)
$EndPoints = New-Object System.Net.IPEndPoint($Address, $Port)
$Socket = New-Object System.Net.Sockets.UDPClient
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 7, 2024 16:24
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
###
###