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 /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
ModemManager
2.07
MB
-rwxr-xr-x
a2disconf
15.75
KB
-rwxr-xr-x
a2dismod
15.75
KB
-rwxr-xr-x
a2dissite
15.75
KB
-rwxr-xr-x
a2enconf
15.75
KB
-rwxr-xr-x
a2enmod
15.75
KB
-rwxr-xr-x
a2ensite
15.75
KB
-rwxr-xr-x
a2query
9.6
KB
-rwxr-xr-x
aa-load
38.75
KB
-rwxr-xr-x
aa-remove-unknown
3.15
KB
-rwxr-xr-x
aa-status
39.06
KB
-rwxr-xr-x
aa-teardown
137
B
-rwxr-xr-x
accessdb
14.55
KB
-rwxr-xr-x
add-shell
1.03
KB
-rwxr-xr-x
addgnupghome
3
KB
-rwxr-xr-x
addgroup
53.9
KB
-rwxr-xr-x
adduser
53.9
KB
-rwxr-xr-x
agetty
59.56
KB
-rwxr-xr-x
apache2
736.55
KB
-rwxr-xr-x
apache2ctl
7.26
KB
-rwxr-xr-x
apachectl
7.26
KB
-rwxr-xr-x
apparmor_parser
1.55
MB
-rwxr-xr-x
apparmor_status
39.06
KB
-rwxr-xr-x
applygnupgdefaults
2.17
KB
-rwxr-xr-x
argdist-bpfcc
36
KB
-rwxr-xr-x
arp
61.61
KB
-rwxr-xr-x
arpd
26.33
KB
-rwxr-xr-x
arptables
219.16
KB
-rwxr-xr-x
arptables-nft
219.16
KB
-rwxr-xr-x
arptables-nft-restore
219.16
KB
-rwxr-xr-x
arptables-nft-save
219.16
KB
-rwxr-xr-x
arptables-restore
219.16
KB
-rwxr-xr-x
arptables-save
219.16
KB
-rwxr-xr-x
audisp-af_unix
14.31
KB
-rwxr-xr-x
audisp-remote
50.41
KB
-rwxr-xr-x
audisp-syslog
18.3
KB
-rwxr-xr-x
audispd-zos-remote
34.38
KB
-rwxr-xr-x
auditctl
50.5
KB
-rwxr-xr-x
auditd
118.41
KB
-rwxr-xr-x
augenrules
3.74
KB
-rwxr-xr-x
aureport
110.41
KB
-rwxr-xr-x
ausearch
110.45
KB
-rwxr-xr-x
autrace
18.3
KB
-rwxr-xr-x
badblocks
34.32
KB
-rwxr-xr-x
bashreadline-bpfcc
2.32
KB
-rwxr-xr-x
bashreadline.bt
698
B
-rwxr-xr-x
bcache-super-show
14.3
KB
-rwxr-xr-x
bindsnoop-bpfcc
15.96
KB
-rwxr-xr-x
biolatency-bpfcc
11.1
KB
-rwxr-xr-x
biolatency-kp.bt
664
B
-rwxr-xr-x
biolatency.bt
681
B
-rwxr-xr-x
biolatpcts-bpfcc
10.01
KB
-rwxr-xr-x
biopattern-bpfcc
3.86
KB
-rwxr-xr-x
biosdecode
27.2
KB
-rwxr-xr-x
biosnoop-bpfcc
10.58
KB
-rwxr-xr-x
biosnoop.bt
1.12
KB
-rwxr-xr-x
biostacks.bt
915
B
-rwxr-xr-x
biotop-bpfcc
9.34
KB
-rwxr-xr-x
bitesize-bpfcc
1.14
KB
-rwxr-xr-x
bitesize.bt
567
B
-rwxr-xr-x
blkdeactivate
15.97
KB
-rwxr-xr-x
blkdiscard
22.38
KB
-rwxr-xr-x
blkid
54.41
KB
-rwxr-xr-x
blkzone
34.38
KB
-rwxr-xr-x
blockdev
34.38
KB
-rwxr-xr-x
bpflist-bpfcc
2.54
KB
-rwxr-xr-x
bpftool
1.58
KB
-rwxr-xr-x
bridge
108.49
KB
-rwxr-xr-x
btrfsdist-bpfcc
6.47
KB
-rwxr-xr-x
btrfsslower-bpfcc
9.75
KB
-rwxr-xr-x
cache_check
1.36
MB
-rwxr-xr-x
cache_dump
1.36
MB
-rwxr-xr-x
cache_metadata_size
1.36
MB
-rwxr-xr-x
cache_repair
1.36
MB
-rwxr-xr-x
cache_restore
1.36
MB
-rwxr-xr-x
cache_writeback
1.36
MB
-rwxr-xr-x
cachestat-bpfcc
6.38
KB
-rwxr-xr-x
cachetop-bpfcc
9.15
KB
-rwxr-xr-x
capable-bpfcc
8.28
KB
-rwxr-xr-x
capable.bt
1.88
KB
-rwxr-xr-x
capsh
57.09
KB
-rwxr-xr-x
cfdisk
94.73
KB
-rwxr-xr-x
cgdisk
166.48
KB
-rwxr-xr-x
chcpu
30.38
KB
-rwxr-xr-x
check_forensic
952
B
-rwxr-xr-x
chgpasswd
58.32
KB
-rwxr-xr-x
chmem
34.38
KB
-rwxr-xr-x
chpasswd
54.43
KB
-rwxr-xr-x
chroot
38.51
KB
-rwxr-xr-x
cobjnew-bpfcc
53
B
-rwxr-xr-x
compactsnoop-bpfcc
11.1
KB
-rwxr-xr-x
cpgr
48.45
KB
-rwxr-xr-x
cppw
48.45
KB
-rwxr-xr-x
cpudist-bpfcc
6.85
KB
-rwxr-xr-x
cpuunclaimed-bpfcc
14.59
KB
-rwxr-xr-x
cpuwalk.bt
497
B
-rwxr-xr-x
criticalstat-bpfcc
8.41
KB
-rwxr-xr-x
cron
58.67
KB
-rwxr-xr-x
cryptdisks_start
1.51
KB
-rwxr-xr-x
cryptdisks_stop
844
B
-rwxr-xr-x
cryptsetup
225.9
KB
-rwxr-xr-x
ctrlaltdel
14.38
KB
-rwxr-xr-x
dbslower-bpfcc
7.22
KB
-rwxr-xr-x
dbstat-bpfcc
3.7
KB
-rwxr-xr-x
dcb
80.52
KB
-rwxr-xr-x
dcsnoop-bpfcc
4.03
KB
-rwxr-xr-x
dcsnoop.bt
1.23
KB
-rwxr-xr-x
dcstat-bpfcc
3.77
KB
-rwxr-xr-x
deadlock-bpfcc
20.45
KB
-rwxr-xr-x
debugfs
225.87
KB
-rwxr-xr-x
delgroup
18.53
KB
-rwxr-xr-x
deluser
18.53
KB
-rwxr-xr-x
depmod
170.24
KB
-rwxr-xr-x
devlink
150.86
KB
-rwxr-xr-x
dhcpcd
395.4
KB
-rwxr-xr-x
dirtop-bpfcc
8.37
KB
-rwxr-xr-x
dmeventd
50.38
KB
-rwxr-xr-x
dmidecode
135.25
KB
-rwxr-xr-x
dmsetup
171.05
KB
-rwxr-xr-x
dmstats
171.05
KB
-rwxr-xr-x
dosfsck
78.38
KB
-rwxr-xr-x
dosfslabel
38.38
KB
-rwxr-xr-x
dpkg-preconfigure
4.25
KB
-rwxr-xr-x
dpkg-reconfigure
4.43
KB
-rwxr-xr-x
drsnoop-bpfcc
6.73
KB
-rwxr-xr-x
dumpe2fs
34.31
KB
-rwxr-xr-x
e2freefrag
18.3
KB
-rwxr-xr-x
e2fsck
364.34
KB
-rwxr-xr-x
e2image
42.31
KB
-rwxr-xr-x
e2label
110.56
KB
-rwxr-xr-x
e2mmpstatus
34.31
KB
-rwxr-xr-x
e2scrub
7.12
KB
-rwxr-xr-x
e2scrub_all
5.27
KB
-rwxr-xr-x
e2undo
22.3
KB
-rwxr-xr-x
e4crypt
30.38
KB
-rwxr-xr-x
e4defrag
34.3
KB
-rwxr-xr-x
ebtables
219.16
KB
-rwxr-xr-x
ebtables-nft
219.16
KB
-rwxr-xr-x
ebtables-nft-restore
219.16
KB
-rwxr-xr-x
ebtables-nft-save
219.16
KB
-rwxr-xr-x
ebtables-restore
219.16
KB
-rwxr-xr-x
ebtables-save
219.16
KB
-rwxr-xr-x
ebtables-translate
219.16
KB
-rwxr-xr-x
era_check
1.36
MB
-rwxr-xr-x
era_dump
1.36
MB
-rwxr-xr-x
era_invalidate
1.36
MB
-rwxr-xr-x
era_restore
1.36
MB
-rwxr-xr-x
ethtool
651.68
KB
-rwxr-xr-x
execsnoop-bpfcc
9.82
KB
-rwxr-xr-x
execsnoop.bt
928
B
-rwxr-xr-x
exitsnoop-bpfcc
9.42
KB
-rwxr-xr-x
ext4dist-bpfcc
6.53
KB
-rwxr-xr-x
ext4slower-bpfcc
9.71
KB
-rwxr-xr-x
faillock
22.31
KB
-rwxr-xr-x
fatlabel
38.38
KB
-rwxr-xr-x
fdisk
114.42
KB
-rwxr-xr-x
filefrag
18.32
KB
-rwxr-xr-x
filegone-bpfcc
5.64
KB
-rwxr-xr-x
filelife-bpfcc
6.38
KB
-rwxr-xr-x
fileslower-bpfcc
7.2
KB
-rwxr-xr-x
filetop-bpfcc
6.35
KB
-rwxr-xr-x
findfs
14.38
KB
-rwxr-xr-x
fixparts
58.48
KB
-rwxr-xr-x
fsadm
24
KB
-rwxr-xr-x
fsck
42.42
KB
-rwxr-xr-x
fsck.btrfs
1.16
KB
-rwxr-xr-x
fsck.cramfs
30.44
KB
-rwxr-xr-x
fsck.ext2
364.34
KB
-rwxr-xr-x
fsck.ext3
364.34
KB
-rwxr-xr-x
fsck.ext4
364.34
KB
-rwxr-xr-x
fsck.fat
78.38
KB
-rwxr-xr-x
fsck.minix
54.41
KB
-rwxr-xr-x
fsck.msdos
78.38
KB
-rwxr-xr-x
fsck.vfat
78.38
KB
-rwxr-xr-x
fsck.xfs
2.51
KB
-rwxr-xr-x
fsfreeze
14.38
KB
-rwxr-xr-x
fstab-decode
14.3
KB
-rwxr-xr-x
fstrim
42.38
KB
-rwxr-xr-x
funccount-bpfcc
12.68
KB
-rwxr-xr-x
funcinterval-bpfcc
5.46
KB
-rwxr-xr-x
funclatency-bpfcc
11.28
KB
-rwxr-xr-x
funcslower-bpfcc
10.38
KB
-rwxr-xr-x
gdisk
198.48
KB
-rwxr-xr-x
genl
120.58
KB
-rwxr-xr-x
getcap
14.3
KB
-rwxr-xr-x
gethostlatency-bpfcc
3.82
KB
-rwxr-xr-x
gethostlatency.bt
1.19
KB
-rwxr-xr-x
getpcaps
14.3
KB
-rwxr-xr-x
getty
59.56
KB
-rwxr-xr-x
groupadd
71.13
KB
-rwxr-xr-x
groupdel
62.91
KB
-rwxr-xr-x
groupmems
58.34
KB
-rwxr-xr-x
groupmod
71.04
KB
-rwxr-xr-x
grpck
58.32
KB
-rwxr-xr-x
grpconv
50.16
KB
-rwxr-xr-x
grpunconv
50.16
KB
-rwxr-xr-x
grub-bios-setup
958.55
KB
-rwxr-xr-x
grub-install
1.17
MB
-rwxr-xr-x
grub-macbless
946.41
KB
-rwxr-xr-x
grub-mkconfig
8.63
KB
-rwxr-xr-x
grub-mkdevicemap
70.69
KB
-rwxr-xr-x
grub-probe
954.66
KB
-rwxr-xr-x
grub-reboot
4.73
KB
-rwxr-xr-x
grub-set-default
3.47
KB
-rwxr-xr-x
halt
1.43
MB
-rwxr-xr-x
hardirqs-bpfcc
6.85
KB
-rwxr-xr-x
hdparm
139.43
KB
-rwxr-xr-x
httxt2dbm
14.3
KB
-rwxr-xr-x
iconvconfig
34.47
KB
-rwxr-xr-x
ifconfig
77.17
KB
-rwxr-xr-x
iftop
62.62
KB
-rwxr-xr-x
init
98.45
KB
-rwxr-xr-x
inject-bpfcc
16.06
KB
-rwxr-xr-x
insmod
170.24
KB
-rwxr-xr-x
install-sgmlcatalog
4.44
KB
-rwxr-xr-x
installkernel
2.6
KB
-rwxr-xr-x
integritysetup
67.06
KB
-rwxr-xr-x
invoke-rc.d
16.13
KB
-rwxr-xr-x
iotop
113.64
KB
-rwxr-xr-x
iotop-c
113.64
KB
-rwxr-xr-x
ip
754.8
KB
-rwxr-xr-x
ip6tables
219.16
KB
-rwxr-xr-x
ip6tables-apply
6.89
KB
-rwxr-xr-x
ip6tables-legacy
92.95
KB
-rwxr-xr-x
ip6tables-legacy-restore
92.95
KB
-rwxr-xr-x
ip6tables-legacy-save
92.95
KB
-rwxr-xr-x
ip6tables-nft
219.16
KB
-rwxr-xr-x
ip6tables-nft-restore
219.16
KB
-rwxr-xr-x
ip6tables-nft-save
219.16
KB
-rwxr-xr-x
ip6tables-restore
219.16
KB
-rwxr-xr-x
ip6tables-restore-translate
219.16
KB
-rwxr-xr-x
ip6tables-save
219.16
KB
-rwxr-xr-x
ip6tables-translate
219.16
KB
-rwxr-xr-x
ipmaddr
18.3
KB
-rwxr-xr-x
iptables
219.16
KB
-rwxr-xr-x
iptables-apply
6.89
KB
-rwxr-xr-x
iptables-legacy
92.95
KB
-rwxr-xr-x
iptables-legacy-restore
92.95
KB
-rwxr-xr-x
iptables-legacy-save
92.95
KB
-rwxr-xr-x
iptables-nft
219.16
KB
-rwxr-xr-x
iptables-nft-restore
219.16
KB
-rwxr-xr-x
iptables-nft-save
219.16
KB
-rwxr-xr-x
iptables-restore
219.16
KB
-rwxr-xr-x
iptables-restore-translate
219.16
KB
-rwxr-xr-x
iptables-save
219.16
KB
-rwxr-xr-x
iptables-translate
219.16
KB
-rwxr-xr-x
iptunnel
18.3
KB
-rwxr-xr-x
iscsi-iname
18.3
KB
-rwxr-xr-x
iscsi_discovery
5.17
KB
-rwxr-xr-x
iscsiadm
370.43
KB
-rwxr-xr-x
iscsid
286.55
KB
-rwxr-xr-x
iscsistart
274.49
KB
-rwxr-xr-x
isosize
14.38
KB
-rwxr-xr-x
javacalls-bpfcc
55
B
-rwxr-xr-x
javaflow-bpfcc
54
B
-rwxr-xr-x
javagc-bpfcc
52
B
-rwxr-xr-x
javaobjnew-bpfcc
56
B
-rwxr-xr-x
javastat-bpfcc
54
B
-rwxr-xr-x
javathreads-bpfcc
57
B
-rwxr-xr-x
kbdrate
18.31
KB
-rwxr-xr-x
killall5
26.23
KB
-rwxr-xr-x
killsnoop-bpfcc
4.45
KB
-rwxr-xr-x
killsnoop.bt
873
B
-rwxr-xr-x
klockstat-bpfcc
13.04
KB
-rwxr-xr-x
kpartx
42.16
KB
-rwxr-xr-x
kvmexit-bpfcc
11.19
KB
-rwxr-xr-x
ldattach
26.38
KB
-rwxr-xr-x
ldconfig
387
B
-rwxr-xr-x
ldconfig.real
1
MB
-rwxr-xr-x
llcstat-bpfcc
4.48
KB
-rwxr-xr-x
loads.bt
1.1
KB
-rwxr-xr-x
locale-gen
4.21
KB
-rwxr-xr-x
logrotate
94.24
KB
-rwxr-xr-x
logsave
14.16
KB
-rwxr-xr-x
losetup
74.52
KB
-rwxr-xr-x
lsmod
170.24
KB
-rwxr-xr-x
luksformat
3.32
KB
-rwxr-xr-x
lvchange
3.01
MB
-rwxr-xr-x
lvconvert
3.01
MB
-rwxr-xr-x
lvcreate
3.01
MB
-rwxr-xr-x
lvdisplay
3.01
MB
-rwxr-xr-x
lvextend
3.01
MB
-rwxr-xr-x
lvm
3.01
MB
-rwxr-xr-x
lvmconfig
3.01
MB
-rwxr-xr-x
lvmdiskscan
3.01
MB
-rwxr-xr-x
lvmdump
10.12
KB
-rwxr-xr-x
lvmpolld
235.97
KB
-rwxr-xr-x
lvmsadc
3.01
MB
-rwxr-xr-x
lvmsar
3.01
MB
-rwxr-xr-x
lvreduce
3.01
MB
-rwxr-xr-x
lvremove
3.01
MB
-rwxr-xr-x
lvrename
3.01
MB
-rwxr-xr-x
lvresize
3.01
MB
-rwxr-xr-x
lvs
3.01
MB
-rwxr-xr-x
lvscan
3.01
MB
-rwxr-xr-x
lxc
589
B
-rwxr-xr-x
lxd
589
B
-rwxr-xr-x
make-bcache
22.38
KB
-rwxr-xr-x
make-ssl-cert
6.65
KB
-rwxr-xr-x
mariadbd
26.09
MB
-rwxr-xr-x
mdadm
622.21
KB
-rwxr-xr-x
mdflush-bpfcc
2.24
KB
-rwxr-xr-x
mdflush.bt
775
B
-rwxr-xr-x
mdmon
258.8
KB
-rwxr-xr-x
memleak-bpfcc
20.8
KB
-rwxr-xr-x
mii-tool
26.73
KB
-rwxr-xr-x
mkdosfs
50.83
KB
-rwxr-xr-x
mke2fs
130.62
KB
-rwxr-xr-x
mkfs
14.38
KB
-rwxr-xr-x
mkfs.bfs
22.38
KB
-rwxr-xr-x
mkfs.btrfs
560.3
KB
-rwxr-xr-x
mkfs.cramfs
34.32
KB
-rwxr-xr-x
mkfs.ext2
130.62
KB
-rwxr-xr-x
mkfs.ext3
130.62
KB
-rwxr-xr-x
mkfs.ext4
130.62
KB
-rwxr-xr-x
mkfs.fat
50.83
KB
-rwxr-xr-x
mkfs.minix
42.39
KB
-rwxr-xr-x
mkfs.msdos
50.83
KB
-rwxr-xr-x
mkfs.ntfs
66.38
KB
-rwxr-xr-x
mkfs.vfat
50.83
KB
-rwxr-xr-x
mkfs.xfs
438.99
KB
-rwxr-xr-x
mkhomedir_helper
22.34
KB
-rwxr-xr-x
mkinitramfs
15.39
KB
-rwxr-xr-x
mklost+found
14.3
KB
-rwxr-xr-x
mkntfs
66.38
KB
-rwxr-xr-x
mkswap
50.38
KB
-rwxr-xr-x
modinfo
170.24
KB
-rwxr-xr-x
modprobe
170.24
KB
-rwxr-xr-x
mount.fuse
18.3
KB
-rwxr-xr-x
mount.fuse3
18.3
KB
-rwxr-xr-x
mount.lowntfs-3g
118.98
KB
-rwxr-xr-x
mount.ntfs
159.01
KB
-rwxr-xr-x
mount.ntfs-3g
159.01
KB
-rwxr-xr-x
mountsnoop-bpfcc
14.62
KB
-rwxr-xr-x
mpathpersist
31.21
KB
-rwxr-xr-x
multipath
34.3
KB
-rwxr-xr-x
multipathc
18.3
KB
-rwxr-xr-x
multipathd
142.46
KB
-rwxr-xr-x
mysqld
26.09
MB
-rwxr-xr-x
mysqld_qslower-bpfcc
3.05
KB
-rwxr-xr-x
nameif
14.39
KB
-rwxr-xr-x
naptime.bt
1.01
KB
-rwxr-xr-x
needrestart
40.13
KB
-rwxr-xr-x
netplan
802
B
-rwxr-xr-x
netqtop-bpfcc
5.59
KB
-rwxr-xr-x
newusers
86.96
KB
-rwxr-xr-x
nfnl_osf
18.3
KB
-rwxr-xr-x
nfsdist-bpfcc
4.95
KB
-rwxr-xr-x
nfsslower-bpfcc
13.61
KB
-rwxr-xr-x
nft
26.23
KB
-rwxr-xr-x
nginx
1.25
MB
-rwxr-xr-x
nodegc-bpfcc
52
B
-rwxr-xr-x
nodestat-bpfcc
54
B
-rwxr-xr-x
nologin
14.3
KB
-rwxr-xr-x
ntfsclone
50.38
KB
-rwxr-xr-x
ntfscp
30.38
KB
-rwxr-xr-x
ntfslabel
22.38
KB
-rwxr-xr-x
ntfsresize
62.39
KB
-rwxr-xr-x
ntfsundelete
50.38
KB
-rwxr-xr-x
offcputime-bpfcc
13.46
KB
-rwxr-xr-x
offwaketime-bpfcc
15.31
KB
-rwxr-xr-x
on_ac_power
3.7
KB
-rwxr-xr-x
oomkill-bpfcc
2.04
KB
-rwxr-xr-x
oomkill.bt
1.17
KB
-rwxr-xr-x
opensnoop-bpfcc
14.24
KB
-rwxr-xr-x
opensnoop.bt
953
B
-rwxr-xr-x
overlayroot-chroot
2.45
KB
-rwxr-xr-x
ownership
14.45
KB
-rwxr-xr-x
pam-auth-update
20.96
KB
-rwxr-xr-x
pam_extrausers_chkpwd
26.31
KB
-rwxr-sr-x
pam_extrausers_update
34.31
KB
-rwxr-xr-x
pam_getenv
2.82
KB
-rwxr-xr-x
pam_namespace_helper
467
B
-rwxr-xr-x
pam_timestamp_check
14.31
KB
-rwxr-xr-x
parted
94.4
KB
-rwxr-xr-x
partprobe
14.38
KB
-rwxr-xr-x
pdata_tools
1.36
MB
-rwxr-xr-x
perlcalls-bpfcc
55
B
-rwxr-xr-x
perlflow-bpfcc
54
B
-rwxr-xr-x
perlstat-bpfcc
54
B
-rwxr-xr-x
php-fpm8.3
5.49
MB
-rwxr-xr-x
phpcalls-bpfcc
54
B
-rwxr-xr-x
phpdismod
7.11
KB
-rwxr-xr-x
phpenmod
7.11
KB
-rwxr-xr-x
phpflow-bpfcc
53
B
-rwxr-xr-x
phpquery
6.24
KB
-rwxr-xr-x
phpstat-bpfcc
53
B
-rwxr-xr-x
pidpersec-bpfcc
1.08
KB
-rwxr-xr-x
pidpersec.bt
628
B
-rwxr-xr-x
pivot_root
14.38
KB
-rwxr-xr-x
plipconfig
14.3
KB
-rwxr-xr-x
plymouthd
146.57
KB
-rwxr-xr-x
poweroff
1.43
MB
-rwxr-xr-x
ppchcalls-bpfcc
13.89
KB
-rwxr-xr-x
profile-bpfcc
14.41
KB
-rwxr-xr-x
pvchange
3.01
MB
-rwxr-xr-x
pvck
3.01
MB
-rwxr-xr-x
pvcreate
3.01
MB
-rwxr-xr-x
pvdisplay
3.01
MB
-rwxr-xr-x
pvmove
3.01
MB
-rwxr-xr-x
pvremove
3.01
MB
-rwxr-xr-x
pvresize
3.01
MB
-rwxr-xr-x
pvs
3.01
MB
-rwxr-xr-x
pvscan
3.01
MB
-rwxr-xr-x
pwck
54.29
KB
-rwxr-xr-x
pwconv
46.16
KB
-rwxr-xr-x
pwhistory_helper
22.31
KB
-rwxr-xr-x
pwunconv
46.16
KB
-rwxr-xr-x
pythoncalls-bpfcc
57
B
-rwxr-xr-x
pythonflow-bpfcc
56
B
-rwxr-xr-x
pythongc-bpfcc
54
B
-rwxr-xr-x
pythonstat-bpfcc
56
B
-rwxr-xr-x
rarp
32.33
KB
-rwxr-xr-x
rdmaucma-bpfcc
4.95
KB
-rwxr-xr-x
readahead-bpfcc
6.54
KB
-rwxr-xr-x
readprofile
22.41
KB
-rwxr-xr-x
reboot
1.43
MB
-rwxr-xr-x
remove-shell
1.08
KB
-rwxr-xr-x
reset-trace-bpfcc
3.42
KB
-rwxr-xr-x
resize2fs
70.3
KB
-rwxr-xr-x
resolvconf
158.67
KB
-rwxr-xr-x
rmmod
170.24
KB
-rwxr-xr-x
rmt
54.71
KB
-rwxr-xr-x
rmt-tar
54.71
KB
-rwxr-xr-x
route
68.27
KB
-rwxr-xr-x
rsyslogd
771.67
KB
-rwxr-xr-x
rtacct
28.31
KB
-rwxr-xr-x
rtcwake
34.38
KB
-rwxr-xr-x
rtmon
116.52
KB
-rwxr-xr-x
rubycalls-bpfcc
55
B
-rwxr-xr-x
rubyflow-bpfcc
54
B
-rwxr-xr-x
rubygc-bpfcc
52
B
-rwxr-xr-x
rubyobjnew-bpfcc
56
B
-rwxr-xr-x
rubystat-bpfcc
54
B
-rwxr-xr-x
runlevel
1.43
MB
-rwxr-xr-x
runqlat-bpfcc
9.3
KB
-rwxr-xr-x
runqlat.bt
788
B
-rwxr-xr-x
runqlen-bpfcc
8.05
KB
-rwxr-xr-x
runqlen.bt
1.01
KB
-rwxr-xr-x
runqslower-bpfcc
9.01
KB
-rwxr-xr-x
runuser
54.38
KB
-rwxr-xr-x
service
8.89
KB
-rwxr-xr-x
setcap
14.3
KB
-rwxr-xr-x
setuids.bt
1.76
KB
-rwxr-xr-x
setvesablank
14.37
KB
-rwxr-xr-x
setvtrgb
14.43
KB
-rwxr-xr-x
sfdisk
106.38
KB
-rwxr-xr-x
sgdisk
178.48
KB
-rwxr-xr-x
shadowconfig
2.22
KB
-rwxr-xr-x
shmsnoop-bpfcc
7.8
KB
-rwxr-xr-x
shutdown
1.43
MB
-rwxr-xr-x
slabratetop-bpfcc
6.38
KB
-rwxr-xr-x
slattach
36.08
KB
-rwxr-xr-x
sofdsnoop-bpfcc
8.06
KB
-rwxr-xr-x
softirqs-bpfcc
5.59
KB
-rwxr-xr-x
solisten-bpfcc
5.96
KB
-rwxr-xr-x
split-logfile
2.36
KB
-rwxr-xr-x
sshd
899.82
KB
-rwxr-xr-x
ssllatency.bt
2.08
KB
-rwxr-xr-x
sslsniff-bpfcc
13.68
KB
-rwxr-xr-x
sslsnoop.bt
1.99
KB
-rwxr-xr-x
stackcount-bpfcc
16.26
KB
-rwxr-xr-x
start-stop-daemon
47.49
KB
-rwxr-xr-x
statsnoop-bpfcc
4.92
KB
-rwxr-xr-x
statsnoop.bt
1.26
KB
-rwxr-xr-x
sudo_logsrvd
248.5
KB
-rwxr-xr-x
sudo_sendlog
131.67
KB
-rwxr-xr-x
sulogin
42.38
KB
-rwxr-xr-x
swapin.bt
600
B
-rwxr-xr-x
swaplabel
18.38
KB
-rwxr-xr-x
swapoff
22.38
KB
-rwxr-xr-x
swapon
42.38
KB
-rwxr-xr-x
switch_root
22.38
KB
-rwxr-xr-x
syncsnoop-bpfcc
1.27
KB
-rwxr-xr-x
syncsnoop.bt
839
B
-rwxr-xr-x
syscount-bpfcc
8.57
KB
-rwxr-xr-x
syscount.bt
872
B
-rwxr-xr-x
sysctl
30.38
KB
-rwxr-xr-x
tarcat
936
B
-rwxr-xr-x
tc
630.08
KB
-rwxr-xr-x
tclcalls-bpfcc
54
B
-rwxr-xr-x
tclflow-bpfcc
53
B
-rwxr-xr-x
tclobjnew-bpfcc
55
B
-rwxr-xr-x
tclstat-bpfcc
53
B
-rwxr-xr-x
tcpaccept-bpfcc
9
KB
-rwxr-xr-x
tcpaccept.bt
1.71
KB
-rwxr-xr-x
tcpcong-bpfcc
20.11
KB
-rwxr-xr-x
tcpconnect-bpfcc
18.46
KB
-rwxr-xr-x
tcpconnect.bt
1.58
KB
-rwxr-xr-x
tcpconnlat-bpfcc
9.07
KB
-rwxr-xr-x
tcpdrop-bpfcc
7.44
KB
-rwxr-xr-x
tcpdrop.bt
2.41
KB
-rwxr-xr-x
tcplife-bpfcc
16.55
KB
-rwxr-xr-x
tcplife.bt
2.72
KB
-rwxr-xr-x
tcpretrans-bpfcc
13.77
KB
-rwxr-xr-x
tcpretrans.bt
2.07
KB
-rwxr-xr-x
tcprtt-bpfcc
8.7
KB
-rwxr-xr-x
tcpstates-bpfcc
13.73
KB
-rwxr-xr-x
tcpsubnet-bpfcc
7.63
KB
-rwxr-xr-x
tcpsynbl-bpfcc
2.12
KB
-rwxr-xr-x
tcpsynbl.bt
962
B
-rwxr-xr-x
tcptop-bpfcc
12.64
KB
-rwxr-xr-x
tcptracer-bpfcc
17.71
KB
-rwxr-xr-x
telinit
1.43
MB
-rwxr-xr-x
thin_check
1.36
MB
-rwxr-xr-x
thin_delta
1.36
MB
-rwxr-xr-x
thin_dump
1.36
MB
-rwxr-xr-x
thin_ls
1.36
MB
-rwxr-xr-x
thin_metadata_size
1.36
MB
-rwxr-xr-x
thin_repair
1.36
MB
-rwxr-xr-x
thin_restore
1.36
MB
-rwxr-xr-x
thin_rmap
1.36
MB
-rwxr-xr-x
thin_trim
1.36
MB
-rwxr-xr-x
threadsnoop-bpfcc
1.81
KB
-rwxr-xr-x
threadsnoop.bt
712
B
-rwxr-xr-x
tipc
90.52
KB
-rwxr-xr-x
tplist-bpfcc
4.06
KB
-rwxr-xr-x
trace-bpfcc
42.86
KB
-rwxr-xr-x
ttysnoop-bpfcc
7.51
KB
-rwxr-xr-x
tune2fs
110.56
KB
-rwxr-xr-x
ucalls
11.69
KB
-rwxr-xr-x
uflow
7.92
KB
-rwxr-xr-x
ufw
4.84
KB
-rwxr-xr-x
ugc
7.64
KB
-rwxr-xr-x
umount.udisks2
14.3
KB
-rwxr-xr-x
undump.bt
789
B
-rwxr-xr-x
unix_chkpwd
30.31
KB
-rwxr-sr-x
unix_update
34.31
KB
-rwxr-xr-x
uobjnew
6.04
KB
-rwxr-xr-x
update-ca-certificates
5.32
KB
-rwxr-xr-x
update-catalog
9.17
KB
-rwxr-xr-x
update-grub
64
B
-rwxr-xr-x
update-grub-gfxpayload
301
B
-rwxr-xr-x
update-grub2
64
B
-rwxr-xr-x
update-ieee-data
3.41
KB
-rwxr-xr-x
update-info-dir
1.66
KB
-rwxr-xr-x
update-initramfs
6.75
KB
-rwxr-xr-x
update-locale
2.99
KB
-rwxr-xr-x
update-passwd
34.56
KB
-rwxr-xr-x
update-pciids
1.74
KB
-rwxr-xr-x
update-rc.d
17.72
KB
-rwxr-xr-x
update-secureboot-policy
7.43
KB
-rwxr-xr-x
update-shells
3.89
KB
-rwxr-xr-x
update-xmlcatalog
16.88
KB
-rwxr-xr-x
upgrade-from-grub-legacy
1.56
KB
-rwxr-xr-x
usb_modeswitch
59.66
KB
-rwxr-xr-x
usb_modeswitch_dispatcher
26.78
KB
-rwxr-xr-x
useradd
139.88
KB
-rwxr-xr-x
userdel
91.01
KB
-rwxr-xr-x
usermod
127.65
KB
-rwxr-xr-x
ustat
12.12
KB
-rwxr-xr-x
uthreads
4
KB
-rwxr-xr-x
uuidd
30.88
KB
-rwxr-xr-x
validlocale
1.73
KB
-rwxr-xr-x
vcstime
14.3
KB
-rwxr-xr-x
vdpa
34.56
KB
-rwxr-xr-x
veritysetup
43.94
KB
-rwxr-xr-x
vfscount-bpfcc
1.36
KB
-rwxr-xr-x
vfscount.bt
515
B
-rwxr-xr-x
vfsstat-bpfcc
4.06
KB
-rwxr-xr-x
vfsstat.bt
721
B
-rwxr-xr-x
vgcfgbackup
3.01
MB
-rwxr-xr-x
vgcfgrestore
3.01
MB
-rwxr-xr-x
vgchange
3.01
MB
-rwxr-xr-x
vgck
3.01
MB
-rwxr-xr-x
vgconvert
3.01
MB
-rwxr-xr-x
vgcreate
3.01
MB
-rwxr-xr-x
vgdisplay
3.01
MB
-rwxr-xr-x
vgexport
3.01
MB
-rwxr-xr-x
vgextend
3.01
MB
-rwxr-xr-x
vgimport
3.01
MB
-rwxr-xr-x
vgimportclone
3.01
MB
-rwxr-xr-x
vgmerge
3.01
MB
-rwxr-xr-x
vgmknodes
3.01
MB
-rwxr-xr-x
vgreduce
3.01
MB
-rwxr-xr-x
vgremove
3.01
MB
-rwxr-xr-x
vgrename
3.01
MB
-rwxr-xr-x
vgs
3.01
MB
-rwxr-xr-x
vgscan
3.01
MB
-rwxr-xr-x
vgsplit
3.01
MB
-rwxr-xr-x
vigr
60.69
KB
-rwxr-xr-x
vipw
60.69
KB
-rwxr-xr-x
virtiostat-bpfcc
8.69
KB
-rwxr-xr-x
visudo
252.71
KB
-rwxr-xr-x
vnstatd
93.28
KB
-rwxr-xr-x
vpddecode
14.58
KB
-rwxr-xr-x
vsftpd
156.48
KB
-rwxr-xr-x
wakeuptime-bpfcc
8.1
KB
-rwxr-xr-x
wipefs
38.38
KB
-rwxr-xr-x
writeback.bt
1.66
KB
-rwxr-xr-x
xfs_admin
2.12
KB
-rwxr-xr-x
xfs_bmap
695
B
-rwxr-xr-x
xfs_copy
90.44
KB
-rwxr-xr-x
xfs_db
688.56
KB
-rwxr-xr-x
xfs_estimate
14.16
KB
-rwxr-xr-x
xfs_freeze
800
B
-rwxr-xr-x
xfs_fsr
42.18
KB
-rwxr-xr-x
xfs_growfs
38.23
KB
-rwxr-xr-x
xfs_info
1.26
KB
-rwxr-xr-x
xfs_io
203.65
KB
-rwxr-xr-x
xfs_logprint
78.27
KB
-rwxr-xr-x
xfs_mdrestore
34.23
KB
-rwxr-xr-x
xfs_metadump
816
B
-rwxr-xr-x
xfs_mkfile
1.02
KB
-rwxr-xr-x
xfs_ncheck
685
B
-rwxr-xr-x
xfs_quota
90.16
KB
-rwxr-xr-x
xfs_repair
643.32
KB
-rwxr-xr-x
xfs_rtcp
18.15
KB
-rwxr-xr-x
xfs_scrub
106.27
KB
-rwxr-xr-x
xfs_scrub_all
7.66
KB
-rwxr-xr-x
xfs_spaceman
42.3
KB
-rwxr-xr-x
xfsdist-bpfcc
4.61
KB
-rwxr-xr-x
xfsdist.bt
972
B
-rwxr-xr-x
xfsslower-bpfcc
7.78
KB
-rwxr-xr-x
xtables-legacy-multi
92.95
KB
-rwxr-xr-x
xtables-monitor
219.16
KB
-rwxr-xr-x
xtables-nft-multi
219.16
KB
-rwxr-xr-x
zerofree
14.15
KB
-rwxr-xr-x
zfsdist-bpfcc
5.3
KB
-rwxr-xr-x
zfsslower-bpfcc
8.45
KB
-rwxr-xr-x
zic
66.39
KB
-rwxr-xr-x
zramctl
54.52
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : usb_modeswitch_dispatcher
#!/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
Close