This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* * | |
* Exercise 1-13. Write a program to print a histogram of the lengths of words in | |
* its input. It is easy to draw the histogram with the bars horizontal; a vertical | |
* orientation is more challenging. | |
* ---- | |
* ANSI C K&R - CHARACTER INPUT AND OUTPUT: PAGE 15 | |
* The quantities IS_LOWER, IS_UPPER, IS_ALPHA, MAXLEN, OUT and IN (macros) | |
* are symbolic constant, not variables, so they do not appear in declarations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#coded by sl4y3r 0wn3r | |
#uncomment below for debug | |
#set -x | |
# + and this to execute line by line (hit enter) | |
#trap read debug | |
# Color bash | |
RED='\033[1;31m' | |
GREEN='\033[1;32m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JEKYLL_PATH="YOUR_JEKYLL_PATH" | |
POST_DATE=$(date +%Y-%m-%d) | |
TITLE=$1 | |
FILENAME="$POST_DATE-${TITLE//\ /-}" || "" | |
[[ -z "$TITLE" ]] \ | |
&& { | |
echo >&2 "[!] Filename not set." \ | |
&& exit 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"flag" | |
"net/http" | |
"io/ioutil" | |
"strings" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<oval_definitions | |
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" | |
xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd"> | |
<generator> | |
<oval:product_name>Security StackExchange Question - 194557</oval:product_name> | |
<oval:schema_version>5.10</oval:schema_version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check your environment locale: | |
# $ env | grep 'LANG' | |
# GDM_LANG=en_US.utf8 | |
# LANG=en_US.UTF-8 | |
# LANGUAGE=en_US.UTF-8 | |
# Adjust ~/.zshrc | |
# [snippet] | |
if [[ "$color_prompt" = yes ]]; then | |
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)──}(%B%F{%(#.red.blue)}%n%(#.💀.💣)%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# for more info: https://shenaniganslabs.io/2019/01/28/Wagging-the-Dog.html | |
# this is a rough PoC | |
# requirements for RCE: | |
# - the attacker needs to either have or create an object with a service principal name | |
# - the MSSQL server has to be running under the context of System/Network Service/a virtual account | |
# - the MSSQL server has the WebClient service installed and running (not default on Windows Server hosts) | |
# - NTLM has to be in use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of plugins | |
# Reference: https://github.com/tmux-plugins/tpm | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
# Personal plugins | |
set -g @plugin 'tmux-plugins/tmux-logging' | |
# Remap prefix to screens | |
set -g prefix C-q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env python3 | |
############################################################################################################### | |
# [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script | |
# [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift | |
# [Edited]: Slayer @ May 17, 2019 | |
# ------------------------------------------------------------------------------------------------------------- | |
# [Details]: | |
# This script is intended to be executed locally on a Linux box to enumerate basic system info and | |
# search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Making the BASH dive into 'Shell Style Guide' for better readability. | |
" https://lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf | |
" https://google.github.io/styleguide/shell.xml | |
syntax on " set syntax highlight turned on; | |
set tabstop=4 " set tabstop to tell vim how many columns a tab counts for. Linux kernel code expects each tab to be 8 columns wide. Visual studio expects each tab to be four columns wide. This is the only command here that will affect how existing text displays; | |
set expandtab " convertt tabs to spaces; | |
set shiftwidth=2 " indent is 2 spaces; | |
set softtabstop=2 " untab size of, instead single space; | |
set autoindent " always set autoindenting on; | |
" extras: |
NewerOlder