Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改newclinet-py3.py,适配linux(WSL) #24

Merged
merged 2 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[submodule "dr-jlu-win32"]
path = dr-jlu-win32
url = https://github.com/ImFengLala/dr-jlu-win32
[submodule "jlu-drcom-csharp"]
path = jlu-drcom-csharp

[submodule "jlu-drcom-dotnet"]
path = jlu-drcom-dotnet
url = https://github.com/leviolet/DrcomDotnet
1 change: 0 additions & 1 deletion jlu-drcom-csharp
Submodule jlu-drcom-csharp deleted from 6100d7
1 change: 1 addition & 0 deletions jlu-drcom-dotnet
Submodule jlu-drcom-dotnet added at 6466fe
5 changes: 3 additions & 2 deletions jlu-drcom-py3/newclinet-py3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# coding: utf-8
# license: AGPL-V3
# tested: Windows 10, WSL 1

import re
import socket
Expand Down Expand Up @@ -87,7 +88,7 @@ def log(*args, **kwargs):
print(*args, **kwargs)
if DEBUG and platform.uname().system != 'Windows':
with open(LOG_PATH,'a') as f:
f.write(s + '\n')
f.write(str(s) + '\n')


def challenge(svr, ran):
Expand Down Expand Up @@ -370,7 +371,7 @@ def daemon():
def main():
if not IS_TEST:
daemon()
execfile(CONF, globals())
exec(open(CONF).read(), globals())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用with open

log("auth svr:", server, "\nusername:", username ,
"\npassword:", password, "\nmac:", str(hex(mac)))
log(bind_ip)
Expand Down