Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#!/bin/bash | |
SENDGRID_API_KEY="" | |
EMAIL_TO="" | |
FROM_EMAIL="" | |
FROM_NAME="" | |
SUBJECT="" | |
body="<p>Body of email</p>" | |
maildata='{"personalizations": [{"to": [{"email": "'${EMAIL_TO}'"}]}],"from": {"email": "'${FROM_EMAIL}'", "name": "'${FROM_NAME}'"},"subject": "'${SUBJECT}'","content": [{"type": "text/html", "value": "'${body}'"}]}' |
This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine.
This was tested on Solr version 5.4.1
and Zookeeper version 3.4.6
curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
mkdir /opt/solr
8.5. Session state at disconnection | |
----------------------------------- | |
TCP and HTTP logs provide a session termination indicator in the | |
"termination_state" field, just before the number of active connections. It is | |
2-characters long in TCP mode, and is extended to 4 characters in HTTP mode, | |
each of which has a special meaning : | |
- On the first character, a code reporting the first event which caused the | |
session to terminate : |
8.4. Timing events | |
------------------ | |
Timers provide a great help in troubleshooting network problems. All values are | |
reported in milliseconds (ms). These timers should be used in conjunction with | |
the session termination flags. In TCP mode with "option tcplog" set on the | |
frontend, 3 control points are reported under the form "Tw/Tc/Tt", and in HTTP | |
mode, 5 control points are reported under the form "Tq/Tw/Tc/Tr/Tt" : | |
- Tq: total time to get the client request (HTTP mode only). It's the time |
8.2.3. HTTP log format | |
---------------------- | |
The HTTP format is the most complete and the best suited for HTTP proxies. It | |
is enabled by when "option httplog" is specified in the frontend. It provides | |
the same level of information as the TCP format with additional features which | |
are specific to the HTTP protocol. Just like the TCP format, the log is usually | |
emitted at the end of the session, unless "option logasap" is specified, which | |
generally only makes sense for download sites. A session which matches the | |
"monitor" rules will never logged. It is also possible not to log sessions for |
#!/bin/bash | |
# Version: 1.1 | |
YELLOW='\033[1;33m' | |
RESET='\033[0m' | |
VULNERABLE_VERSIONS_SPECIAL_DROWN=( | |
# RHEL4 | |
"openssl-0.9.7a-43.1" | |
"openssl-0.9.7a-43.2" |
import threading | |
from queue import Queue | |
import time | |
print_lock = threading.Lock() | |
def exampleJob(worker): | |
time.sleep(.5) # pretend to do some work. | |
with print_lock: | |
print(threading.current_thread().name,worker) |
import os, re, threading | |
class ip_check(threading.Thread): | |
def __init__ (self,ip): | |
threading.Thread.__init__(self) | |
self.ip = ip | |
self.__successful_pings = -1 | |
def run(self): | |
ping_out = os.popen("ping -q -c2 "+self.ip,"r") | |
while True: |
# Inefficient code | |
# n = raw_input("Please enter 'hello':") | |
# while n.strip() != 'hello': | |
# n = raw_input("Please enter 'hello':") | |
while True: | |
n = raw_input("Please enter 'hello':") | |
if n.strip() == 'hello': | |
break |