This file contains 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
// v1.1.2 | |
var https = require('https'); | |
var zlib = require('zlib'); | |
var crypto = require('crypto'); | |
var endpoint = process.env.Custom; | |
const loggerConfig = { | |
url: process.env.SPLUNK_HEC_URL || 'https://<HOST>:<PORT>/services/collector', | |
token: process.env.SPLUNK_HEC_TOKEN || '<TOKEN>', |
This file contains 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
import boto3 | |
import json | |
import urllib, urllib2 | |
import os | |
from datetime import datetime | |
from dateutil import tz | |
import time | |
ecs = boto3.client('ecs') | |
sns = boto3.client('sns') |
This file contains 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
fname = raw_input("Enter file name: ") | |
if len(fname) < 1 : fname = "mbox-short.txt" | |
fh = open(fname) | |
count = 0 | |
for line in fh: | |
if line.startswith('From') and not line.startswith('From:'): | |
print line.split()[1] | |
count+= 1 |
This file contains 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
print ("Enter file name: ") | |
fname = gets.strip() | |
fname = "mbox-short.txt" if (fname.length < 1) | |
fh = open(fname) | |
count = 0 | |
fh.readlines.each do |line| | |
if line.start_with?('From') and not line.start_with?('From:') then | |
puts line.split()[1] |