Skip to content

Instantly share code, notes, and snippets.

@Adrellias
Adrellias / 1_radius_chap.py
Created July 8, 2022 11:09 — forked from adiroiban/1_radius_chap.py
Python RADIUS client CHAP / MS-CHAP-v1 / MS-CHAP-v2
# Code under public domain.
"""
Authentication based on a remote RADIUS server.
"""
from __future__ import absolute_import, unicode_literals
import contextlib
import os
import socket
import struct
import hashlib
@jh0ker
jh0ker / _readme.md
Last active July 9, 2024 07:31
Max attributes and skills in SCUM game single player

README

This script manipulates the SCUM database for the single player mode to increase the level of all skills and attributes to max (or the value of your choice) for a given prisoner. This script does not work for multiplayer characters.

You can edit the configuration settings SET_ATTRIBUTES and SET_SKILLS at the start of the script below to change the target values for the skills and attributes. Default is maxed out.

Tested with SCUM Build 0.9.101.72873

How do I use it?

@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active July 22, 2024 18:44
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@adiroiban
adiroiban / 1_radius_chap.py
Last active July 8, 2022 11:09
Python RADIUS client CHAP / MS-CHAP-v1 / MS-CHAP-v2
# Code under public domain.
"""
Authentication based on a remote RADIUS server.
"""
from __future__ import absolute_import, unicode_literals
import contextlib
import os
import socket
import struct
import hashlib
@jh0ker
jh0ker / telegram_example.py
Created April 9, 2021 00:07
Tokenize Tweets using entities provided by Twitter API
"""
The original reason I wrote this.
Also provides a more real-world example on how to use the result.
Uses python-telegram-bot for sending messages to Telegram.
"""
import html
from typing import List
@tr-fteixeira
tr-fteixeira / slack-pagerduty-oncall.py
Created March 8, 2021 17:24
Updates a Slack User Group with People that are on call in PagerDuty (updated for slack_sdk after previous auth method was deprecated, changed user lookup on slack). Based on: https://gist.github.com/markddavidoff/863d77c351672345afa3fd465a970ad6
"""
Script to update on-call groups based on pagerduty escalation policies
From: https://gist.github.com/markddavidoff/863d77c351672345afa3fd465a970ad6
Slack permissions required:
- Installer must be able to update user groups.
- usergroups:read
- usergroups:write
- users:read
- users:read.email
@andreacioni
andreacioni / auto_update_pihole_blocklist.py
Last active January 9, 2023 04:35
Update /etc/pihole/adlist.list of Pi-Hole automatically using the list provided by the WaLLy3K’s blocklist compilation.
#!/usr/bin/python3
'''
Copyright 2018 Andrea Cioni
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
@SQLadmin
SQLadmin / aws-athena-auto-partition-lambda.py
Last active May 11, 2021 12:16
AWS Athena create auto partition for CloudTrail logs on Daily Basis
# Lambda function to create partition for Cloudtrail log on daily basis.
# You need to schedule it in AWS Lambda.
'''
-------------------------------------------
AWS Athena Create Partitions Automatically
-------------------------------------------
Version 1.0
Author: SqlAdmin

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

@dcode
dcode / Makefile
Last active March 28, 2017 12:03
My bro.spec.in file and Makefile for building bro packages + bro-plugins packages
NAME := bro
GIT_REPO := https://github.com/bro/bro.git
GIT_BRANCH := master
COMMIT0 := $(shell git ls-remote $(GIT_REPO) | grep -E 'refs/heads/$(GIT_BRANCH)$$' | cut -f1)
SHORTCOMMIT0 := $(shell echo $(COMMIT0)| awk '{ print substr($$0, 1, 7)}')
VERSION ?=$(shell cat VERSION | cut -d- -f1)
RELEASE ?=$(shell cat VERSION | cut -d- --complement -f1 | tr -d '-')
SNAPSHOT := .git$(SHORTCOMMIT0)