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
061e4106
Commit
061e4106
authored
3 years ago
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It's fucking working :D
parent
1a3c9514
master
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
fuswim
fuswim
+5
-4
No files found.
fuswim
View file @
061e4106
...
...
@@ -134,6 +134,7 @@ def read_netconf(net):
for
line
in
lines
:
if
":"
in
line
:
k
,
v
=
line
.
split
(
":"
,
1
)
v
=
v
.
replace
(
"
\n
"
,
""
)
if
k
in
[
'auto'
,
'dhcp'
]:
v
=
checkYN
(
v
)
if
k
==
'gw'
:
...
...
@@ -255,7 +256,7 @@ def insertNetwork(net):
pwd
=
input
(
"Enter the fucking PASSWORD: "
)
dhcp
=
checkYN
(
input
(
"Is this fucking wifi having a DHCP? <Y|n>: "
),
default
=
'Y'
)
errnum
=
0
net
[
'conf'
][
'psk'
]
=
pwd
net
[
'conf'
][
'psk'
]
=
pwd
.
replace
(
"
\n
"
,
""
)
net
[
'conf'
][
'dhcp'
]
=
dhcp
if
not
dhcp
:
ip
=
None
...
...
@@ -414,10 +415,10 @@ while not EXIT:
if
selected
[
'conf'
][
'dhcp'
]:
sh
(
"dhclient "
+
interface
)
else
:
sh
(
"ip address add "
+
selected
[
'conf'
][
'ip'
]
+
"/"
+
netmaskToBit
(
selected
[
'conf'
][
'nmask'
])
+
" dev "
+
interface
)
sh
(
"ip link set "
+
interface
+
" up"
)
sh
(
"ip address add "
+
selected
[
'conf'
][
'ip'
]
+
"/"
+
netmaskToBit
(
selected
[
'conf'
][
'nmask'
])
+
" dev "
+
interface
+
" > /dev/null 2>&1"
)
sh
(
"ip link set "
+
interface
+
" up
> /dev/null 2>&1
"
)
if
selected
[
'conf'
][
'gw'
]:
sh
(
"ip route add default via "
+
selected
[
'conf'
][
'gw'
]
+
" dev "
+
interface
)
sh
(
"ip route add default via "
+
selected
[
'conf'
][
'gw'
]
+
" dev "
+
interface
+
" > /dev/null 2>&1"
)
done
=
True
else
:
print_error
(
"FUCK, Are you asking me to connect but you didn't select successfully any network???"
)
...
...
This diff is collapsed.
Click to expand it.
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