Skip to content

Instantly share code, notes, and snippets.

function deleteDisableUsersDirectory{
[CmdletBinding()]
param(
[parameter(
position = 0,
mandatory = 0
)]
[string]
$path
)
function makeEnableUsersDirectory{
[CmdletBinding()]
param(
[parameter(
position = 0,
mandatory = 0
)]
[string]
$path
)
# Set domain
$usersDomain = ""
# Set ad server
$ADServerName = ""
# Set forced directory
$forcedDirectory = ""
function makeEnableUsersDirectory{
@h-otter
h-otter / README.md
Last active March 15, 2016 13:14
0ctf-piapiapia

piapiapia (Web 6pts)

Points

  • We can post any string to update.php as "nickname" array.
  • A object was broken with serialize() and filter().
  • String length increased a char as filter() replace a serialized string from 'where' to 'hacker'.

Howto

#!/bin/bash
usage_exit(){
echo "[*] Usage: $0 [-w] [-n suffix_num] [-f] [-o output_dir] filename"
echo
echo "backup a file as {filename}.{date}[.{suffix_num}]"
echo " -w: bachup without suffix_num"
echo " -n: set suffix_num"
echo " -f: cp without -i option"
echo " -o: output to directory"
# -- default shell --
set-option -g default-shell /bin/zsh
set-option -g default-command /bin/zsh
# -- prefix --
set -g prefix C-s
unbind C-b
# -- line max --
set -g history-limit 50000
# Set up the prompt
autoload -Uz promptinit
promptinit
PROMPT='
%K{blue}%n@%m%k %B%F{cyan}%~%f%b
%# '
#RPROMPT='[%(?.%?.%B%F{red}%?%f%b), %D %*] # process result
setopt histignorealldups sharehistory
export GOPATH="$HOME/.go"
export PATH=$PATH:$HOME/.go/bin
@h-otter
h-otter / rc.lua
Created September 14, 2016 03:51
awesome
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
@h-otter
h-otter / bogo.cpp
Last active January 10, 2017 06:15
#include <algorithm>
#include <iostream>
#include <iterator>
#include <random>
#define N 100
template <typename RandomAccessIterator, typename Predicate>
int bogo_sort(RandomAccessIterator begin, RandomAccessIterator end, Predicate p) {
std::random_device rd;