Skip to content

Instantly share code, notes, and snippets.

View bpteam's full-sized avatar
:shipit:
ship it

Evgeny Pynykh bpteam

:shipit:
ship it
View GitHub Profile
@sh4dowb
sh4dowb / phpkoru-deobfuscate-2.php
Last active January 31, 2024 16:35
PHPkoru.com v1.0.6 (new) deobfuscator. Make sure to run it isolated, to prevent any attacks from eval'd code
<?php
// V1.0.7 DEOBFUSCATOR: https://gist.github.com/sh4dowb/68c9e090a3006b1d19ce49a22529c0a5
// put encrypted code in encrypted.php, or use it like:
// $ php phpkoru-deobfuscate-2.php encryptedfilename.php
// for decrypting advanced version contact me on telegram
function decrypt($fn, $try=0){
$onfr64_qrpbqr = 'base64_decode';
@trisberg
trisberg / local-registry.md
Last active July 19, 2024 18:23
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
@sh4dowb
sh4dowb / phpkoru.deobfuscate.php
Last active October 17, 2023 21:36
PHPkoru.com deobfuscator. Make sure to run it isolated, to prevent any attacks from eval'd code
<?php
// FOR NEW VERSION (1.0.6): https://gist.github.com/sh4dowb/86ad09b9bcbfce323b511395e446d616
// FOR 1.0.7: https://gist.github.com/sh4dowb/68c9e090a3006b1d19ce49a22529c0a5
$input = file_get_contents("untitled.php");
//edit this filename
// for decrypting advanced version contact me on telegram
<!doctype html>
<script type="application/javascript">
const s = `
application/mp4
application/mp4; codecs=bogus
application/octet-stream
application/octet-stream; codecs='avc1.42E01E, mp4a.40.2'
application/octet-stream; codecs='mp4a.40.2'
application/octet-stream; codecs='theora, vorbis'
application/octet-stream; codecs='vorbis'
@sathed
sathed / postgres_fdw.sql
Created October 25, 2017 21:48
postgres_fdw example
/***** "Remote" server first *****/
-- Note: Unless the object you are trying to gain access to is in the same DATABASE, it's a remote datebase. Even if it's
-- on the same node!
-- 1. create the role and assign it a password. Note: CREATE USER is an alias for CREATE ROLE. Either one is fine
CREATE ROLE new_user WITH PASSWORD 'somepassword';
-- 2. Grant the required permissions. This grants select, insert, update, and delete on all tables in the public schema.
-- I also gave execute to all functions in the public schema as well.
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO new_user;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO new_user;
@sh41
sh41 / 01 Create a debug version of the docker image.sh
Last active April 16, 2024 10:08
Debugging segmentation faults in PHP in a docker container.
git clone git@github.com:docker-library/php.git docker-library-php
## Go to the specific version you're interested in
cd docker-library-php/7.1/fpm/alpine
## Edit the .Dockerfile.
## Change
## ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data
## to
## ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-debug
## Comment out or delete:
@coco98
coco98 / kube-registry.yaml
Created May 2, 2017 16:31
Docker registry on minikube
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@azhararmar
azhararmar / Symfony - Manual User Authentication
Last active June 21, 2024 08:44
Manually Authenticate User In Symfony
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
// Manually authenticate user in controller
$token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());
$this->get('security.token_storage')->setToken($token);
$this->get('session')->set('_security_main', serialize($token));
@nepsilon
nepsilon / dom-how-to-select-range-of-children.md
Last active August 16, 2016 02:58
DOM: How to select a range of children? — First published in fullweb.io issue #58

DOM: How to select a range of children?

Given the following HTML code:

<ol>
  <li>1</li>
  <li>2</li>
  <li>3</li>
 4
@nepsilon
nepsilon / crontab-send-html-emails.md
Last active February 19, 2017 13:52
Make crontab send you HTML emails — First published in fullweb.io issue #57

Make crontab send you HTML emails

Any output (to stdout and stderr) generated by a crontab task will be sent to you by email. This is great to generate system reports or be alerted when something goes wrong.

By default crontab (and the MTA it relies on) will use a text/plain MIME type. But you can make crontab tells the mail sender to use another MIME type, like text/html.

Open crontab with crontab -e, and add this line: