Skip to content

Instantly share code, notes, and snippets.

View Sarverott's full-sized avatar
💭
I may be slow to respond.

Sett Sarverott Sarverott

💭
I may be slow to respond.
View GitHub Profile
@Sarverott
Sarverott / python-detection-louncher.sh
Created March 8, 2023 17:23
idea of unification of python version detection while lounching
if [ $(cat "$1" |grep "print " -c) == 0 ];
then
python2 "$1";
else
python3 "$1";
fi
#przerobka exploita 44374.py z exploit-db.com
# Exploit Title: osCommerce 2.3.4.1 Remote Code Execution
# Date: 29.0.3.2018
# Exploit Author: Simon Scannell - https://scannell-infosec.net <[email protected]>
# Version: 2.3.4.1, 2.3.4 - Other versions have not been tested but are likely to be vulnerable
# Tested on: Linux, Windows
# If an Admin has not removed the /install/ directory as advised from an osCommerce installation, it is possible
# for an unauthenticated attacker to reinstall the page. The installation of osCommerce does not check if the page
/*
usefull in new study groups if your uniwersity email is based on "[email protected]" pattern, go to:
https://classroom.google.com/r/{ id of your classroom }/sort-last-name
inspect in devtools in browser one name of student, should be <span class="y4ihN YVvGBb">....
paste code it into console
*/
const CSS_SELECTOR_TARGET=prompt("insert css selector of all name fields", "span.y4ihN.YVvGBb");
const COLEDGE_MAIL_POSTFIX=prompt("insert students emails postfix", "@edu.your-colledge.pl");
console.log(
Array.from(
@Sarverott
Sarverott / variable-sizes.cpp
Last active June 14, 2022 14:20
prints variable types sizes in var, tab and point variant
#include <iostream>
using namespace std;
template<typename V> void varPrint(char *name, V x, int len){
V xT[len], *xX=xT;
cout
<<name
// EXECUTE: help | pipetest "dest.txt" | find "HELP"
#include <iostream>
using namespace std;
int main(int argc, char *argv[]){
char tmpBuff=0;
while(argc-->0){
cout<<"\t"<<(argv++)<<endl;
}
while(cin.good()){
if(cin.get(tmpBuff))cout.put(tmpBuff);
@Sarverott
Sarverott / #get-dom-elements-events.js
Last active April 25, 2022 03:27
to search events and listeners in dom by js
function eventSearch(searchQuery="*", searchEvent=false){
var out=Array.from(
document.querySelectorAll(searchQuery)
);
out=out.map(function(element){
const events=getEventListeners(element);
if(Object.keys(events).length!==0&&(!searchEvent||Object.keys(events).includes(searchEvent))){
var itemQuery=element.nodeName;
if(
typeof element.id=="string"
@Sarverott
Sarverott / asm-worm.a80.asm
Last active March 16, 2023 19:53
code in assembler for Intel 8080, that is self-replicatory virus example. Written for fun for 80's old school microprocessor unit. Tested on http://asm80.com/ and https://github.com/eliben/js-8080-sim emulators
;asmWorm - self-replication code in assembler for Intel 8080
;Sett Sarverott @ 2022
lxi h, 0000h ;start read
lxi d, 002fh ;stop read/start write
mvi c, 2fh ;length
mvi a, 00h ;index
replicator:
;copy this code to space after this code
mov b, m ;b=*read_pointer
xchg
/*
matrix rotation
Sett Sarverott @ 2019
*/
#include <iostream>
using namespace std;
int **transpos(int **tab){
int sizeX=sizeof(tab)/sizeof(tab[0]);
/*
prime number finder
Sett Sarverott 2022
*/
function primeNumber(zakresowa=100, withFinderShift=false){
var ret=[];
var i=0;
while(zakresowa-(++i)){
var flag=true;
for(var j in ret)
<?php
/*
prime numbers finder
Sett Sarverott 2018
*/
function prime_number($zakresowa=100){
$ret=[];
for($i=1;$i<$zakresowa;$i++){
$flag=true;
for($j=1;$j<count($ret);$j++){