Skip to content

Instantly share code, notes, and snippets.

View kbbgl's full-sized avatar

Ko Ga kbbgl

View GitHub Profile
@kbbgl
kbbgl / gulpTasks.sh
Created May 7, 2020 17:05
[gulpjs list tasks] #gulp #gulpjs #node #nodejs
node gulp.js --tasks
@kbbgl
kbbgl / nslookup.sh
Created May 7, 2020 17:05
[check hostname resolution] #it #network
nslookup HOSTNAME
@kbbgl
kbbgl / remcmd.ps1
Created May 7, 2020 17:07
[Windows | run remote commands] #windows #remote
# Enable remoting on server where RPC will run in
Enable-PSRemoting -Force
# Check if WinRM is running on remote server
Test-WsMan QUERY_NODE1_HOSTNAME
$username = "corp\myuser"
$password = ConvertTo-SecureString -String "mypswd" -AsPlainText -Force
$cred = [pscredential]::new($username,$password)
@kbbgl
kbbgl / loc.md
Last active May 7, 2020 17:08
[Erlang cookie location in Windows] #rabbitmq #windows

C:\Windows\system32\config\systemprofile\.erlang.cookie

If there are any authentication issues when running rabbitmqctl, copy cookie from above to %USERPROFILE%.

@kbbgl
kbbgl / sn.md
Created May 7, 2020 17:09
[Remove node from RabbitMQ cluster] #rabbitmq

rabbitmqctl forget_cluster_node $node

@kbbgl
kbbgl / qsconsumers.md
Created May 7, 2020 17:10
[List RabbitMQ queues and consumers]

rabbitmqctl list_queues name consumers

@kbbgl
kbbgl / net.md
Last active May 7, 2020 21:37
[linux network commands] #linux #pentest #network

List the network interfaces

ifconfig

List the wireless interfaces

iwconfig
@kbbgl
kbbgl / noconsumers.sh
Last active May 8, 2020 09:01
[find queues with 0 consumers] #rabbitmq #grep #bash
grep -E '[[:space:]]0' queue_statusQ*
@kbbgl
kbbgl / pingOnce.sh
Created May 10, 2020 17:54
[ping only once] #network #bash #hacking
#!/bin/bash
# Ping only once
ping 10.10.10.0 -c 1
@kbbgl
kbbgl / inline.sh
Last active May 10, 2020 18:12
[inline for look in bash] #bash
#!/bin/bash
# If iplist.txt contains a list of IPs in each line:
# 192.168.1.1
# 192.168.1.2
# ...
# & runs each ping in different thread
for ip in $(cat iplist.txt): do ping $ip & done