Skip to content

Instantly share code, notes, and snippets.

View EkkoG's full-sized avatar

Ekko EkkoG

View GitHub Profile
@EkkoG
EkkoG / allow_folx.sh
Last active September 26, 2021 14:18
defaults write com.google.Chrome URLAllowlist -array-add -string "openinfolx3://*"
defaults write com.microsoft.Edge URLAllowlist -array-add -string "openinfolx3://*"
:PSW - [0:0]
:PSW_OUTPUT - [0:0]
-A PREROUTING -p tcp -j PSW
-A OUTPUT -p tcp -j PSW_OUTPUT
-A PSW -m set --match-set laniplist dst -j RETURN
-A PSW -m set --match-set vpsiplist dst -j RETURN
-A PSW -m set --match-set whitelist dst -j RETURN
-A PSW -m mark --mark 0xff -j RETURN
-A PSW -d 11.1.1.1/32 -p tcp -m comment --comment "\'默认\'" -j REDIRECT --to-ports 1041
-A PSW -p tcp -m comment --comment "\'默认\'" -m set --match-set shuntlist dst -j REDIRECT --to-ports 1041
@EkkoG
EkkoG / set.sh
Last active April 30, 2021 16:44
command to allow open folx without alert
defaults write com.google.Chrome URLAllowlist -array-add -string "openinfolx3://*"
#!name=All Capture
#!desc=Capture the request body and save permanently.
[MITM]
hostname = *
@EkkoG
EkkoG / cmd.py
Last active December 9, 2020 09:30
A snippet code to call pipeline command line in Python programming language
import subprocess
def _call(c, stdin=subprocess.PIPE):
command = subprocess.Popen(c,
stdin = stdin,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
return command.stdout, command.stderr, command
@EkkoG
EkkoG / query.py
Created June 25, 2019 16:33
河南省高考成绩查询
import requests
import time
from bs4 import BeautifulSoup
for i in range(1000):
headers = {
'Proxy-Connection': 'keep-alive',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
@EkkoG
EkkoG / sshd_config
Last active June 18, 2019 07:56 — forked from HacKanCuBa/sshd_config
Modern secure SSH daemon config
# Modern secure (OpenSSH Server 7+) SSHd config by HacKan
# Refer to the manual for more info: https://www.freebsd.org/cgi/man.cgi?sshd_config(5)
# Server fingerprint
# Regenerate with: ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa -b 4096
HostKey /etc/ssh/ssh_host_rsa_key
# Regerate with: ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
HostKey /etc/ssh/ssh_host_ed25519_key
# Log for audit, even users' key fingerprint
@EkkoG
EkkoG / publish_auto.sh
Last active January 16, 2019 09:01
git flow publish script
#!/bin/bash
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
FROM ubuntu:latest
# Install dependencies
RUN apt-get update && \
apt-get -y install curl && \
apt-get -y install zip unzip
# RUN apt-get -y install vim
{"sig":"4b77b3be66779ab3216b58f246dd745373244c42afe69590f04254862f069c4579cad538507750dc774eac866c3efde0373add71a2845192f794f18f9b2fddbd1","msghash":"fe9bb6be19b7252b1e802b514a254362b8466ae28caa9181f224db0d21c70a04"}