Skip to content

Instantly share code, notes, and snippets.

@aN0mad
aN0mad / Deploy Django and React APP in a production VPS.md
Created May 9, 2024 18:21 — forked from farhad0085/Deploy Django and React APP in a production VPS.md
Deploy Django and React APP in a production VPS (Django + Celery + React + PostgreSQL + NGINX + Ubuntu Server)

Deploy Django and React APP in a production VPS (Django + React + PostgreSQL + NGINX + Ubuntu Server)

Assuming You have backend and frontend codes in /home/backend and /home/frontend/ (Use git to upload)

Install required Packages from the Ubuntu Repositories

sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
#! /usr/bin/env python3.2
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):
if ".nessus" in fileName:
print(":: Parsing", fileName)
@aN0mad
aN0mad / Dockerfile
Created December 13, 2023 16:23
Generate OpenSSH pre 7.8 keys for use with Nessus Authenticated Linux Scanning
FROM alpine:3.8.4
# Run command
# docker run -v ${pwd}:/keys -it keygen
# Do update and install openssh
RUN apk update
RUN apk add openssh
# Create script and folder
@aN0mad
aN0mad / tee.go
Created May 26, 2023 19:44 — forked from jerblack/tee.go
Golang: Mirror all writes to stdout and stderr in program to log file
package main
import (
"fmt"
"io"
"log"
"os"
)
func main() {
@aN0mad
aN0mad / log-all-zsh-bash-commands-syslog.md
Created June 4, 2022 17:24 — forked from dayreiner/log-all-zsh-bash-commands-syslog.md
Log all users zsh / bash commands via syslog without 3rd-party tools or auditd

Sending Bash and ZSH Commands to Syslog

Also posted here: http://18pct.com/sending-bash-and-zsh-commands-to-syslog/

Your bash/zsh history is great if its complete, but it doesn't capture commands across all users, sudo's, root commands etc. In particular with test environments, someone may perform a "one-off" procedure and then months later it needs to be repeated. It would be nice to be able to look up what the user did at the time, and searching through multiple, possibly truncated history files is a pain.

Tools like typescript are great if you're actively documenting, but not something you would use all the time in practice and capture more than just a history of your commands. There are third-party tools like rootsh and Snoopy that can accomplish this, but third-party tools can be overkill if all you want is a quick reference in a re

@aN0mad
aN0mad / rsrcDecryptAssembly.nim
Created March 14, 2022 15:18 — forked from ChoiSG/rsrcDecryptAssembly.nim
embed .net, decrypt, load and execute in nim poc
import nimcrypto
import winim/clr except `[]` # https://s3cur3th1ssh1t.github.io/Playing-with-OffensiveNim/ <-- thank you so much, 2 hours googling I almost went crazy
#[
All credit goes to @byt3bl33d3r (OffensiveNim) and @s3cur3th1ssh1t
nimble install winim nimcrypto zippy
nim c -d:danger -d:strip --opt:size rsrcDecryptAssembly.nim
slurp = "staticRead" will read the file and store it in the variable (.rdata) on compile time.
# Code snippet to convert all .csv files in the current directory to .xlsx files and upload to smartsheet
import os
import glob
import pandas as pd
import numpy as np
import smartsheet # Package smartsheek-python-sdk
import openpyxl
# Smartsheet Token for use with API