Skip to content

Instantly share code, notes, and snippets.

@pcurylo
pcurylo / gist:6589897
Created September 17, 2013 03:52
Cygwin and apt-cyg
Installing or reinstalling Cygwin... lots of packages.
Cygwin now has a -P command line for feeding comma separated list of packages to install. Should be easier then clicking all those boxes.
now using apt-cyg to install packages: https://code.google.com/p/apt-cyg/
$wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
$chmod +x apt-cyg
$mv apt-cyg /usr/local/bin
apt-cyg (not cyg-apt) was working... change in repos for Cygwin to differentiate between x86 (32-bit) and x86_64 breaks the apt-cyg script. Fix detailed in issue 31 (https://code.google.com/p/apt-cyg/issues/update.do?id=31#makechanges). Diff below will fix.
@pcurylo
pcurylo / cross_command_interpreter_calls
Created May 11, 2016 13:20
Calling another command interpreter
#To Powershell
#From Bash
powershell -inputformat none -noprofile echo hello | grep hello
#From cmd
powershell echo hello
#To Bash
#From Powershell
?????
#From cmd
@pcurylo
pcurylo / twiki_config
Created October 31, 2016 21:07
Twiki vm config security adjustments
openssl ciphers -v 'TLSv1.2:!NULL:!ADH:!kECDH:@STRENGTH'
/etc/httpd/conf/httpd.conf #section 1 - bottom
#
# Set Trace/Track off
TraceEnable Off
#
# configure FileETags
FileETag MTime Size
@pcurylo
pcurylo / new_kali_user_setup.sh
Created December 11, 2016 02:58
new_kali_user_setup.sh
#!/bin/bash
# kali new user setup
# This script assumes a new user has been setup to use Kali
# user may or may not be sudo
# CREDITS
# This script borrows heavily from BeanBagKing/new_setup.sh
# https://gist.github.com/BeanBagKing/198683e3206eb8885a1a20f6adb6e7e6
@pcurylo
pcurylo / bash_aliases
Last active December 11, 2016 03:45
.bash_aliases
# ~/.bash_aliases file source by ~/.bashrc
# https://gist.github.com/pcurylo/91a5664301695fdade07ab54b74fe56e
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias 'ls=ls --color=auto'
alias 'dir=dir --color=auto'
alias 'vdir=vdir --color=auto'
alias 'grep=grep --color=auto'
alias 'igrep=igrep --color=auto'
@pcurylo
pcurylo / secure_trash
Last active December 11, 2016 04:37
secure_trash
#!/bin/bash
# Requires scrub
# place in /usr/local/bin
# CREDITS
# from testingresults URL: https://forums.kali.org/showthread.php?485-How-To-Securely-Sanitize-your-Trash
#
find ~/.local/share/Trash/files ~/.local/share/Trash/info -type f -print0 | xargs -0 -I{} /usr/bin/scrub -Sfp random {}
@pcurylo
pcurylo / empty_trash.service
Last active December 11, 2016 04:49
empty_trash.service
[Unit]
Description=Empty trash
Requries=local-fs.target
Before=shutdown.target reboot.target halt.target
[Service]
ExecStart=/bin/true
ExecStop=/usr/local/bin/secure_trash
Type=oneshot
RemainAfterExit=true
@pcurylo
pcurylo / new_kali_setup.sh
Last active December 11, 2016 06:14
new_kali_setup.sh
#!/bin/bash
# This script assumes the following as taken place
# - Create a secure root password 10+chars and LVM passphrase 20+chars
# - Obtain iso (2016.2) from source: kali.org
# - dd to usb drive
# - boot into graphical install
# - accept all defaults unless noted below
# Encrypted LVM - all files in one partition
@pcurylo
pcurylo / lxde_shortcuts
Last active December 17, 2016 01:36
LXDE Shortcuts
Default LXDE/Openbox bindings
ACTION BINDING
Go to desktop (direction) ctrl + alt + arrow
Go to desktop (number) super + f1/f2/f3/f4
Send to desktop shift + alt + arrow
Toggle show desktop super + d
Close window alt + f4
Hide window alt + esc
Window menu alt + space
@pcurylo
pcurylo / kali_rpi_tplink_wlan0
Last active December 17, 2016 01:39
Getting TP Link TL-WN725N up on RPI running Kali