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"
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 December 20, 2016 07:03
#include <algorithm>
#include <iostream>
#include <iterator>
#include <random>
#include <stdio.h>
#define N 100
template <typename RandomAccessIterator, typename Predicate>
int bogo_sort(RandomAccessIterator begin, RandomAccessIterator end, Predicate p) {
@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;
#!/bin/bash -eu
usage_exit() {
echo "Usage: $0 [-d user] [-u user]" 1>&2
echo " -d: disable deny access from user" 1>&2
echo " -u: kick $1 and deny access from user" 1>&2
exit 1
}
kick_user(){