Skip to content

Instantly share code, notes, and snippets.

class Container {
static get proxyHandler () {
return {
get (target, prop) {
if (prop in target) {
return Reflect.get(...arguments)
}
return target.resolve(prop)
}
# Telnet Bruteforce in Python, by aaaddress1@chroot.org
# ref: https://github.com/jgamblin/Mirai-Source-Code
import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('10.118.127.36', 23))
#s.send(b'\xff\xfc\x23\xff\xfa\x1f\x00\xa0\x00\x39\xff\xf0\xff\xfd\x01')
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active April 21, 2024 17:04
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@jaceju
jaceju / shell_array.sh
Created May 8, 2018 03:42
Shell Script 的陣列範例
#!/bin/bash
versions=("5.6.24" "7.0.9")
function say()
{
value=$1
echo -e "php-$value\n"
}
@VBourdine
VBourdine / Default (Windows).sublime-keymap
Last active March 14, 2024 17:59 — forked from nelanka/Default (Windows).sublime-keymap
Sublime Text 3 - User Key Bindings (IntelliJ IDEA Style) - Windows
[
{ "keys": ["ctrl+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["shift+alt+up"], "command": "swap_line_up" },
{ "keys": ["shift+alt+down"], "command": "swap_line_down" }
]
@upperstream
upperstream / httpserver.sh
Last active December 9, 2023 14:58
Simple HTTP Server (shell script)
#!/bin/sh
#
# Copyright (C) 2017 Upper Stream.
#
# See the bottom of this file for licensing conditions.
#
#set -x
set -e
var pcsc = require('pcsclite');
var iconv = require('iconv-lite');
var pcsc = pcsc();
pcsc.on('reader', function(reader) {
console.log('New reader detected', reader.name);
reader.on('error', function(err) {
@MilesChou
MilesChou / greeting.php
Last active December 2, 2016 05:19
greeting
<?php
class Client
{
public $greetingRules = [];
public function __construct()
{
$this->greetingRules[] = new MorningGreeting();
$this->greetingRules[] = new AfternoonGreeting();
@JonCole
JonCole / Redis-BestPractices-General.md
Last active April 18, 2024 07:57
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@jaceju
jaceju / example.php
Last active July 17, 2020 15:16
物件導向基礎與物件導向設計入門
<?php
abstract class Database
{
public function __construct()
{
$this->connect();
}
abstract public function connect();