Skip to content

Instantly share code, notes, and snippets.

View kbbgl's full-sized avatar

Ko Ga kbbgl

View GitHub Profile
@kbbgl
kbbgl / arpscan_ex.sh
Last active May 17, 2020 10:51
[scan IP/MAC addresses in network] #hacking #network #enumeration #mac
# Scan whole subnet
sudo arp-scan 192.168.1.0/24 --interface ens5
@kbbgl
kbbgl / gunzipAll.sh
Created May 14, 2020 15:41
[gunzip all .gz files in current directory] #gzip #bash
gunzip *.gz
@kbbgl
kbbgl / refreshenv.bat
Created May 14, 2020 11:33
[refresh env var in cmd] #cmd #windows
refreshenv
@kbbgl
kbbgl / rec_pattern.sh
Created May 14, 2020 07:28
[find pattern recursively] #grep
grep -rnw ECS.log.* -e "Launching new ElastiCube:"
@kbbgl
kbbgl / go.google
Created May 13, 2020 22:27
[google search terms filter]
site:somedomain.com -www filetype:csv
@kbbgl
kbbgl / ssh.sh
Created May 13, 2020 17:42
[ssh without password] #linux #ssh
# Generate key
ssh-keygen
# copy public key and permissions to remote server
ssh-copy-id -i /Users/kobbigal/.ssh/lnx12.pub sisense@lnx1
@kbbgl
kbbgl / tail.ps1
Created May 12, 2020 12:54
[tail with Powershell] #powershell #files
Get-Content "C:\ProgramData\Sisense\application-logs\galaxy\galaxy.log" -Wait
@kbbgl
kbbgl / addCred.bat
Created May 12, 2020 06:46
[add credentials for rdp] #windows
cmdkey /generic:"server" /user:"admin" /pass:"admin"
@kbbgl
kbbgl / ecs.sh
Last active May 11, 2020 21:11
[get ecs from datagroup] #bash #si #sisense #jq
si datagroups list -name another_data_group --json | jq ".[0].cubes"
@kbbgl
kbbgl / lookaheads.md
Created May 11, 2020 16:21
[lookaheads] #regex

Given the string foobarbarfoo:

bar(?=bar) finds the 1st bar ("bar" which has "bar" after it) bar(?!bar) finds the 2nd bar ("bar" which does not have "bar" after it) (?<=foo)bar finds the 1st bar ("bar" which has "foo" before it) (?<!foo)bar finds the 2nd bar ("bar" which does not have "foo" before it)

You can also combine them:

(?&lt;=foo)bar(?=bar) finds the 1st bar ("bar" with "foo" before it and "bar" after it)