Skip to content

Instantly share code, notes, and snippets.

View wheelq's full-sized avatar
🎯
Focusing

Michal Wiczynski wheelq

🎯
Focusing
View GitHub Profile
@wheelq
wheelq / wapiti_scanner.sh
Last active March 21, 2019 16:42
DevSecOps/Automated Wapiti3 scanner (wheelq)
#!/bin/bash
#title :wapiti_scan.sh
#description :This script is used for automated wapiti scans.
#author :Michal Wiczynski <wheelq@gmail.com>
#date :2019-03-06
#version :0.1c
#usage :bash wapiti_scan.sh
#notes :[N/A]
#==============================================================================
@wheelq
wheelq / bash-boilerplate.sh
Created March 27, 2019 11:00 — forked from sheharyarn/bash-boilerplate.sh
Bash Script Boilerplate code
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@wheelq
wheelq / mkdirperms.sh
Last active March 29, 2019 13:55
Oneliner - Create directory and set permissions
#!/usr/bin/env bash
#Author: Michal Wiczynski <wheelq@gmail.com>
#Create './[directory]' with chmod 777
_DIR_NAME="dirname"
#(re)create directory and set new permissions
mkdir -pm 777 "${_DIR_NAME}"
ls -la "${_DIR_NAME}"
@wheelq
wheelq / README.md
Created April 2, 2019 08:20
Install archerysec

https://hub.docker.com/r/archerysec/archerysec/ Installation/runscripts:

start.sh #!/usr/bin/env bash mkdir "$(pwd)/vol" docker run --rm --name archery -it -p 8080:8000 -v $(pwd)/vol:/root/.archerysec archerysec/archerysec:latest >> start.sh.log 2>&1

stop.sh #!/usr/bin/env bash

@wheelq
wheelq / openvas-automate.sh
Created April 4, 2019 11:15 — forked from mgeeky/openvas-automate.sh
OpenVAS automation script.
#!/bin/bash
#
# OpenVAS automation script.
# Mariusz B. / mgeeky, '17
# v0.2
#
trap ctrl_c INT
# --- CONFIGURATION ---
@wheelq
wheelq / web-servers.md
Created April 4, 2019 11:18 — forked from mgeeky/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@wheelq
wheelq / export.txt
Created April 16, 2019 08:35
Export Jenkins jobs
#######Export######
java -jar jenkins-cli.jar -s http://server get-job myjob > myjob.xml
curl -s http://OLD_JENKINS/job/JOBNAME/config.xml
#Local export
/var/lib/jenkins/jobs/-the-project-name-/config.xml
###################
####export/import####
curl -s http://OLD_JENKINS/job/JOBNAME/config.xml | curl -X POST 'http://NEW_JENKINS/createItem?name=JOBNAME' --header "Content-Type: application/xml" -d @-
@wheelq
wheelq / .vimrc.add-on
Created April 16, 2019 09:50
Vi save with root priv
:w !sudo tee %
'''
*:w_c* *:write_c*
:[range]w[rite] [++opt] !{cmd}
Execute {cmd} with [range] lines as standard input
(note the space in front of the '!'). {cmd} is
executed like with ":!{cmd}", any '!' is replaced with
the previous command |:!|.
'''
:w isn't updating your file
@wheelq
wheelq / Makefile
Created April 16, 2019 13:08
Makefile pwd test
#!/usr/bin/env bash
#Author: Michael Wiczynski <wheelq@gmail.com>
#Date: 2019-04-16
#Description: testking Makefile and...
#Usage: make test_1; make test_2
test_1:
@pwd
echo "Why am I empty...:\"$(pwd)\""
test_2:
@wheelq
wheelq / README.md
Last active April 18, 2019 08:51
DefectDojo - Docker Installation