This file contains 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 <bit> | |
#include <array> | |
int main() | |
{ | |
// Create raw array in stack: rsp+2C | |
volatile std::uint32_t stack[3]; | |
// mov dword ptr ss:[rsp+2C], 6C6C6548 | |
stack[0] = std::integral_constant<std::uint32_t, std::bit_cast<std::uint32_t>(std::array<char, sizeof(std::uint32_t)>{'H', 'e', 'l', 'l'})>::value; |
This file contains 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
const Regex = { | |
BadWords: /(bad word|can't censor me)/g | |
}, IString = "hey, i'm a bad word and you can't censor me"; | |
IString.replace(new RegExp(Regex.BadWords), RString => Array.from(RString).map(() => "*").join(String())) | |
// Output: "hey, i'm a ******** and you ***************" |