Skip to content

Instantly share code, notes, and snippets.

#!/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"
@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

# Set domain
$usersDomain = ""
# Set ad server
$ADServerName = ""
# Set forced directory
$forcedDirectory = ""
function makeEnableUsersDirectory{
function makeEnableUsersDirectory{
[CmdletBinding()]
param(
[parameter(
position = 0,
mandatory = 0
)]
[string]
$path
)
function deleteDisableUsersDirectory{
[CmdletBinding()]
param(
[parameter(
position = 0,
mandatory = 0
)]
[string]
$path
)