Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
## | |
## utserver.conf | |
## Configuration settings template for μTorrent for Linux. | |
## Taken from μTorrent Server manual for version alpha-3.3. | |
## ©2013 BitTorrent, Inc. | |
## Compiled by Rich.T. | |
## | |
## | |
## Command-line Arguments |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
function genStringPatterns() { | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
<NotepadPlus> | |
<UserLang name="Markdown" ext="md markdown" udlVersion="2.0"> | |
<!-- Modified by Edditoria, originally created by thomsmits @ git, | |
see https://github.com/Edditoria/markdown_npp_zenburn for latest version --> | |
<Settings> | |
<Global caseIgnored="yes" forceLineCommentsAtBOL="yes" /> | |
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments" id="0">00# 01 02 03<!-- 04--></Keywords> |
curl -fsSL https://get.docker.com/ | sh && \ | |
service docker start && \ | |
curl -L https://github.com/docker/compose/releases/download/1.6.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \ | |
chmod +x /usr/local/bin/docker-compose |
def lambda_handler(event, context): | |
import requests, json | |
r = requests.get('http://www.omdbapi.com/?t=titanic&y=1997&plot=short&r=json') | |
mediaMetadata = r.json() | |
print json.dumps( mediaMetadata, indent=4, sort_keys=True ) | |
return {json.dumps( mediaMetadata, indent=4, sort_keys=True )} |
yum install deltarpm wget unzip python-pip -y | |
cd /tmp | |
wget https://github.com/miztiik/Learn-Chef/blob/master/init/init.zip?raw=true -O init.zip | |
mv init.zip / | |
cd / | |
unzip init.zip | |
cd /chef-repo | |
# curl -L https://www.opscode.com/chef/install.sh | bash | |
curl -L https://www.opscode.com/chef/install.sh | bash -s -v 12.13.30 && rm install.sh | |
service chef-client restart |
CREATE DATABASE moovydb; | |
USE moovydb; | |
GRANT ALL ON moovydb.* TO moovydbuser@localhost IDENTIFIED BY 'YOUR_COMPLICATED_DIFFICULT_TO_REMEMBER_PASSWORD_GOES_HERE'; | |
CREATE TABLE IF NOT EXISTS moviestable ( | |
year int(4) NOT NULL, | |
month varchar(3) NOT NULL, | |
day int(2) NOT NULL, | |
movietitle varchar(250) DEFAULT NULL, |
#!/bin/bash | |
#set -x | |
scriptName="$(basename $0)" | |
scriptUSAGE="$scriptName <johndoe@example.com>" | |
if [[ $# -eq 0 ]]; then | |
echo "No arguments supplied" | |
echo $scriptUSAGE |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
# cURL | |
```sh | |
curl -o destination FILE://source | |
``` | |
# rsync | |
```sh | |
rsync -ah --progress source-file destination | |
``` |