Skip to content

Instantly share code, notes, and snippets.

View vpnwall-services's full-sized avatar

Vpnwall Services vpnwall-services

View GitHub Profile
@bugcy013
bugcy013 / logstach Examples
Created April 26, 2014 00:09
logstach Examples collection
Example -1
=====================
input {
file {
path => [ "/usr/local/var/log/suricata/eve.json", "/var/log/ulogd.json" ]
codec => json
type => "json-log"
}
}
@iAugur
iAugur / Apache Better Blocking with common rules.txt
Last active February 14, 2022 14:28
Apache: Better Blocking with common rules
Following on from other Gists I have posted, this one shows a neat way of using Includes to centralise general blocking rules for Bad Bots, creepy crawlers and irritating IPs
see the full post at http://www.blue-bag.com/blog/apache-better-blocking-common-rules
@morgajel
morgajel / gist:7fa8b232a9f05c711e3b
Last active October 28, 2023 09:49
Mass Layer Gimp Python Fu scripts
align multiple layers to the center of an image in gimp
layer = gimp.image_list()[0].layers[0]
image = gimp.image_list()[0]
for layer in gimp.image_list()[0].layers :
x = (image.width - layer.width) / 2
y = (image.height - layer.height) / 2
layer.set_offsets(x, y)
@carnal0wnage
carnal0wnage / msgrpc_ssh_version.py
Last active April 19, 2020 14:22
python script to connect to a metasploit msgrpc instance, setup and run an auxilary module.
#!/usr/bin/env python
import sys
import msfrpc
import time
if __name__ == '__main__':
# Create a new instance of the Msfrpc client with the default options
client = msfrpc.Msfrpc({})
# Login to the msf server using the password "abc123"
@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active October 22, 2023 12:25
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

@phpdave
phpdave / cspheader.php
Last active October 25, 2023 05:23
CSP Header for PHP or Apache or .htaccess - Content Security Protocol
<?
//CSP only works in modern browsers Chrome 25+, Firefox 23+, Safari 7+
$headerCSP = "Content-Security-Policy:".
"connect-src 'self' ;". // XMLHttpRequest (AJAX request), WebSocket or EventSource.
"default-src 'self';". // Default policy for loading html elements
"frame-ancestors 'self' ;". //allow parent framing - this one blocks click jacking and ui redress
"frame-src 'none';". // vaid sources for frames
"media-src 'self' *.example.com;". // vaid sources for media (audio and video html tags src)
"object-src 'none'; ". // valid object embed and applet tags src
"report-uri https://example.com/violationReportForCSP.php;". //A URL that will get raw json data in post that lets you know what was violated and blocked
@dnozay
dnozay / README.md
Last active May 31, 2023 02:12
Collection of useful stuff for interacting with gitlab.

Reset root/admin password

Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.

# start the console
sudo gitlab-rails console
@brianlmoon
brianlmoon / apache_cors_example
Last active November 19, 2023 03:14
CORS example for Apache with multiple domains
# Sets CORS headers for request from example1.com and example2.com pages
# for both SSL and non-SSL
SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0
Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN
Header set Access-Control-Allow-Credentials "true" env=ORIGIN
# Always set Vary: Origin when it's possible you may send CORS headers
Header merge Vary Origin
@bwbaugh
bwbaugh / logstash-guide.md
Last active November 26, 2020 13:12
Installing logstash server and client

Installing logstash

Server install

Install

Install the Java prerequisite:

@halberom
halberom / extras.py
Last active November 8, 2023 16:23
ansible - example of merging lists of dicts
# ansible_plugins/filter_plugins/extras.py
def merge_dicts(value, dict1):
# return a merged dict
result = {}
result = value
result.update(dict1)
return result
def merge_lists_of_dicts(list1, list2):
# return a merged list