Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
routersploit
Overview
Overview
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
czos-dpend
routersploit
Commits
5e1b7853
Commit
5e1b7853
authored
Apr 29, 2016
by
fwkz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing unwanted characters during color print
parent
37840f39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
utils.py
routersploit/utils.py
+5
-5
No files found.
routersploit/utils.py
View file @
5e1b7853
...
...
@@ -166,23 +166,23 @@ def __cprint(*args, **kwargs):
file_
=
kwargs
.
get
(
'file'
,
sys
.
stdout
)
sep
=
kwargs
.
get
(
'sep'
,
' '
)
end
=
kwargs
.
get
(
'end'
,
'
\n
'
)
print
(
'
\0
01\033
[{}m
\002
'
.
format
(
colors
[
color
]),
end
=
''
,
file
=
file_
,
sep
=
sep
)
print
(
'
\0
33
[{}m
'
.
format
(
colors
[
color
]),
end
=
''
,
file
=
file_
,
sep
=
sep
)
print
(
*
args
,
end
=
''
,
file
=
file_
,
sep
=
sep
)
# TODO printing text that starts from newline
print
(
'
\0
01\033
[0m
\002
'
,
sep
=
sep
,
end
=
end
,
file
=
file_
)
print
(
'
\0
33
[0m
'
,
sep
=
sep
,
end
=
end
,
file
=
file_
)
else
:
print
(
*
args
,
**
kwargs
)
def
print_error
(
*
args
,
**
kwargs
):
__cprint
(
'
\0
01\033
[91m
\002
[-]
\001\033
[0m
\002
'
,
*
args
,
**
kwargs
)
__cprint
(
'
\0
33
[91m[-]
\033
[0m
'
,
*
args
,
**
kwargs
)
def
print_status
(
*
args
,
**
kwargs
):
__cprint
(
'
\0
01\033
[94m
\002
[*]
\001\033
[0m
\002
'
,
*
args
,
**
kwargs
)
__cprint
(
'
\0
33
[94m[*]
\033
[0m
'
,
*
args
,
**
kwargs
)
def
print_success
(
*
args
,
**
kwargs
):
__cprint
(
'
\0
01\033
[92m
\002
[+]
\001\033
[0m
\002
'
,
*
args
,
**
kwargs
)
__cprint
(
'
\0
33
[92m[+]
\033
[0m
'
,
*
args
,
**
kwargs
)
def
print_info
(
*
args
,
**
kwargs
):
...
...
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