Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Lorenzo Stella phosphore

🎯
Focusing
Block or report user

Report or block phosphore

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View script.ps1
# Determine where to do the logging
$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
$logPath = $tsenv.Value("LogPath")
$logFile = "$logPath\$($myInvocation.MyCommand).log"
@phosphore
phosphore / scan.js
Created Oct 24, 2018
Simple JS localhost portscan
View scan.js
var portsCheck = function(callback, target, port, timeout) {
var timeout = (timeout == null) ? 100 : timeout;
var img = new Image();
img.onerror = function() {
if (!img) return;
img = undefined;
callback(target, port, 'open');
};
View gist:606d6039fb13fbaa78b0ff0b6cb35beb
reg.exe add "HKLM\System\CurrentControlSet\Services\atapi\Controller0" /f /v EnumDevice1 /t REG_DWORD /d 0x00000001
View obf.js
var _0x180a=['random','charCodeAt','fromCharCode','parse','substr','\x5cw+','replace','(3(){(3\x20a(){7{(3\x20b(2){9((\x27\x27+(2/2)).5!==1||2%g===0){(3(){}).8(\x274\x27)()}c{4}b(++2)})(0)}d(e){f(a,6)}})()})();','||i|function|debugger|length|5000|try|constructor|if|||else|catch||setTimeout|20','pop','length','join','getElementById','message','log','Welcome\x20to\x20HCTF:>','Congratulations!\x20you\x20got\x20it!','Sorry,\x20you\x20are\x20wrong...','window.console.clear();window.console.log(\x27Welcome\x20to\x20HCTF\x20:>\x27)','version','error','download','substring','push','Function','charAt','idle','pyW5F1U43VI','init','https://the-extension.com','local','storage','eval','then','get','getTime','setUTCHours','origin','set','GET','loading','status','removeListener','onUpdated','callee','addListener','onMessage','runtime','executeScript','data','test','http://','Url\x20error','query','filter','active','floor'];(function(_0xd4b7d6,_0xad25ab){var _0x5e3956=function(_0x1661d3){while(--_0x1661d3){_0xd4b7d6['push'](
View search.js
'use strict';
var results;
var context = SP.ClientContext.get_current();
var user = context.get_web().get_currentUser();
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
View gist:0a902e1ff63105da07a740d031a0e7be
20 14 c2 08 10 0f e7 f0 00 00 00 00 00 04 07 ea e3 c8 0f d5 e7 81 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8b 65 23 18 40 e5 c0 02 9e 80 24 c0 00 00 00 fe
20 14 c2 08 10 0f 77 b8 00 00 00 00 00 04 07 ea ff 58 0f d5 c7 81 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8b 65 23 18 40 e5 c0 02 99 d3 22 30 00 00 00 f7
20 14 c2 08 10 0c 26 10 00 00 00 00 00 04 07 ea e3 c8 0f d5 fe a1 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8b 65 23 18 40 e5 c0 02 78 5c 34 80 00 00 00 c2
20 14 c2 08 10 0e d7 68 00 00 00 00 00 04 07 ea c2 58 0f d5 88 21 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8b 65 23 18 40 e5 c0 02 93 c3 98 c0 00 00 00 ed
View wordCount.c
#include <string.h>
#include <stdio.h>
int words(const char sentence[ ])
{
int counted = 0; // result
// state:
const char* it = sentence;
int inword = 0;
View countAndMean.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE* myFile;
int i;
int j;
char filename[35];
View urlRewrite.php
preg_match("/^\/per-(.*?)(-a-(.*))?\.html/", $this->uri, $matches); // vediamo se l'uri è /per-qualcosa.html o /per-qualcosa-a-luogo.html
if (count($matches) === 0) { // è solo una città
preg_match("/^\/(.+)\.html/", $this->uri, $cityArray);
$city = $cityArray[1];
echo $city;
} else if (count($matches) === 2) { // solo una professione $matches[1]
$profession = $matches[1];
You can’t perform that action at this time.