-
var
는function-scoped
이고,let
,const
는block-scoped
입니다. -
function-scoped
와block-scoped
가 무슨말이냐?
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
function fieldSorterOptimized(fields) { | |
var dir = [], i, l = fields.length; | |
fields = fields.map(function(o, i) { | |
if (o[0] === "-") { | |
dir[i] = -1; | |
o = o.substring(1); | |
} else { | |
dir[i] = 1; | |
} | |
return o; |
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
function Invoke-ExcelMacroPivot{ | |
<# | |
.AUTHOR | |
Matt Nelson (@enigma0x3) | |
.SYNOPSIS | |
Pivots to a remote host by using an Excel macro and Excel's COM object | |
.PARAMETER Target | |
Remote host to pivot to | |
.PARAMETER RemoteDocumentPath | |
Local path on the remote host where the payload resides |
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
unsigned char* hexstr_to_char(const char* hexstr) | |
{ | |
size_t len = strlen(hexstr); | |
IF_ASSERT(len % 2 != 0) | |
return NULL; | |
size_t final_len = len / 2; | |
unsigned char* chrs = (unsigned char*)malloc((final_len+1) * sizeof(*chrs)); | |
for (size_t i=0, j=0; j<final_len; i+=2, j++) | |
chrs[j] = (hexstr[i] % 32 + 9) % 25 * 16 + (hexstr[i+1] % 32 + 9) % 25; | |
chrs[final_len] = '\0'; |
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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |