Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 216.73.216.94
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
ModemManager
2.09
MB
-rwxr-xr-x
2023-12-20 05:35
NetworkManager
3.1
MB
-rwxr-xr-x
2022-06-09 09:27
a2disconf
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2dismod
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2dissite
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2enconf
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2enmod
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2ensite
15.89
KB
-rwxr-xr-x
2024-03-18 13:41
a2query
9.64
KB
-rwxr-xr-x
2025-04-03 09:05
aa-remove-unknown
3
KB
-rwxr-xr-x
2024-03-06 18:35
aa-status
62.62
KB
-rwxr-xr-x
2024-03-06 18:35
aa-teardown
137
B
-rwxr-xr-x
2022-02-10 00:45
accessdb
14.55
KB
-rwxr-xr-x
2022-03-17 19:03
add-shell
1.03
KB
-rwxr-xr-x
2022-03-23 13:49
addgnupghome
3
KB
-rwxr-xr-x
2025-03-28 17:39
addgroup
37.35
KB
-rwxr-xr-x
2021-01-06 06:16
adduser
37.35
KB
-rwxr-xr-x
2021-01-06 06:16
agetty
55.56
KB
-rwxr-xr-x
2024-04-09 15:32
apache2
740.89
KB
-rwxr-xr-x
2025-04-03 09:05
apache2ctl
7.06
KB
-rwxr-xr-x
2024-03-18 13:41
apachectl
7.06
KB
-rwxr-xr-x
2024-03-18 13:41
apparmor_parser
1.48
MB
-rwxr-xr-x
2024-03-06 18:35
apparmor_status
62.62
KB
-rwxr-xr-x
2024-03-06 18:35
applygnupgdefaults
2.17
KB
-rwxr-xr-x
2025-03-28 17:39
arp
61.61
KB
-rwxr-xr-x
2022-03-24 16:20
arpd
26.33
KB
-rwxr-xr-x
2022-03-24 11:56
arptables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
arptables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
badblocks
34.32
KB
-rwxr-xr-x
2023-10-09 01:50
bcache-super-show
14.3
KB
-rwxr-xr-x
2022-03-23 09:42
biosdecode
23.2
KB
-rwxr-xr-x
2022-08-23 23:52
blkdeactivate
15.97
KB
-rwxr-xr-x
2022-02-16 17:06
blkdiscard
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
blkid
50.41
KB
-rwxr-xr-x
2024-04-09 15:32
blkzone
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
blockdev
30.38
KB
-rwxr-xr-x
2024-04-09 15:32
bpftool
1.58
KB
-rwxr-xr-x
2025-04-11 20:45
bridge
92.49
KB
-rwxr-xr-x
2022-03-24 11:56
cache_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_metadata_size
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_repair
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
cache_writeback
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
capsh
30.3
KB
-rwxr-xr-x
2025-02-20 15:51
cfdisk
94.73
KB
-rwxr-xr-x
2024-04-09 15:32
cgdisk
150.48
KB
-rwxr-xr-x
2022-03-23 13:53
chat
34.31
KB
-rwxr-xr-x
2022-02-24 17:14
chcpu
30.38
KB
-rwxr-xr-x
2024-04-09 15:32
check_forensic
952
B
-rwxr-xr-x
2011-04-26 15:10
chgpasswd
58.13
KB
-rwxr-xr-x
2024-02-06 12:54
chmem
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
chpasswd
54.16
KB
-rwxr-xr-x
2024-02-06 12:54
chroot
38.51
KB
-rwxr-xr-x
2024-02-08 03:46
cpgr
48.29
KB
-rwxr-xr-x
2024-02-06 12:54
cppw
48.29
KB
-rwxr-xr-x
2024-02-06 12:54
cron
50.58
KB
-rwxr-xr-x
2022-03-23 13:49
cryptdisks_start
1.51
KB
-rwxr-xr-x
2022-01-13 21:44
cryptdisks_stop
844
B
-rwxr-xr-x
2022-01-13 21:44
cryptsetup
169.55
KB
-rwxr-xr-x
2023-08-22 17:16
cryptsetup-reencrypt
90.38
KB
-rwxr-xr-x
2023-08-22 17:16
cryptsetup-ssh
23.53
KB
-rwxr-xr-x
2023-08-22 17:16
ctrlaltdel
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
dbconfig-generate-include
12.36
KB
-rwxr-xr-x
2021-12-17 20:18
dbconfig-load-include
5.57
KB
-rwxr-xr-x
2021-12-17 20:18
dcb
80.52
KB
-rwxr-xr-x
2022-03-24 11:56
debugfs
229.8
KB
-rwxr-xr-x
2023-10-09 01:50
delgroup
16.11
KB
-rwxr-xr-x
2021-01-06 06:16
deluser
16.11
KB
-rwxr-xr-x
2021-01-06 06:16
depmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
devlink
142.86
KB
-rwxr-xr-x
2022-03-24 11:56
dhclient
442.66
KB
-rwxr-xr-x
2023-01-31 21:54
dhclient-script
15.92
KB
-rwxr-xr-x
2023-01-31 21:54
dmeventd
50.38
KB
-rwxr-xr-x
2022-02-16 17:06
dmidecode
118.98
KB
-rwxr-xr-x
2022-08-23 23:52
dmsetup
171.01
KB
-rwxr-xr-x
2022-02-16 17:06
dmstats
171.01
KB
-rwxr-xr-x
2022-02-16 17:06
dnsmasq
480.24
KB
-rwxr-xr-x
2024-02-14 19:23
dosfsck
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
dosfslabel
38.38
KB
-rwxr-xr-x
2022-03-23 13:51
dpkg-preconfigure
3.58
KB
-rwxr-xr-x
2022-02-20 14:42
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
2022-02-20 14:42
dumpe2fs
30.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2freefrag
14.3
KB
-rwxr-xr-x
2023-10-09 01:50
e2fsck
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
e2image
42.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2label
102.55
KB
-rwxr-xr-x
2023-10-09 01:50
e2mmpstatus
30.31
KB
-rwxr-xr-x
2023-10-09 01:50
e2scrub
7.13
KB
-rwxr-xr-x
2023-10-09 01:50
e2scrub_all
5.27
KB
-rwxr-xr-x
2023-10-09 01:50
e2undo
22.3
KB
-rwxr-xr-x
2023-10-09 01:50
e4crypt
30.38
KB
-rwxr-xr-x
2023-10-09 01:50
e4defrag
30.3
KB
-rwxr-xr-x
2023-10-09 01:50
ebtables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ebtables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
era_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_invalidate
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
era_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
ethtool
551.48
KB
-rwxr-xr-x
2023-12-12 20:52
faillock
14.15
KB
-rwxr-xr-x
2024-01-10 13:54
fatlabel
38.38
KB
-rwxr-xr-x
2022-03-23 13:51
fdisk
110.42
KB
-rwxr-xr-x
2024-04-09 15:32
filefrag
18.32
KB
-rwxr-xr-x
2023-10-09 01:50
findfs
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
fixparts
58.48
KB
-rwxr-xr-x
2022-03-23 13:53
fsadm
23.94
KB
-rwxr-xr-x
2022-02-16 17:06
fsck
42.42
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.btrfs
1.16
KB
-rwxr-xr-x
2022-02-24 17:39
fsck.cramfs
30.44
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.ext2
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.ext3
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.ext4
351.84
KB
-rwxr-xr-x
2023-10-09 01:50
fsck.fat
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.minix
54.41
KB
-rwxr-xr-x
2024-04-09 15:32
fsck.msdos
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.vfat
82.38
KB
-rwxr-xr-x
2022-03-23 13:51
fsck.xfs
1.92
KB
-rwxr-xr-x
2022-02-09 04:42
fsfreeze
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
fstab-decode
18.3
KB
-rwxr-xr-x
2021-12-14 21:17
fstrim
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
gdisk
174.48
KB
-rwxr-xr-x
2022-03-23 13:53
genl
90.44
KB
-rwxr-xr-x
2022-03-24 11:56
getcap
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
getpcaps
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
getty
55.56
KB
-rwxr-xr-x
2024-04-09 15:32
groupadd
66.91
KB
-rwxr-xr-x
2024-02-06 12:54
groupdel
62.73
KB
-rwxr-xr-x
2024-02-06 12:54
groupmems
54.19
KB
-rwxr-xr-x
2024-02-06 12:54
groupmod
66.82
KB
-rwxr-xr-x
2024-02-06 12:54
grpck
58.13
KB
-rwxr-xr-x
2024-02-06 12:54
grpconv
50.01
KB
-rwxr-xr-x
2024-02-06 12:54
grpunconv
50.01
KB
-rwxr-xr-x
2024-02-06 12:54
grub-install
1.15
MB
-rwxr-xr-x
2022-12-18 21:21
grub-macbless
929.11
KB
-rwxr-xr-x
2022-12-18 21:21
grub-mkconfig
8.6
KB
-rwxr-xr-x
2022-12-18 21:21
grub-mkdevicemap
215.7
KB
-rwxr-xr-x
2022-12-18 21:21
grub-probe
941.36
KB
-rwxr-xr-x
2022-12-18 21:21
grub-reboot
4.73
KB
-rwxr-xr-x
2022-12-18 21:21
grub-set-default
3.47
KB
-rwxr-xr-x
2022-12-18 21:21
halt
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
hdparm
139.43
KB
-rwxr-xr-x
2022-03-23 13:57
httxt2dbm
14.3
KB
-rwxr-xr-x
2025-04-03 09:05
hwclock
50.5
KB
-rwxr-xr-x
2024-04-09 15:32
iconvconfig
30.4
KB
-rwxr-xr-x
2025-01-28 20:25
ifconfig
77.17
KB
-rwxr-xr-x
2022-03-24 16:20
init
1.76
MB
-rwxr-xr-x
2023-11-21 20:57
insmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
installkernel
2.6
KB
-rwxr-xr-x
2022-03-23 13:49
integritysetup
54.07
KB
-rwxr-xr-x
2023-08-22 17:16
invoke-rc.d
16.12
KB
-rwxr-xr-x
2021-12-07 21:55
ip
702.05
KB
-rwxr-xr-x
2022-03-24 11:56
ip6tables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-apply
6.89
KB
-rwxr-xr-x
2021-01-15 22:03
ip6tables-legacy
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-legacy-restore
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-legacy-save
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-restore-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ip6tables-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
ipmaddr
18.3
KB
-rwxr-xr-x
2022-03-24 16:20
iptables
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-apply
6.89
KB
-rwxr-xr-x
2021-01-15 22:03
iptables-legacy
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-legacy-restore
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-legacy-save
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-nft-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-restore
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-restore-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-save
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptables-translate
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
iptunnel
18.3
KB
-rwxr-xr-x
2022-03-24 16:20
irqbalance
66.86
KB
-rwxr-xr-x
2023-10-16 09:22
irqbalance-ui
34.38
KB
-rwxr-xr-x
2023-10-16 09:22
iscsi-iname
14.3
KB
-rwxr-xr-x
2022-01-19 11:38
iscsi_discovery
5.17
KB
-rwxr-xr-x
2021-09-05 23:32
iscsiadm
398.46
KB
-rwxr-xr-x
2022-01-19 11:38
iscsid
298.55
KB
-rwxr-xr-x
2022-01-19 11:38
iscsistart
274.56
KB
-rwxr-xr-x
2022-01-19 11:38
isosize
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
iucode-tool
58.34
KB
-rwxr-xr-x
2021-10-07 10:13
iucode_tool
58.34
KB
-rwxr-xr-x
2021-10-07 10:13
kbdrate
18.16
KB
-rwxr-xr-x
2022-12-16 14:14
killall5
30.38
KB
-rwxr-xr-x
2021-12-14 21:17
kpartx
46.16
KB
-rwxr-xr-x
2023-10-31 22:21
ldattach
26.38
KB
-rwxr-xr-x
2024-04-09 15:32
ldconfig
387
B
-rwxr-xr-x
2025-01-28 20:25
ldconfig.real
1.16
MB
-rwxr-xr-x
2025-01-28 20:25
locale-gen
4.29
KB
-rwxr-xr-x
2023-07-26 08:23
logrotate
102.24
KB
-rwxr-xr-x
2022-05-25 14:10
logsave
14.16
KB
-rwxr-xr-x
2023-10-09 01:50
losetup
70.52
KB
-rwxr-xr-x
2024-04-09 15:32
lsmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
luksformat
3.32
KB
-rwxr-xr-x
2022-01-13 21:44
lvchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvconvert
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvextend
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvm
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmconfig
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmdiskscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmdump
10.07
KB
-rwxr-xr-x
2022-02-16 17:06
lvmpolld
236.34
KB
-rwxr-xr-x
2022-02-16 17:06
lvmsadc
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvmsar
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvreduce
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvrename
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvresize
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
lvscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
make-bcache
22.38
KB
-rwxr-xr-x
2022-03-23 09:42
make-ssl-cert
6.65
KB
-rwxr-xr-x
2021-12-30 16:52
mdadm
601.31
KB
-rwxr-xr-x
2023-04-11 03:22
mdmon
258.44
KB
-rwxr-xr-x
2023-04-11 03:22
mii-tool
26.73
KB
-rwxr-xr-x
2022-03-24 16:20
mkdosfs
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mke2fs
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.bfs
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.btrfs
471.25
KB
-rwxr-xr-x
2022-02-24 17:39
mkfs.cramfs
34.32
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.ext2
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.ext3
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.ext4
130.62
KB
-rwxr-xr-x
2023-10-09 01:50
mkfs.fat
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.minix
42.39
KB
-rwxr-xr-x
2024-04-09 15:32
mkfs.msdos
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.ntfs
70.38
KB
-rwxr-xr-x
2022-11-01 11:56
mkfs.vfat
50.83
KB
-rwxr-xr-x
2022-03-23 13:51
mkfs.xfs
382.77
KB
-rwxr-xr-x
2022-02-09 04:42
mkhomedir_helper
22.17
KB
-rwxr-xr-x
2024-01-10 13:54
mkinitramfs
12.16
KB
-rwxr-xr-x
2023-07-25 09:54
mklost+found
14.3
KB
-rwxr-xr-x
2023-10-09 01:50
mkntfs
70.38
KB
-rwxr-xr-x
2022-11-01 11:56
mkswap
46.38
KB
-rwxr-xr-x
2024-04-09 15:32
modinfo
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
modprobe
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
mount.fuse
18.3
KB
-rwxr-xr-x
2022-03-23 13:53
mount.fuse3
18.3
KB
-rwxr-xr-x
2022-03-23 13:53
mount.lowntfs-3g
114.98
KB
-rwxr-xr-x
2022-11-01 11:56
mount.ntfs
159.01
KB
-rwxr-xr-x
2022-11-01 11:56
mount.ntfs-3g
159.01
KB
-rwxr-xr-x
2022-11-01 11:56
mpathpersist
31.05
KB
-rwxr-xr-x
2023-10-31 22:21
multipath
34.15
KB
-rwxr-xr-x
2023-10-31 22:21
multipathd
134.26
KB
-rwxr-xr-x
2023-10-31 22:21
mysqld
52.92
MB
-rwxr-xr-x
2025-04-25 17:19
nameif
14.48
KB
-rwxr-xr-x
2022-03-24 16:20
needrestart
38.71
KB
-rwxr-xr-x
2024-12-05 11:58
netplan
798
B
-rwxr-xr-x
2023-05-17 17:11
newusers
74.73
KB
-rwxr-xr-x
2024-02-06 12:54
nfnl_osf
18.3
KB
-rwxr-xr-x
2024-01-16 21:14
nft
26.23
KB
-rwxr-xr-x
2022-08-10 05:36
nologin
14.3
KB
-rwxr-xr-x
2024-02-06 12:54
ntfsclone
50.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfscp
34.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfslabel
22.38
KB
-rwxr-xr-x
2022-11-01 11:56
ntfsresize
62.39
KB
-rwxr-xr-x
2022-11-01 11:56
ntfsundelete
50.38
KB
-rwxr-xr-x
2022-11-01 11:56
on_ac_power
2.18
KB
-rwxr-xr-x
2019-07-20 15:43
overlayroot-chroot
2.45
KB
-rwxr-xr-x
2020-08-17 16:00
ownership
14.45
KB
-rwxr-xr-x
2022-08-23 23:52
pam-auth-update
20.5
KB
-rwxr-xr-x
2022-02-07 16:47
pam_extrausers_chkpwd
22.15
KB
-rwxr-sr-x
2024-01-10 13:54
pam_extrausers_update
30.15
KB
-rwxr-xr-x
2024-01-10 13:54
pam_getenv
2.82
KB
-rwxr-xr-x
2020-08-12 00:15
pam_timestamp_check
14.15
KB
-rwxr-xr-x
2024-01-10 13:54
parted
86.4
KB
-rwxr-xr-x
2022-03-24 16:22
partprobe
14.38
KB
-rwxr-xr-x
2022-03-24 16:22
pdata_tools
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
phpdismod
7.11
KB
-rwxr-xr-x
2022-01-28 00:27
phpenmod
7.11
KB
-rwxr-xr-x
2022-01-28 00:27
phpquery
6.24
KB
-rwxr-xr-x
2022-01-28 00:27
pivot_root
14.38
KB
-rwxr-xr-x
2024-04-09 15:32
plipconfig
14.3
KB
-rwxr-xr-x
2022-03-24 16:20
plymouthd
150.55
KB
-rwxr-xr-x
2022-03-18 10:45
poweroff
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
pppd
414.56
KB
-rwsr-xr--
2022-02-24 17:14
pppdump
18.39
KB
-rwxr-xr-x
2022-02-24 17:14
pppoe-discovery
22.3
KB
-rwxr-xr-x
2022-02-24 17:14
pppstats
18.3
KB
-rwxr-xr-x
2022-02-24 17:14
pptp
63.05
KB
-rwxr-xr-x
2022-03-24 16:23
pptpsetup
6.46
KB
-rwxr-xr-x
2022-03-24 16:23
pvchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvck
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvmove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvresize
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pvscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
pwck
50.13
KB
-rwxr-xr-x
2024-02-06 12:54
pwconv
46.01
KB
-rwxr-xr-x
2024-02-06 12:54
pwunconv
42.01
KB
-rwxr-xr-x
2024-02-06 12:54
rarp
32.33
KB
-rwxr-xr-x
2022-03-24 16:20
readprofile
22.41
KB
-rwxr-xr-x
2024-04-09 15:32
reboot
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
remove-shell
1.07
KB
-rwxr-xr-x
2022-03-23 13:49
resize2fs
66.3
KB
-rwxr-xr-x
2023-10-09 01:50
rmmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
rmt
58.57
KB
-rwxr-xr-x
2023-12-05 05:15
rmt-tar
58.57
KB
-rwxr-xr-x
2023-12-05 05:15
route
64.27
KB
-rwxr-xr-x
2022-03-24 16:20
rsyslogd
767.19
KB
-rwxr-xr-x
2022-05-02 18:45
rtacct
28.31
KB
-rwxr-xr-x
2022-03-24 11:56
rtcwake
34.38
KB
-rwxr-xr-x
2024-04-09 15:32
rtmon
90.39
KB
-rwxr-xr-x
2022-03-24 11:56
runlevel
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
runuser
54.38
KB
-rwxr-xr-x
2024-04-09 15:32
service
8.88
KB
-rwxr-xr-x
2022-02-15 22:32
setcap
14.3
KB
-rwxr-xr-x
2025-02-20 15:51
setvesablank
14.23
KB
-rwxr-xr-x
2022-12-16 14:14
setvtrgb
14.29
KB
-rwxr-xr-x
2022-12-16 14:14
sfdisk
102.38
KB
-rwxr-xr-x
2024-04-09 15:32
sgdisk
162.48
KB
-rwxr-xr-x
2022-03-23 13:53
shadowconfig
885
B
-rwxr-xr-x
2021-11-11 15:42
shutdown
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
slattach
36.08
KB
-rwxr-xr-x
2022-03-24 16:20
split-logfile
2.36
KB
-rwxr-xr-x
2025-04-03 09:05
sshd
899.7
KB
-rwxr-xr-x
2025-04-11 12:05
start-stop-daemon
47.35
KB
-rwxr-xr-x
2024-02-23 14:53
sudo_logsrvd
200.1
KB
-rwxr-xr-x
2023-04-03 18:00
sudo_sendlog
107.34
KB
-rwxr-xr-x
2023-04-03 18:00
sulogin
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
swaplabel
18.38
KB
-rwxr-xr-x
2024-04-09 15:32
swapoff
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
swapon
42.38
KB
-rwxr-xr-x
2024-04-09 15:32
switch_root
22.38
KB
-rwxr-xr-x
2024-04-09 15:32
sysctl
30.23
KB
-rwxr-xr-x
2023-10-31 11:36
tarcat
936
B
-rwxr-xr-x
2023-12-05 05:15
tc
614.08
KB
-rwxr-xr-x
2022-03-24 11:56
telinit
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
thermald
554.6
KB
-rwxr-xr-x
2023-08-10 07:36
thin_check
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_delta
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_dump
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_ls
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_metadata_size
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_repair
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_restore
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_rmap
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
thin_trim
1.33
MB
-rwxr-xr-x
2022-03-18 12:36
tipc
90.44
KB
-rwxr-xr-x
2022-03-24 11:56
tune2fs
102.55
KB
-rwxr-xr-x
2023-10-09 01:50
tzconfig
106
B
-rwxr-xr-x
2025-03-26 17:32
u-d-c-print-pci-ids
517
B
-rwxr-xr-x
2024-07-05 08:55
ufw
4.82
KB
-rwxr-xr-x
2023-07-17 13:55
umount.udisks2
14.3
KB
-rwxr-xr-x
2022-04-07 21:17
unix_chkpwd
26.15
KB
-rwxr-sr-x
2024-01-10 13:54
unix_update
30.15
KB
-rwxr-xr-x
2024-01-10 13:54
update-ca-certificates
5.29
KB
-rwxr-xr-x
2024-09-24 17:46
update-grub
64
B
-rwxr-xr-x
2022-12-02 15:18
update-grub2
64
B
-rwxr-xr-x
2022-12-02 15:18
update-info-dir
1.66
KB
-rwxr-xr-x
2022-02-06 12:48
update-initramfs
6.74
KB
-rwxr-xr-x
2023-07-25 09:54
update-locale
2.99
KB
-rwxr-xr-x
2023-06-16 10:22
update-mime
9.39
KB
-rwxr-xr-x
2021-12-10 23:14
update-passwd
34.56
KB
-rwxr-xr-x
2022-03-23 09:42
update-pciids
1.71
KB
-rwxr-xr-x
2021-08-30 02:45
update-rc.d
16.92
KB
-rwxr-xr-x
2021-12-07 21:55
update-secureboot-policy
7.43
KB
-rwxr-xr-x
2024-01-24 09:14
update-shells
3.72
KB
-rwxr-xr-x
2022-03-23 13:49
usb_modeswitch
59.66
KB
-rwxr-xr-x
2022-03-25 09:53
usb_modeswitch_dispatcher
26.78
KB
-rwxr-xr-x
2022-03-25 09:53
usbmuxd
86.6
KB
-rwxr-xr-x
2022-03-25 09:53
useradd
127.66
KB
-rwxr-xr-x
2024-02-06 12:54
userdel
86.85
KB
-rwxr-xr-x
2024-02-06 12:54
usermod
123.46
KB
-rwxr-xr-x
2024-02-06 12:54
uuidd
30.85
KB
-rwxr-xr-x
2024-04-09 15:32
validlocale
1.73
KB
-rwxr-xr-x
2022-08-02 15:34
vcstime
14.15
KB
-rwxr-xr-x
2022-12-16 14:14
vdpa
30.56
KB
-rwxr-xr-x
2022-03-24 11:56
veritysetup
43.76
KB
-rwxr-xr-x
2023-08-22 17:16
vgcfgbackup
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgcfgrestore
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgchange
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgck
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgconvert
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgcreate
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgdisplay
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgexport
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgextend
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgimport
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgimportclone
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgmerge
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgmknodes
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgreduce
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgremove
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgrename
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgs
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgscan
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vgsplit
2.89
MB
-rwxr-xr-x
2022-02-16 17:06
vigr
56.53
KB
-rwxr-xr-x
2024-02-06 12:54
vipw
56.53
KB
-rwxr-xr-x
2024-02-06 12:54
visudo
219.79
KB
-rwxr-xr-x
2023-04-03 18:00
vpddecode
14.58
KB
-rwxr-xr-x
2022-08-23 23:52
vsftpd
156.48
KB
-rwxr-xr-x
2024-07-16 07:52
wipefs
38.38
KB
-rwxr-xr-x
2024-04-09 15:32
wpa_action
1.69
KB
-rwxr-xr-x
2022-04-04 13:04
wpa_cli
140.31
KB
-rwxr-xr-x
2025-02-24 19:39
wpa_supplicant
3.24
MB
-rwxr-xr-x
2025-02-24 19:39
xfs_admin
1.37
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_bmap
695
B
-rwxr-xr-x
2022-02-09 04:42
xfs_copy
82.47
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_db
652.42
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_estimate
14.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_freeze
800
B
-rwxr-xr-x
2022-02-09 04:42
xfs_fsr
42.17
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_growfs
38.27
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_info
1.26
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_io
199.55
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_logprint
78.32
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_mdrestore
26.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_metadump
782
B
-rwxr-xr-x
2022-02-09 04:42
xfs_mkfile
1.02
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_ncheck
685
B
-rwxr-xr-x
2022-02-09 04:42
xfs_quota
90.16
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_repair
599.37
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_rtcp
18.14
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_scrub
106.25
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_scrub_all
5.87
KB
-rwxr-xr-x
2022-02-09 04:42
xfs_spaceman
42.29
KB
-rwxr-xr-x
2022-02-09 04:42
xtables-legacy-multi
96.95
KB
-rwxr-xr-x
2024-01-16 21:14
xtables-monitor
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
xtables-nft-multi
219.04
KB
-rwxr-xr-x
2024-01-16 21:14
zerofree
14.15
KB
-rwxr-xr-x
2022-03-25 09:54
zic
62.32
KB
-rwxr-xr-x
2025-01-28 20:25
zramctl
54.52
KB
-rwxr-xr-x
2024-04-09 15:32
Save
Rename
#!/usr/bin/tclsh # Wrapper (tcl) for usb_modeswitch, called from # /lib/udev/rules.d/40-usb_modeswitch.rules # (part of data pack "usb-modeswitch-data") via # /lib/udev/usb_modeswitch # # Does ID check on newly discovered USB devices and calls # the mode switching program with the matching parameter # file from /usr/share/usb_modeswitch # # Part of usb-modeswitch-2.6.1 package, 2020/07/10 # (C) Josua Dietze 2009 - 2020 # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details: # # http://www.gnu.org/licenses/gpl.txt set arg0 [lindex $argv 0] if [regexp {\.tcl$} $arg0] { if [file exists $arg0] { set argv [lrange $argv 1 end] source $arg0 exit } } # Setting of these switches is done in the global config # file (/etc/usb_modeswitch.conf) if available set flags(logging) 0 set flags(noswitching) 0 set flags(stordelay) 0 set flags(nombim) 0 set flags(logwrite) 0 # also settable in device config files set flags(nombim) 0 set flags(althuawei) 0 # Execution starts at file bottom proc {Main} {argv argc} { global scsi usb config match device flags setup devdir loginit set flags(config) "" # arg0: optional custom location of configuration file # arg1: the "kernel name" for the device to switch (udev: %k) # The parameter "bus id" for the device (udev: %b) is now deprecated # # From version 2.5.0 upward %b is removed by udev sh script # which can handle old and new udev params ('%b/%k' and '%k') Log "Raw parameters: $argv" set device "noname" set arg0 "" for {set i 0} {$i < [llength $argv]} {incr i} { set option [lindex $argv $i] switch -glob -- $option { "--config-file" { if [regexp {config-file=(\"[^\"]+\"|[^ ]+)} $option d param] { set arg0 [string trim $param {"}] } else { set arg0 [lindex $argv $i+1] } } "--switch-mode" { if [regexp {switch-mode=(.+)} $option d param] { set arg1 $param } else { set arg1 [lindex $argv $i+1] } } } } Log "[ParseGlobalConfig $arg0]" set flags(logwrite) 1 # The facility to add a symbolic link pointing to the # ttyUSB port which provides interrupt transfer, i.e. # the port to connect through. # Will check for interrupt endpoint in ttyUSB port (lowest if # there is more than one); if found, return "gsmmodem[n]" name # to udev for symlink creation # This is run once for every port of LISTED devices by # a udev rule if {[lindex $argv 0] == "--symlink-name"} { puts -nonewline [SymLinkName [lindex $argv 1]] SafeExit } if {$flags(stordelay) > 0} { SetStorageDelay $flags(stordelay) } if [info exists arg1] { if {[string length $arg1] == 0} { ShowUsage Log "\nNo device provided for mode-switching. Exit" SafeExit } } else { ShowUsage Log "\nNo command option given. Exit" SafeExit } if {![regexp {(.*?):.*$} $arg1 d device]} { if {![regexp {([0-9]+-[0-9]+\.?[0-9]*.*)} $arg1 d device]} { ShowUsage Log "Could not determine device dir from udev values! Exit" SafeExit } } set setup(dbdir) /usr/share/usb_modeswitch set setup(dbdir_etc) /etc/usb_modeswitch.d if {![file exists $setup(dbdir)] && ![file exists $setup(dbdir_etc)]} { Log "\nError: no config database found in /usr/share or /etc. Exit" SafeExit } set bindir /usr/sbin set devList1 {} set devList2 {} set ifChk 0 set devdir /sys/bus/usb/devices/$device if {![file isdirectory $devdir]} { Log "Top device directory not found ($devdir)! Exit" SafeExit } Log "Use top device dir $devdir" set iface 0 Log "Check class of first interface ..." set config(class) [IfClass 0 $devdir] if {$config(class) < 0} { Log " No access to first interface. Exit" SafeExit } Log " Interface class is $config(class)." set ifdir [file tail [IfDir $iface $devdir]] regexp {:([0-9]+\.[0-9]+)$} $ifdir d iface # Mapping of the short string identifiers (in the config # file names) to the long name used here # # If we need them it's a snap to add new attributes here! set match(sVe) scsi(vendor) set match(sMo) scsi(model) set match(sRe) scsi(rev) set match(uMa) usb(manufacturer) set match(uPr) usb(product) set match(uSe) usb(serial) # Now reading the USB attributes if {![ReadUSBAttrs $devdir]} { Log "USB attributes not found in sysfs tree. Exit" SafeExit } set config(vendor) $usb(idVendor) set config(product) $usb(idProduct) if $flags(logging) { Log "\n----------------\nUSB values from sysfs:" foreach attr {manufacturer product serial} { Log " $attr\t$usb($attr)" } Log "----------------" } if $flags(noswitching) { SysLog "usb_modeswitch: switching disabled, no action for $usb(idVendor):$usb(idProduct)" Log "\nSwitching globally disabled. Exit" SafeExit } if {$usb(bNumConfigurations) == "1"} { set configParam "-u -1" Log "bNumConfigurations is 1 - don't check for active configuration" } else { set configParam "" } # Check (and switch) for operating system if Huawei device present set flags(os) "linux" if {$usb(idVendor) == "12d1" && [regexp -nocase {android} [exec cat /proc/version]]} { set flags(os) "android" } if {$flags(os) == "android"} { set configList [ConfigGet conflist $usb(idVendor):#android] } else { set configList [ConfigGet conflist $usb(idVendor):$usb(idProduct)] } if {[llength $configList] == 0} { Log "Aargh! Config file missing for $usb(idVendor):$usb(idProduct)! Exit" SafeExit } Log "ConfigList: $configList" # Check if there is more than one config file for this USB ID, # which would make an attribute test necessary. If so, check if # SCSI values are needed set scsiNeeded 0 if {[llength $configList] > 1} { if [regexp {:s} $configList] { set scsiNeeded 1 } } if $scsiNeeded { if [ReadSCSIAttrs $devdir:$iface] { Log "----------------\nSCSI values from sysfs:" foreach attr {vendor model rev} { Log " $attr\t$scsi($attr)" } Log "----------------" } else { Log "Could not get SCSI attributes, exclude devices with SCSI match" } } else { Log "SCSI attributes not needed, move on" } # Now check for a matching config file. Matching is done # by MatchDevice set report "" foreach mconfig $configList { # skipping installer leftovers like "*.rpmnew" if [regexp {\.(dpkg|rpm)} $mconfig] {continue} Log "Check config: $mconfig" if [MatchDevice $mconfig] { Log "! matched. Read config data" set flags(config) [ConfigGet conffile $mconfig] break } else { Log "* no match, don't use this config" } } if {$flags(config) == ""} { Log "No matching config file found. Exit" SafeExit } ParseDeviceConfig $flags(config) if [regexp -nocase {0x([0-9a-f]+)} $config(TargetClass) d tc] { if {$tc == $config(class)} { Log "Class of interface 0 matches target. Do nothing" set report "ok:busdev" } } if [string length $usb(busnum)] { set busParam "-b [string trimleft $usb(busnum) 0]" set devParam "-g [string trimleft $usb(devnum) 0]" } else { set busParam "" set devParam "" } if [regexp -nocase $flags(os) $flags(config)] { Log "Note: Using generic manufacturer configuration for \"$flags(os)\"" } if $flags(althuawei) { regsub {HuaweiNewMode} $flags(config) {HuaweiAltMode} flags(config) Log "Alternative Huawei mode set globally, modify config" } if $flags(nombim) { set config(NoMBIMCheck) 1 } if {$config(NoMBIMCheck)==0 && $usb(bNumConfigurations) > 1} { Log "Device may have an MBIM configuration, check driver ..." if [CheckMBIM] { Log " driver for MBIM devices is available" Log "Find MBIM configuration number ..." if [catch {set cfgno [exec /usr/sbin/usb_modeswitch -j -Q $busParam $devParam -v $usb(idVendor) -p $usb(idProduct)]} err] { Log "Error when trying to find MBIM configuration, switch to legacy modem mode" } else { set cfgno [string trim $cfgno] if {$cfgno > 0} { set config(Configuration) $cfgno set flags(config) "Configuration=$cfgno" } else { Log " No MBIM configuration found, switch to legacy modem mode" } } } else { Log " no MBIM driver found, switch to legacy modem mode" } } if [PantechAutoSwitch] { Log "Waiting for Pantech auto-modeswitch" set report "ok:busdev" } if {$config(Configuration) == 0} { Log "Config file contains dummy method, do nothing. Exit" SafeExit } # General wait - some devices need this after 500 if {$config(WaitBefore) != ""} { Log "Delay time of $config(WaitBefore) seconds" append config(WaitBefore) "000" after $config(WaitBefore) } if {$report == ""} { # Now we are actually switching if $flags(logging) { Log "Command line:\nusb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f \$flags(config)" catch {set report [exec /usr/sbin/usb_modeswitch -W -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report Log "\nVerbose debug output of usb_modeswitch and libusb follows" Log "(Note that some USB errors are to be expected in the process)" Log "--------------------------------" Log $report Log "--------------------------------" Log "(end of usb_modeswitch output)\n" } else { catch {set report [exec /usr/sbin/usb_modeswitch -Q -D $configParam $busParam $devParam -v $usb(idVendor) -p $usb(idProduct) -f "$flags(config)" 2>@1]} report } } # Switching is complete; success checking was either # done by usb_modeswitch and logged via syslog OR bus/dev # parameter were used; then we do check for success HERE if {$config(Configuration) != ""} { set ifdir [regsub {(\d):\d+\.0} $ifdir "\\1:$config(Configuration).0"] } if [regexp {ok:busdev} $report] { if [CheckSuccess $devdir] { Log "Mode switching was successful, found $usb(idVendor):$usb(idProduct) ($usb(manufacturer): $usb(product))" SysLog "usb_modeswitch: switched to $usb(idVendor):$usb(idProduct) on [format %03d $usb(busnum)]/[format %03d $usb(devnum)]" } else { Log "\nTarget config not matching - current values are" LogAttributes Log "\nMode switching may have failed. Exit" SafeExit } } else { if {![file isdirectory $devdir]} { Log "Device directory in sysfs is gone! Something went wrong, abort" SafeExit } if {![regexp {ok:} $report]} { Log "\nCore program reported switching failure. Exit" SafeExit } # Give the device another second if it's not fully back yet if {![file exists $devdir/idProduct]} { after 1000 } ReadUSBAttrs $devdir $ifdir } # driver binding removed !! if {[string length "$usb(idVendor)$usb(idProduct)"] < 8} { if {![regexp {ok:(\w{4}):(\w{4})} $report d usb(idVendor) usb(idProduct)]} { Log "No target vendor/product ID found or given, can't continue. Abort" SafeExit } } # wait for drivers to bind after 500 if {[llength [glob -nocomplain $devdir/$ifdir/ttyUSB*]] > 0} { Log "Serial USB driver bound to interface 0\n will try to guess and symlink modem port on next connect" AddToList link_list $usb(idVendor):$usb(idProduct) } # In newer kernels there is a switch to avoid the use of a device # reset (e.g. from usb-storage) which would possibly switch back # a mode-switching device to initial mode if [regexp {ok:} $report] { Log "Check for AVOID_RESET_QUIRK kernel attribute" if [file exists $devdir/avoid_reset_quirk] { if [catch {exec echo "1" >$devdir/avoid_reset_quirk 2>/dev/null} err] { Log " Error setting the attribute: $err" } else { Log " AVOID_RESET_QUIRK activated" } } else { Log " not present in this kernel" } } Log "\nAll done, exit\n" SafeExit } # end of proc {Main} proc {ReadSCSIAttrs} {topdir} { global scsi set counter 0 set sysdir $topdir Log "Check storage tree in sysfs ..." while {$counter < 20} { Log " loop $counter/20" if {![file isdirectory $sysdir]} { # Device is gone. Unplugged? Switched by kernel? Log " sysfs device tree is gone; abort SCSI value check" return 0 } # Searching the storage/SCSI tree; might take a while if {[set dirList [glob -nocomplain $topdir/host*]] != ""} { set sysdir [lindex $dirList 0] if {[set dirList [glob -nocomplain $sysdir/target*]] != ""} { set sysdir [lindex $dirList 0] regexp {.*target(.*)} $sysdir d subdir if {[set dirList [glob -nocomplain $sysdir/$subdir*]] != ""} { set sysdir [lindex $dirList 0] if [file exists $sysdir/vendor] { Log " Storage tree is ready" break } } } } after 500 incr counter } if {$counter == 20} { Log "SCSI tree not found; you may want to check if this path/file exists:" Log "$sysdir/vendor\n" return 0 } Log "Read SCSI values ..." foreach attr {vendor model rev} { if [file exists $sysdir/$attr] { set rc [open $sysdir/$attr r] set scsi($attr) [read -nonewline $rc] close $rc } else { set scsi($attr) "" Log "Warning: SCSI attribute \"$attr\" not found." } } return 1 } # end of proc {ReadSCSIAttrs} proc {ReadUSBAttrs} {dir args} { global usb set attrList {idVendor idProduct bConfigurationValue manufacturer product serial devnum busnum bNumConfigurations} set mandatoryList {idVendor idProduct bNumConfigurations} set result 1 if {$args != ""} { lappend attrList "$args/bInterfaceClass" lappend mandatoryList "$args/bInterfaceClass" } foreach attr $attrList { if [file exists $dir/$attr] { set rc [open $dir/$attr r] set usb($attr) [string trim [read -nonewline $rc]] close $rc } else { set usb($attr) "" if {[lsearch $mandatoryList $attr] > -1} { set result 0 } if {$attr == "serial"} {continue} Log " Warning: USB attribute \"$attr\" not found" } } return $result } # end of proc {ReadUSBAttrs} proc {MatchDevice} {config} { global scsi usb match set devinfo [file tail $config] set infoList [split $devinfo :] set stringList [lrange $infoList 2 end] if {[llength $stringList] == 0} {return 1} foreach teststring $stringList { if {$teststring == "?"} {return 0} set tokenList [split $teststring =] set id [lindex $tokenList 0] set matchstring [lindex $tokenList 1] set blankstring "" regsub -all {_} $matchstring { } blankstring Log "match $match($id)" Log " string1 (exact): $matchstring" Log " string2 (blanks): $blankstring" Log " device string: [set $match($id)]" if {!([string match *$matchstring* [set $match($id)]] || [string match *$blankstring* [set $match($id)]])} { return 0 } } return 1 } # end of proc {MatchDevice} proc {ParseGlobalConfig} {path} { global flags set configFile "" if [string length $path] { set places [list $path] } else { set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch] } foreach cfg $places { if [file exists $cfg] { set configFile $cfg break } } if {$configFile == ""} {return "No configuration file found, using defaults"} set rc [open $configFile r] while {![eof $rc]} { gets $rc line if [regexp {^#} [string trim $line]] {continue} if [regexp {DisableMBIMGlobal\s*=\s*([^\s]+)} $line d val] { set flags(nombim) [regexp -nocase {1|yes|true} $val] } if [regexp {DisableSwitching\s*=\s*([^\s]+)} $line d val] { set flags(noswitching) [regexp -nocase {1|yes|true} $val] } if [regexp {EnableLogging\s*=\s*([^\s]+)} $line d val] { set flags(logging) [regexp -nocase {1|yes|true} $val] } if [regexp {SetStorageDelay\s*=\s*([^\s]+)} $line d val] { if [regexp {\d+} $val] { set flags(stordelay) $val } } if [regexp {HuaweiAltModeGlobal\s*=\s*([^\s]+)} $line d val] { set flags(althuawei) [regexp -nocase {1|yes|true} $val] } } return "Use global config file: $configFile" } # end of proc {ParseGlobalConfig} proc ParseDeviceConfig {cfg} { global config set config(WaitBefore) "" set config(TargetVendor) "" set config(TargetProduct) "" set config(TargetClass) "" set config(Configuration) "" set config(NoMBIMCheck) 0 set config(PantechMode) 0 set config(CheckSuccess) 20 foreach pname [lsort [array names config]] { if [regexp -line "^\[^# \]*?$pname.*?= *(0x(\\w+)|\"(\[0-9a-fA-F,\]+)\"|(\[0-9\]+)) *\$" $cfg d config($pname)] { # Log "config: $pname set to $config($pname)" } } set config(WaitBefore) [string trimleft $config(WaitBefore) 0] } # end of proc {ParseDeviceConfig} proc ConfigGet {command config} { global setup usb flags switch $command { conflist { # Unpackaged configs first; sorting is essential for priority set configList [lsort -decreasing [glob -nocomplain $setup(dbdir_etc)/$config*]] set configList [concat $configList [lsort -decreasing [glob -nocomplain $setup(dbdir)/$config*]]] eval lappend configList [glob -nocomplain $setup(dbdir)/$usb(idVendor):#$flags(os)] if [file exists $setup(dbdir)/configPack.tar.gz] { Log "Found packed config collection $setup(dbdir)/configPack.tar.gz" if [catch {set packedList [exec tar -tzf $setup(dbdir)/configPack.tar.gz 2>/dev/null]} err] { Log "Error: problem opening config package; tar returned\n $err" return {} } set packedList [split $packedList \n] set packedConfigList [lsort -decreasing [lsearch -glob -all -inline $packedList $config*]] lappend packedConfigList [lsearch -inline $packedList $usb(idVendor):#$flags(os)] # Now add packaged configs with a mark, again sorted for priority foreach packedConfig $packedConfigList { lappend configList "pack/$packedConfig" } } return $configList } conffile { if [regexp {^pack/} $config] { set config [regsub {pack/} $config {}] Log "Extract config $config from collection $setup(dbdir)/configPack.tar.gz" set configContent [exec tar -xzOf $setup(dbdir)/configPack.tar.gz $config 2>/dev/null] } else { if [regexp [list $setup(dbdir_etc)] $config] { Log "Use config file from override folder $setup(dbdir_etc)" SysLog "usb_modeswitch: use overriding config file $config; make sure this is intended" SysLog "usb_modeswitch: please report any new or corrected settings; otherwise, check for outdated files" } set rc [open $config r] set configContent [read $rc] close $rc } return $configContent } } } # end of proc {ConfigGet} proc {Log} {msg} { global flags device loginit if {$flags(logwrite) == 0} {append loginit $msg\n} if {$flags(logging) == 0} {return} if $flags(logwrite) { if [string length $loginit] { exec echo "\nUSB_ModeSwitch log from [clock format [clock seconds]]" >/var/log/usb_modeswitch_$device exec echo "$loginit" >>/var/log/usb_modeswitch_$device set loginit "" } exec echo $msg >>/var/log/usb_modeswitch_$device } else { append loginit "\n$msg" } } # end of proc {Log} # Writing the log file and exit proc {SafeExit} {} { global flags set flags(logwrite) 1 Log "" exit } # end of proc {SafeExit} proc {SymLinkName} {path} { global device flags proc {hasInterrupt} {ifDir} { if {[llength [glob -nocomplain $ifDir/ttyUSB*]] == 0} { Log " no ttyUSB interface - skip endpoint check" return 0 } foreach epDir [glob -nocomplain $ifDir/ep_*] { set e [file tail $epDir] Log " check $e ..." if [file exists $epDir/type] { set rc [open $epDir/type r] set type [read $rc] close $rc if [regexp {Interrupt} $type] { Log " $e has interrupt transfer type" return 1 } } } return 0 } # In case the device path is returned as /class/tty/ttyUSB, # get the USB device path from linked tree "device" set linkpath /sys$path/device if [file exists $linkpath] { if {[file type $linkpath] == "link"} { set rawpath [file readlink $linkpath] set trimpath [regsub -all {\.\./} $rawpath {}] if [file isdirectory /sys/$trimpath] { append loginit "\n Use path $path\n" set path /$trimpath } } } if {![regexp {([0-9]+-[0-9]+[\.0-9]*:[^/]*).*(ttyUSB[0-9]+)} $path d myDev myPort]} { if $flags(logging) { set device [clock clicks] Log "This is not a ttyUSB port. Abort" } return "" } set device ttyUSB_$myDev set flags(logwrite) 1 Log "My name is $myPort\n" if {![regexp {(.*?[0-9]+)\.([0-9]+)/ttyUSB} /sys$path d ifRoot ifNum]} { Log "Could not find interface in path\n $path. Abort" return "" } set ifDir $ifRoot.$ifNum Log "Check my endpoints ...\n in $ifDir" if [hasInterrupt $ifDir] { Log "\n--> I am an interrupt port" set rightPort 1 } else { Log "\n--> I am not an interrupt port\n" set rightPort 0 } # There are devices with more than one interrupt interface. # Assume that the lowest of these is usable. Check all # possible lower interfaces if { $rightPort && ($ifNum > 0) } { Log "\nLook for lower ports with interrupt endpoints" for {set i 0} {$i < $ifNum} {incr i} { set ifDir $ifRoot.$i Log " in ifDir $ifDir ..." if [hasInterrupt $ifDir] { Log "\n--> found an interrupt interface below me\n" set rightPort 0 break } } } if {$rightPort == 0} { Log "Return empty name and exit" return "" } Log "\n--> No interrupt interface below me\n" cd /dev set idx 2 set symlinkName "gsmmodem" while {$idx < 256} { if {![file exists $symlinkName]} { set placeholder [open /dev/$symlinkName w] close $placeholder break } set symlinkName gsmmodem$idx incr idx } if {$idx == 256} {return ""} Log "Return symlink name \"$symlinkName\" and exit" return $symlinkName } # end of proc {SymLinkName} # Add USB ID to list of devices needing later treatment proc {AddToList} {name id} { set listfile /var/lib/usb_modeswitch/$name if [file exists $listfile] { set rc [open $listfile r] set buffer [read $rc] close $rc if [string match *$id* $buffer] { return } set idList [split [string trim $buffer] \n] } lappend idList $id set buffer [join $idList "\n"] if [catch {set lc [open $listfile w]}] {return} puts $lc $buffer close $lc } # end of proc {AddToList} proc {CheckSuccess} {devdir} { global config usb flags # For Cisco AM10, target device not on same port if {$usb(idVendor) == "1307" && $usb(idProduct) == "1169"} { set devdir [string range $devdir 0 end-1]2 } set ifdir [file tail [IfDir 0 $devdir]] if {[string length $config(TargetClass)] || [string length $config(Configuration)]} { set config(TargetVendor) $usb(idVendor) set config(TargetProduct) $usb(idProduct) } Log "Check success of mode switch for max. $config(CheckSuccess) seconds ..." set expected 1 for {set i 1} {$i <= $config(CheckSuccess)} {incr i} { after 1000 if {![file isdirectory $devdir]} { Log " Wait for device file system ($i sec.) ..." continue } else { Log " Read attributes ..." } set ifdir [IfDir 0 $devdir] if {$ifdir == ""} {continue} set ifdir [file tail $ifdir] if {![ReadUSBAttrs $devdir $ifdir]} { Log " Essential attributes are missing, continue wait ..." continue } if [string length $config(Configuration)] { if {$usb(bConfigurationValue) != $config(Configuration)} {continue} } if [string length $config(TargetClass)] { if {![regexp -nocase $usb($ifdir/bInterfaceClass) $config(TargetClass)]} { if {$config(class) != $usb($ifdir/bInterfaceClass} { set expected 0 } else {continue} } } if {![regexp -nocase $usb(idVendor) $config(TargetVendor)]} { if {![regexp -nocase $usb(idVendor) $config(vendor)]} { set expected 0 } else {continue} } if {![regexp -nocase $usb(idProduct) $config(TargetProduct)]} { if {![regexp -nocase $usb(idProduct) $config(product)]} { set expected 0 } else {continue} } # Arriving here means that device attributes have changed if $expected { Log " All attributes matched" } else { if [regexp -nocase {/[0-9a-f]+:#} $flags(config)] { Log " idProduct has changed after generic mode-switch, assume success" } else { if [regexp {HuaweiAltMode} $flags(config)] { Log " Alternative target attributes found, assume success" } else { Log " Attributes are different but target values are unexpected:" LogAttributes } } } break } if {$i > 20} {return 0} else {return 1} } # end of proc {CheckSuccess} proc {IfDir} {iface devdir} { set files [glob -nocomplain $devdir/*] set iffiles [lsort [lsearch -all -inline -regexp $files {^.*/[^/]*[0-9]+\.[0-9]$}]] set sorted [concat $iffiles [lsort [lsearch -all -inline -regexp $files {^.*/[^/]*[0-9]+\.[0-9][0-9]$}]]] if {[llength $sorted] == 0} { return "" } set ifdir [lindex $sorted $iface] if {![string length $ifdir] || ![file isdirectory $ifdir]} { return "" } return $ifdir } # end of proc {IfDir} proc {IfClass} {iface devdir} { set ifdir [IfDir $iface $devdir] if {![file exists $ifdir/bInterfaceClass]} { return -1 } set rc [open $ifdir/bInterfaceClass r] set c [read $rc] close $rc return [string trim $c] } # end of proc {IfClass} proc {ShowUsage} {} { puts "Dispatcher for 'usb_modeswitch'; usually run by udev, not intended for interactive operation" puts "Usage: usb_modeswitch_dispatcher [--config-file=<path>] --switch-mode=<device kernel name>" puts " usb_modeswitch_dispatcher --symlink-name=<sys path to device>" } # end of proc {ShowUsage} proc {SysLog} {msg} { global flags if {![info exists flags(logger)]} { set flags(logger) "" foreach fn {/bin/logger /usr/bin/logger} { if [file exists $fn] { set flags(logger) $fn } } Log "Logger is $flags(logger)" } if {$flags(logger) == ""} { Log "Can't add system message, no syslog helper found" return } catch {exec $flags(logger) -p syslog.notice "$msg" 2>/dev/null} } # end of proc {SysLog} proc {SetStorageDelay} {secs} { Log "Adjust delay for USB storage devices ..." set attrib /sys/module/usb_storage/parameters/delay_use if {![file exists $attrib]} { Log "Error: could not find delay_use attribute" return } if [catch {set ch [open $attrib r+]} err] { Log "Error: could not access delay_use attribute: $err" return } if {[read $ch] < $secs} { seek $ch 0 start puts -nonewline $ch $secs Log " Delay set to $secs seconds\n" } else { Log " Current value is higher than $secs. Leave it alone\n" } close $ch } # end of proc {SetStorageDelay} proc {CheckMBIM} {} { set kversion [exec uname -r] if [llength [glob -nocomplain /lib/modules/$kversion/kernel/drivers/net/usb/cdc_mbim*]] {return 1} if [file exists /sys/bus/usb/drivers/cdc_mbim] {return 1} return 0 } # end of proc {CheckMBIM} proc {CheckQMI} {} { set kversion [exec uname -r] if [llength [glob -nocomplain /lib/modules/$kversion/kernel/drivers/net/usb/qmi_wwan*]] {return 1} if [file exists /sys/bus/usb/drivers/cdc_mbim] {return 1} return 0 } # end of proc {CheckQMI} proc {PantechAutoSwitch} {} { global config flags if {$config(PantechMode) == 3} {return 1} if {$config(PantechMode) == 1} { if {"$config(vendor):$config(product)" == "10a9:6080"} { set flags(config) [regsub {PantechMode *= *1} $flags(config) "PantechMode=2"] Log " PantechMode changed to 2" return 0 } elseif [CheckQMI] { set flags(config) [regsub {PantechMode *= *1} $flags(config) "PantechMode=4"] Log " PantechMode changed to 4" return 0 } else { return 1 } } else {return 0} } # end of proc {PantechAutoSwitch} proc {LogAttributes} {} { global flags usb if $flags(logging) { set attrList {idVendor idProduct bConfigurationValue manufacturer product serial} foreach attr [lsort [array names usb]] { Log " [format %-26s $attr:] $usb($attr)" } } } # end of proc {LogAttributes} proc {HasFF} {devdir} { set i 0 while {[set dir [IfDir $i $devdir]] != ""} { set c [exec cat $dir/bInterfaceClass] if {$c == "ff"} {return 1} incr i } return 0 } # end of proc {HasFF} # The actual entry point Main $argv $argc