Skip to content

Instantly share code, notes, and snippets.

View Liki4's full-sized avatar
:octocat:
Boop!

Liki4 Liki4

:octocat:
Boop!
  • QiAnXin Technology Group Inc
  • Hangzhou, Zhejiang.
  • 01:23 (UTC +08:00)
  • X @Liki4Switch
View GitHub Profile
@itzg
itzg / Add more physical space to an LVM volume.md
Last active September 6, 2023 22:22
Add more physical space to an LVM volume

Find and create a partition with free space:

# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free
Model: ATA Crucial_CT240M50 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
@swordfeng
swordfeng / chn_fonts.reg
Last active July 2, 2024 14:33
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@Manouchehri
Manouchehri / rfc3161.txt
Last active July 10, 2024 06:32
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@t2psyto
t2psyto / gist:f5453707d2658173715f49293d096fe5
Created July 14, 2017 04:15
powershell oneliner for encode/decode base64 to file
# encode from binary file to base64txt
powershell -C "& {$outpath = (Join-Path (pwd) 'out_base64.txt'); $inpath = (Join-Path (pwd) 'data.jpg'); [IO.File]::WriteAllText($outpath, ([convert]::ToBase64String(([IO.File]::ReadAllBytes($inpath)))))}"
# decode from base64txt to binary file
powershell -C "& {$outpath = (Join-Path (pwd) 'outdata2.jpg'); $inpath = (Join-Path (pwd) 'out_base64.txt'); [IO.File]::WriteAllBytes($outpath, ([convert]::FromBase64String(([IO.File]::ReadAllText($inpath)))))}"
@f0r34chb3t4
f0r34chb3t4 / keys.txt
Created April 9, 2019 16:42
Proxifier.txt
Portable Version KEYS:
P6Z3T-UYJC9-YAK3F-APN9M-6ZDSD
FGZPK-93CWX-Q33Y6-D5URV-YXC3X
9CZQX-9YAQA-PF33L-XVUQH-NSD48
8RZ3L-H3Y5L-W2RY5-Z5M8N-C7Z2U
CCZNU-LW3LF-K9V2T-MYZFF-94667
EWZM6-3W4UX-KH922-C96GK-VGBH2
Standard Version KEYS:
4AZNW-S2YHE-LLMWM-J6EL8-7QKDL
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 24, 2024 16:12
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@chenyiping1995
chenyiping1995 / Android_CN.sh
Last active June 21, 2023 08:54
This script snippet attempts to modify a few settings in SettingsProvider (that is normally not accessible to end user) for easier use of stock Android OS.
# Android Debug Bridge (adb) interactive shell should be used to change these settings.
# Since the 'settings' shell command only exists on Android 4.2 or newer versions of Android, even if the SettingsProvider has the key/value pairs, there is no way for legacy OS prior to Android 4.2 to change these with the command specified in this shell snippet.
# See https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/provider/Settings.java for latest SettingsProvider key/value pairs.
# See https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-$(Android_Version_Code)_r$(Android_Version_Revision_Code)/core/java/android/provider/Settings.java for SettingsProvider key/value pairs for a specific version of Android. Android Version Code and Android Version Revision Code could be found at https://android.googlesource.com/platform/frameworks/base/+refs .
# Specifies the device's UTC system clock and date should be set automatically from sources like NITZ, GNSS or NTP.
@niklaskeerl
niklaskeerl / install_pwndbg.md
Last active June 27, 2024 22:24
Install pwndbg and gdb on arch linux

How to install pwndbg and gdb on arch linux

sudo pacman -S gdb
sudo pacman -S pwndbg
echo 'source /usr/share/pwndbg/gdbinit.py' >> ~/.gdbinit

If you are getting the following error "Cannot find Pwndbg virtualenv directory: /usr/share/pwndbg/.venv: please re-run setup.sh", do the following steps, otherwise ignore:

@yovko
yovko / ohmyzsh.md
Last active June 19, 2024 06:18
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

@milo2012
milo2012 / CVE-2017-15944.md
Last active June 22, 2023 08:07
CVE-2017-15944.md

Description

I encountered a situation where the target running PAN-OS was vulnerable to CVE-2017-15944 but I was unable to exploit it using Metasploit.

The issue with exploiting CVE-2017-15944

One of the techniques of exploiting CVE-2017-15944 exploit, is to create a file under /opt/pancfg/mgmt/logdb/traffic/1/* which gets processed by the cron job (/etc/cron.d/indexgen -> /usr/local/bin/genindex_batch.sh). Metasploit uses this technique.

The article at https://tinyhack.com/2019/01/10/alternative-way-to-exploit-cve-2017-15944-on-pan-os-6-1-0/ mentions that it might be impossible to exploit CVE-2017-15944 as the script is already running. The article mentions that the cron job (/etc/cron.d/core_compress -> /usr/local/bin/core_compress) is also vulnerable to command injection.