Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 24, 2024 12:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ludoo0d0a
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :
#Admin login via ssh
> synobootseq --set-boot-done
> synobootseq --is-ready
#optional
> /usr/syno/etc/rc.d/S97apache-sys.sh start
> /usr/syno/etc/rc.d/S95sshd.sh start
@mubix
mubix / infosec_newbie.md
Last active April 7, 2024 22:35
How to start in Infosec
@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@KiNgMaR
KiNgMaR / cloudflare-ipset.sh
Last active January 22, 2024 17:28
Cloudflare IPTABLES and IPSET scripts - fixed 2022-02-23
#!/bin/bash
# name of the ipset - v4 or v6 will be appended.
IPSET_NAME=cloudflare-
# argument: v4 or v6 (defaults to v4)
cloudflare_ipset ()
{
local ipv
local inetv
@darencard
darencard / auto_git_file.md
Last active January 6, 2024 10:33
Automatic file git commit/push upon change

Please see the most up-to-date version of this protocol on my blog at https://darencard.net/blog/.

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
@Overbryd
Overbryd / 0-README.md
Last active September 11, 2023 19:14
Cloudflare Fragment Caching

Cloudflare fragment rendering/caching

This worker script will evaluate your origin response, and replace html comments marked as fragment:key with a respective prefetch defined in a X-Fragments response header.

Usage

Your origin must include the X-Fragments header, specifying the a comma separated list of prefetch requests to make for that response.

< HTTP/1.1 200 OK
@tehpeh
tehpeh / ddclient-cloudflare-macosx.md
Last active August 6, 2023 14:16
Dynamic DNS for Mac OS X with CloudFlare and ddclient

Update June 2019

The patch described below may no longer be necessary. CloudFlare instructions here. Perl module JSON::Any may still be required, however, see comments.

Description

Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.

CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will

@nathanqthai
nathanqthai / payload_samples.md
Last active March 30, 2023 12:54
Sample Log4Shell (CVE-2021-44228) payloads observed in the wild by GreyNoise Intelligence

Samples

Enclosed are some sanitized samples of data GreyNoise has identified and collected related to the Log4J vulnerability exploitation in the wild. GreyNoise infrastructure IPs have been removed while preserving the data to the best of our ability. Please note that GreyNoise HAS NOT verified if any of these are effective. These examples are not a comprehensive coverage of all the payloads GreyNoise have observed.

These samples are intended to provide individuals with a clearer idea of some of the variation in the wild.

Examples

The follow section includes Log4Shell samples seen in the wild

URL Encoding and Failed argv Input (????)

What appears to be a failed attempt:

from scapy.all import *
import requests
import time
MAGIC_FORM_URL = 'http://put-your-url-here'
def record_poop():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Measurement": 'Poopy Diaper'
}