Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
#!/bin/bash
# The script assumes that the passwords are stored in a file called 'dict'
# Note that after gpg executes you can check the result using the return code variable $?
cat words1.txt | while read PASS; do
# --batch Represents input using the command line
res=$(gpg --batch --passphrase $PASS -d secret.txt.gpg 2>/dev/null)
if [ 0 -eq $? ] # if the return value is 0, then no error
then
echo YAY found secet! $res
exit
fi
done
# Hello World Program in Bash Shell
a=10
b=20
c=30
if [ $a -gt $b ]
then
if [ $a -gt $c ]
then
echo "$a is maximum"
else
echo "$c is maximum"
fi
else
if [ $b -gt $c ]
then
echo "$b is maximum"
else
echo "$c is maximum"
fi
fi
def get_parser():
parser = argparse.ArgumentParser(description='scanless, public port scan scrapper')
parser.add_argument('-v', '--version', help='display the current version',
action='store_true')
parser.add_argument('-t', '--target', help='ip or domain to scan',
type=str)
parser.add_argument('-s', '--scanner', help='scanner to use (default: hackertarget)',
type=str, default='hackertarget')
parser.add_argument('-r', '--random', help='use a random scanner',
action='store_true')
parser.add_argument('-l', '--list', help='list scanners',
action='store_true')
parser.add_argument('-a', '--all', help='use all the scanners',
action='store_true')
return parser
# Hello World Program in Bash Shell
echo "Hello World!"
date
cal
free
df
free
ls
mkdir Sandy
ls
cd
pwd
cd Sandy
mkdir Folder_One
cd
pwd
mkdir MarleySucks
ls
mkdir Playground
ls
cd Playground
ls
mkdir dir1
# Test of STDIN input conversion
declare -a inputValues
function deleteEndLine {
local size=${#1}
let size-=1
local final=${1:0:$size}
echo "$final"
}
function readAllInputVariables {
read endInput
while [ "$endInput" != "ENDOFINPUT" ]
do
endInput="$(deleteEndLine $endInput)"
inputValues+=($endInput)
read endInput
done
}
function baseSum {
local basicSum=0
if [$1 -eq 1];
then
basicSum=1
echo "$basicSum"
else
local nextValue
let nextValue=$1-1
let basicSum=$1+"$(baseSum $nextValue)"
echo "$basicSum"
fi
}
readAllInputVariables
echo "ESTOY AQUIIIII"
finalSum="$(baseSum ${inputValues[0]})"
echo "$finalSum"