This file contains hidden or 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
from org.apache.nifi.processor import Processor,Relationship | |
from org.apache.nifi.components import PropertyDescriptor | |
from org.apache.nifi.processor.util import StandardValidators | |
from java.lang import Throwable | |
class ScriptBody(): | |
def __init__(self): | |
pass | |
def executeScript(self, session, context, log, REL_SUCCESS, REL_FAILURE): | |
flowFile = session.get() |
This file contains hidden or 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
NIFI_TASK \[%{GREEDYDATA:NifiTask} %{NOTSPACE:Thread}\] |
This file contains hidden or 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
# https://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.htmlhttps://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html | |
############################################## | |
# | |
# ELK Server | |
# | |
############################################## | |
yum install -y java | |
rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch |
This file contains hidden or 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
class Struct(object): | |
def __init__(self, data): | |
for name, value in data.items(): | |
setattr(self, name, self._wrap(value)) | |
def _wrap(self, value): | |
if isinstance(value, (tuple, list, set, frozenset)): | |
return type(value)([self._wrap(v) for v in value]) | |
else: | |
return Struct(value) if isinstance(value, dict) else value |
This file contains hidden or 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
/* | |
* (un)comment correct payload first (x86 or x64)! | |
* | |
* $ gcc cowroot.c -o cowroot -pthread | |
* $ ./cowroot | |
* DirtyCow root privilege escalation | |
* Backing up /usr/bin/passwd.. to /tmp/bak | |
* Size of binary: 57048 | |
* Racing, this may take a while.. | |
* /usr/bin/passwd overwritten |
This file contains hidden or 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
Get-ChildItem -filter '*_COLOR.svg' | | |
ForEach-Object { | |
$name = $_.Name -Replace '_COLOR', '' | |
$name.ToString(); | |
Remove-Item $name | |
Rename-Item $_.Name -NewName $name; | |
} | |
Get-ChildItem -filter '*-color.svg' | |
This file contains hidden or 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
sudo apt-get install virtualbox-guest-additions-iso | |
cd /usr/share/virtualbox | |
sudo mkdir /mnt/guessadd | |
sudo mount -o loop VBoxGuestAdditions.iso /mnt/guessadd | |
sudo /mnt/guessadd/VBoxLinuxAdditions.run | |
sudo umount /mnt/guessadd | |
sudo rm -rf /mnt/guessadd |
This file contains hidden or 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
Icacls C:\Dev /inheritance:e /grant:r "IUSR":(OI)(CI)F /grant:r "IIS_IUSRS":(OI)(CI)F |
This file contains hidden or 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
git -c http.sslVerify=false clone https://tfs.rmi.tec.dom:444/tfs/DefaultCollection/yyyyy/_git/xxxxxxxxx |
This file contains hidden or 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
let agregationInterval = 1h; | |
let StartTime = datetime("2017-08-01"); | |
let EndTime = datetime("2017-08-31"); | |
let ips = dynamic(['2.139.214.0', '::1', '0.0.0.0', '127.0.0.0']); | |
let resultCodes = dynamic(['402']); | |
let filteredRequests = requests | |
| where timestamp >= StartTime and timestamp < EndTime and resultCode !in (resultCodes) and client_IP !in (ips) and client_CountryOrRegion != '' | |
| summarize req = count() by client_IP,client_CountryOrRegion, timestamp; | |
filteredRequests | |
| summarize sum=sum(req), avg=avg(req), stdev=stdev(req) by client_CountryOrRegion |