Skip to content

Instantly share code, notes, and snippets.

@hackgnar
hackgnar / ghetto_bleah.sh
Last active September 26, 2023 07:46
Ghetto Gatttool Bleah Output
#!/bin/bash
# run with the following syntax:
# ./ghetto_bleah.sh 11:22:33:44:55:66
mac=$1 ;
while read i;
do
printf "%s " $(echo -n $i|awk '{printf "%s : ", $1'});
printf "%s " $(echo -n $i|awk '{printf "%s : ", $3'});
#printf "%s : " $(echo -n $i|awk '{printf "%s", $2'});
@hackgnar
hackgnar / ble_ctf_score.sh
Created June 8, 2018 00:23
ble ctf score
gatttool -b de:ad:be:ef:be:f1 --char-read -a 0x002a|awk -F':' '{print $2}'|tr -d ' '|xxd -r -p;printf '\n'
@hackgnar
hackgnar / ble_ctf_flag1.sh
Created June 8, 2018 00:20
ble ctf flag 1
gatttool -b de:ad:be:ef:be:f1 --char-write-req -a 0x002c -n $(echo -n "12345678901234567890"|xxd -ps)
@hackgnar
hackgnar / ble_ctf_enumerate.sh
Created June 8, 2018 00:18
ble ctf enumerate
sudo bleah -b "de:ad:be:ef:be:f1" -e
@hackgnar
hackgnar / ble_ctf_scan.sh
Created June 8, 2018 00:13
ble ctf scan command
sudo hcitool lescan |grep BLECTF
hdiutil convert -format UDRW -o foo.img foo.iso
diskutil unmountDisk /dev/diskX
sudo dd if=foo.img of=/dev/diskX bs=1m
@hackgnar
hackgnar / gist:0614a3ff188dd97a59cf
Created September 20, 2015 13:04
create an osx yosemite usb
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MOUNT_NAME --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
runtime! debian.vim
set nocompatible
if has("syntax")
syntax on
endif
set background=dark
if has("autocmd")
filetype plugin indent on
endif
set showcmd " Show (partial) command in status line.
############################
### git bash completion ###
############################
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
############################
### prompt look and feel ###
############################
PS1='\