Skip to content

Instantly share code, notes, and snippets.

Grab the main page with all the links:
curl https://slackmojis.com/ > emoji

Open file in vim and run the following commands:

v/src=/d
%s/^.*https:/https:/g"
%s/?.*$//g

Keybase proof

I hereby claim:

  • I am bndabbs on github.
  • I am bndabbs (https://keybase.io/bndabbs) on keybase.
  • I have a public key ASCCB-pWJPHNj6uACXlEechVxQDr45ajl_6Hq7jsY4CXfAo

To claim this, I am signing this object:

event bro_init()
{
for (stream in Log::active_streams)
{
local filter = Log::get_filter(stream, "default");
filter$path = fmt("bro_%s", filter$path);
Log::add_filter(stream, filter);
}
}
@bndabbs
bndabbs / equipment.md
Last active August 4, 2017 13:33
ROCK Hardware
@bndabbs
bndabbs / Ansible Primer.md
Last active October 9, 2017 18:41
Ansible Tips

If all of these files are in the same directory, you can run the following steps to deploy

Download the roles

ansible-galaxy install -r requirements.yml

Run the deploy playbook

ansible-playbook deploy.yml
input {
kafka {
topics => ["bro-raw"]
add_field => { "[@metadata][stage]" => "broraw_kafka" }
# Set this to one per kafka partition to scale up
#consumer_threads => 4
group_id => "bro_logstash"
bootstrap_servers =>
codec => json
auto_offset_reset => "earliest"
@bndabbs
bndabbs / create_users.ps1
Created March 20, 2018 21:42
Bulk Load AD Users
Import-Module ActiveDirectory
$password = (Read-Host -AsSecureString "AccountPassword")
$users = import-csv ".\users.csv"
foreach ($user in $users){
New-ADUser `
-SamAccountName ($user.GivenName + "." + $user.Surname).ToLower() `
-UserPrincipalName (($user.GivenName + "." + $user.Surname).ToLower() + "@" + $env:USERDNSDOMAIN) `
-DisplayName ($user.GivenName + " " + $user.Surname) `
@bndabbs
bndabbs / bro-diag.json
Last active August 19, 2018 21:49
Bro ES Index Templates
{
"order": 10,
"index_patterns": [
"bro-diag-*"
],
"mappings": {
"_doc": {
"properties": {
"acks": {
"type": "long"
@bndabbs
bndabbs / Cisco
Last active February 21, 2019 13:42
Grok Patterns
#ASA-1-113039
%{CISCO_TAGGED_SYSLOG} Group <%{DATA:group.name}> User <%{USER:user.name}> IP <%{IP:source.ip}> %{GREEDYDATA:cisco_message}
@bndabbs
bndabbs / pcap-ng_to_libpcap.md
Last active March 7, 2019 00:34
pcap-ng to libpcap

I recently ran into an issue while replaying some network traffic that was captured as pcap-ng and I wanted to share what I had to do to get things working.

The issue is that the packet capture contained traffic from two NICs, which is supported by pcap-ng, but not pcap. The commands here filter by interface and then convert the individual interface captures into regular pcap.