This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Metadata": { | |
"AWS::CloudFormation::Designer": { | |
"d44d7b48-13cf-47fc-b755-39115ba78fff": { | |
"size": { | |
"width": 310, | |
"height": 300 | |
}, | |
"position": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"SubnetId": { | |
"Fn::FindInMap": [ | |
"Subnet", | |
"Environment", | |
{ | |
"Ref": "Environment" | |
}] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Mappings": { | |
"Subnet": { | |
"Environment": { | |
"Test": "subnet-2udye763", | |
"Prod": "subnet-jd83udjed" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Parameters": { | |
"EnvironmentParameter": { | |
"Type": "String", | |
"Default": "Prod", | |
"AllowedValues": [ | |
"Test", | |
"Prod" | |
], | |
"Description": "Enter the environment you are deploying your stack into" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SessionParser { | |
static void main(String[] args) { | |
def users = [:] | |
def records = new File(/vpn.txt/) // VPN log file | |
records.eachLine {record -> | |
if (record ==~ /.*Full_Tunnel.*/) { // Use this regex to catch lines you know will be interesting | |
def userMatcher = record =~ /userName/ // Write a regex to catch the username |
NewerOlder