Use the diff
code highlighting tag.
```diff
- foo
+ bar
Example:
# Create a container from the mongo image, | |
# run is as a daemon (-d), expose the port 27017 (-p), | |
# set it to auto start (--restart) | |
# and with mongo authentication (--auth) | |
# Image used is https://hub.docker.com/_/mongo/ | |
docker pull mongo | |
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
# add a root user |
// get all items of all players | |
/* WITHOUT ES6 spread operator */ | |
const items = []; | |
players.forEach((player) => { | |
player.forEach((item) => { | |
items.push(item); | |
}); | |
}); | |
#!/bin/sh -e | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
# use this file except in compliance with the License. You may obtain a copy of | |
# the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
Array.from(document.querySelectorAll('a')) | |
.filter((a) => { return !a.href.match( /^https?\:\/\/example\.com\// ); }) | |
.map((a) => (`- [${a.text}](${a.href})`)) | |
.join('\n'); |
/** | |
* e.g. retrieving field values from a form. | |
*/ | |
function getDateFromForm() { | |
const props = ['year', 'month', 'day', 'hour', 'minutes', 'sec', 'milisec']; | |
return props.map((prop) => { | |
return document.querySelector(`#${prop}`).text; | |
}); | |
} |
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
# Edited spl0it to loop and save cookies. | |
import sys | |
import struct | |
import socket | |
import time |
# Simulate fake processes of analysis sandbox/VM that some malware will try to evade | |
# This just spawn ping.exe with different names (wireshark.exe, vboxtray.exe, ...) | |
# It's just a PoC and it's ugly as f*ck but hey, if it works... | |
# Usage: .\fake_sandbox.ps1 -action {start,stop} | |
param([Parameter(Mandatory=$true)][string]$action) | |
$fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe", | |
"VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe", |
The list of actions listed below was taken mostly from Book Of Zeus with minor modifications and did the job well for Ubuntu version, which was available at that moment (May 2016). This gist was created for internal use and was never meant to be discovered by the web, although Google managed to find and index this page, which was a great surprise for me. Please check the original source for the updated information (links are provided in most of the sections), and read the comments below: they provide more details about the usage experience.
http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/
Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.