Skip to content

Instantly share code, notes, and snippets.

View cloud-ubuntu-netplan-secondary-ip-static.md

In case there's already a DHCP config for netplan for the private IP address:

File: /etc/netplan/50-cloud-init.yaml

Contents:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
View test.md

This method doesn't require an internet connection…

  1. base64-encode the <svg> markup (eg. paste svg at base64encode.org)
  2. URL-encode the base64-encoded string (eg. paste base64 string at urlencoder.org)
  3. Put the resulting string in ![alt text](data:image/svg+xml,<paste_your_svg_string_here> "title")

The result would be a string similar to the following that can be inserted into a Jupyter Notebook Markdown cell…

@galaxy001
galaxy001 / Public_Time_Servers.md
Created Apr 29, 2021 — forked from mutin-sa/Public_Time_Servers.md
List of Top Public Time Servers
View Public_Time_Servers.md

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@galaxy001
galaxy001 / passgitgpg.md
Created Apr 14, 2020 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key
View passgitgpg.md

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

View raw_github.sh
#!/bin/bash
# data: 2020-03-31
# author: muzi502
# for: Fuck GFW and download some raw file form github without proxy using jsDelivr CDN
# usage: save the .she to your local such as /usr/bin/rawg, and chmod +x /usr/bin/rawg
# use rawg https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh to download
set -xue
# GitHub rul: https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh
# jsDelivr url: https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh
View 如何使用python3逃逸沙箱,获得进程上下文权限提升.md

如何使用python3逃逸沙箱,获得进程上下文权限提升

最近突发奇想,想对所掌握的python知识进行总结一下,目前其实还停留在python层面如何使用,还没有深入到虚拟机部分,如果下面有哪些错误,欢迎指出。

背景

OJ(Online judge, 在线编程测评提交代码到后台运行检查)网站一般都允许各种各样的代码提交,其中很有可能包含python3,于是决定尝试通过python3的代码执行,进行沙箱逃逸,以及绕过各种限制。

我随便找了一个OJ网站,这个站点的python3有如下限制

@galaxy001
galaxy001 / git-pull-all
Created Jun 21, 2019 — forked from grimzy/git-pull-all
Git pull all remote branches
View git-pull-all
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
View ss_v2ray_plugin.md
View gollum_baiduyun_v3.4.5.js
/**
* 贪灵Gollum for Baiduyun, Ver.3.4.5
* 立即执行函数:百度云盘批量转存用户分享。
*
* 【特点】
* - 可保持或无视原分享者的目录结构。
* - 支持差分转存。
* - 自动分解转存,可突破单次转存总文件数5000的限制。
* - 可在分享主页下,进入某文件夹来转存其下级子文件夹。
* - 支持专辑转存。