Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
fuswim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sysadmin
fuswim
Commits
a0177509
Commit
a0177509
authored
Jul 22, 2021
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fucking cycle
parent
84fc8321
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
21 deletions
+33
-21
fuswim
fuswim
+33
-21
No files found.
fuswim
View file @
a0177509
...
@@ -73,7 +73,8 @@ def read_netconf(net):
...
@@ -73,7 +73,8 @@ def read_netconf(net):
'dhcp'
:
True
,
'dhcp'
:
True
,
'ip'
:
'192.168.42.42'
,
'ip'
:
'192.168.42.42'
,
'nmask'
:
'255.255.255.0'
,
'nmask'
:
'255.255.255.0'
,
'gw'
:
'192.168.42.1'
'gw'
:
'192.168.42.1'
,
'saved'
:
False
}
}
if
os
.
path
.
isfile
(
p
):
if
os
.
path
.
isfile
(
p
):
try
:
try
:
...
@@ -85,11 +86,12 @@ def read_netconf(net):
...
@@ -85,11 +86,12 @@ def read_netconf(net):
if
k
in
[
'auto'
,
'dhcp'
]:
if
k
in
[
'auto'
,
'dhcp'
]:
v
=
checkYN
(
v
)
v
=
checkYN
(
v
)
conf
[
k
]
=
v
conf
[
k
]
=
v
conf
[
'saved'
]
=
True
return
conf
return
conf
except
:
except
:
pass
pass
return
False
return
conf
def
kill_proc
(
name
,
ops
=
False
):
def
kill_proc
(
name
,
ops
=
False
):
...
@@ -169,9 +171,11 @@ for net in netw:
...
@@ -169,9 +171,11 @@ for net in netw:
print
(
'Here it is your fucking networks...:'
)
def
show_fuck_list
(
nets
):
i
=
0
print
(
'
\n
Here it is your fucking networks...:
\n
'
)
for
net
in
nets
.
keys
():
i
=
0
netind
=
{}
for
net
in
nets
.
keys
():
netconf
=
""
netconf
=
""
sig
=
nets
[
net
][
'Signal Level'
]
sig
=
nets
[
net
][
'Signal Level'
]
qual
=
nets
[
net
][
'Quality'
]
qual
=
nets
[
net
][
'Quality'
]
...
@@ -180,13 +184,21 @@ for net in nets.keys():
...
@@ -180,13 +184,21 @@ for net in nets.keys():
enc
=
nets
[
net
][
'Encryption'
]
enc
=
nets
[
net
][
'Encryption'
]
freq
=
nets
[
net
][
'Frequency'
]
freq
=
nets
[
net
][
'Frequency'
]
nconf
=
read_netconf
(
net
)
nconf
=
read_netconf
(
net
)
if
nconf
:
if
nconf
[
'saved'
]
:
nauto
=
'NO'
nauto
=
'NO'
if
nconf
[
'auto'
]:
if
nconf
[
'auto'
]:
nauto
=
'YES'
nauto
=
'YES'
netconf
=
"AUTO: "
+
nauto
+
", PRIO: "
+
str
(
nconf
[
'prio'
])
netconf
=
"AUTO: "
+
nauto
+
", PRIO: "
+
str
(
nconf
[
'prio'
])
print
(
" "
+
str
(
i
)
+
": "
+
colors
.
BLUE
+
net
+
colors
.
ENDC
+
" ("
+
sigcol
(
qual
)
+
"sig: "
+
sig
+
", qual: "
+
qual
+
", freq: "
+
freq
+
", enc: "
+
enc
+
colors
.
ENDC
+
") "
+
netconf
)
print
(
" "
+
str
(
i
)
+
": "
+
colors
.
BLUE
+
net
+
colors
.
ENDC
+
" ("
+
sigcol
(
qual
)
+
"sig: "
+
sig
+
", qual: "
+
qual
+
", freq: "
+
freq
+
", enc: "
+
enc
+
colors
.
ENDC
+
") "
+
netconf
)
netind
[
str
(
i
)]
=
nets
[
net
]
i
=
i
+
1
i
=
i
+
1
return
netind
netind
=
{}
fuck
=
"none"
while
fuck
not
in
netind
.
keys
()
and
fuck
.
lower
()
not
in
[
'e'
,
'R'
,
'q'
]:
netind
=
show_fuck_list
(
nets
)
fuck
=
input
(
"
\n
Choose a fucking one by index, or press E for edit, R to remove, Q to shit the hell out: "
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment