Skip to content

Instantly share code, notes, and snippets.

@motebaya
motebaya / link_wa.py
Created July 12, 2022 14:30
just for check whatsapp group invite url sttil valid or not
@motebaya
motebaya / generate_word.py
Last active August 1, 2022 08:44
snippet python for get readable word
"""
here you can get list world for variable names
"""
import requests
import re
from urllib.parse import urlparse
def animal(f):
if (indoAnimal := re.findall(r"(?<=\">)([\w+]*?)(?=<\/a><\/td>)", requests.get("https://foresteract.com/daftar-nama-hewan-binatang-di-indonesia/").text)):
f.write("\n".join(map((lambda x: x.lower().strip()),indoAnimal)) + "\n")
@motebaya
motebaya / clearvars.php
Last active August 1, 2022 10:45
for change /replace unreadable ascii variable to readable .
<?php
/*
this to replace all php ascii variable to human readable
author: motebaya
gihtub.com/motebaya
*/
function utf8($utf){
return iconv('UTF-8', 'ISO-8859-1', $utf);
}
@motebaya
motebaya / rename_vars.php
Last active August 1, 2022 10:47
if ($vars !== readable) do using $this;
<?php
/*
here source https://stackoverflow.com/questions/32393232/php-rename-all-variables-inside-code
*/
function clearvar($file, $out)
{
$tokens = token_get_all(file_get_contents($file));
$globals = array('$GLOBALS', '$_SERVER', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_REQUEST', '$_ENV');
$registry = get_defined_functions();
$registry = $registry['internal'];
@motebaya
motebaya / prettify.php
Created August 1, 2022 11:52
snippet php for format php code using php parser
<?php
/*
https://github.com/nikic/PHP-Parser/blob/master/doc/2_Usage_of_basic_components.markdown
https://github.com/nikic/PHP-Parser/blob/master/doc/component/Pretty_printing.markdown
*/
require "vendor/autoload.php";
use PhpParser\ParserFactory;
use PhpParser\PrettyPrinter;
if (count($argv) > 1) {
@motebaya
motebaya / fbStream.js
Last active August 5, 2022 11:57
javascript snippet to get facebook video stream url
javascript: window.open(decodeURIComponent(document.body.innerHTML.match(/(?<=\/video\_redirect\/\?src\=)(.*?)(?=\")/)[0]));
@motebaya
motebaya / dclean.php
Created September 2, 2022 12:55
get last layer for decode eddiekidiw
<?php
/// just for extract phar compiler
function extractPhar($file){
(new Phar($file))->extractTo(__DIR__);
}
// check argc
if (count($argv) < 2) {
die("usage: decode.php <file.php>");
@motebaya
motebaya / kuso.js
Created September 17, 2022 14:37
a simple js xss for kusonime.com
/*
davins; (t.me/dvinchii)
date: new Date() => {
Sat Sep 17 2022 21:33:37 GMT+0700 (Western Indonesia Time)
}
*/
async function getdata(){
return new Promise((resolve, reject) => {
let data = {};
if (document.readyState == "complete"){
@motebaya
motebaya / tester.js
Created September 17, 2022 17:25
node js hello world for sample or test with oop
/*
file tester with node js oop
help from:
https://stackoverflow.com/questions/9071573/is-there-a-simple-way-to-make-a-random-selection-from-an-array-in-javascript-or
https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep
https://stackoverflow.com/questions/18188083/javascript-oop-in-nodejs-how
*/
class Tester {
<?php
/*
i convert it from js to python then from python to php LOL
credit: github.com/motebaya
*/
class Decoder
{
private $content;