- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
#!/usr/bin/env sh | |
# first check to see if mongo service is running. you can't delete any files until the service stops so perform a quick check. | |
launchctl list | grep mongo | |
# NOTE: the pipe | symbol means the commands on the right performs on the output from the left | |
# grep is a string search utility. `grep mongo` means search for the substring mongo | |
# use the unload command to end the mongo service. this is required to 'unlock' before removing the service. | |
# first look for the file to delete | |
MONGO_SERVICE_FILE=$(ls ~/Library/LaunchAgents/*mongodb*) |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
# Copyright (c) 2018 Bao Nguyen <b@nqbao.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all |
# Use this script to test that your Telegram bot works. | |
# | |
# Install the dependency | |
# | |
# $ gem install telegram_bot | |
# | |
# Run the bot | |
# | |
# $ ruby bot.rb | |
# |
get yq 3.x from https://github.com/mikefarah/yq/releases
get jsonnet (Go) from
go get github.com/google/go-jsonnet/cmd/jsonnet
go install github.com/google/go-jsonnet/cmd/jsonnet
# This creates a VPC with two public subnets and two private subnets in two Availability Zones, | |
# together with a NAT Gateway and associated routing. Change the Availability Zone locations as needed. | |
# Important: this configures various AWS services and there are costs associated with these services after the Free Tier usage. | |
# Please see the AWS Pricing pages for details. You are responsible for any AWS costs incurred. | |
# No warranty is implied in this example. | |
# Usage from command line: | |
# aws cloudformation --region <<YOUR-REGION>> create-stack --stack-name vpc- --template-body file://vpc-setup.yaml | |
I couldn't find instructions that were 100% complete, so I put this together.
These instructions worked fine for me. Follow each step carefully.
DO NOT create the VM by choosing Quick Create in Hyper-V Manager. Follow these instructions exactly.
You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228
This command searches for exploitation attempts in uncompressed files in folder /var/log
and all sub folders
sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log