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

Update main.py #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
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
14 changes: 7 additions & 7 deletions python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from Crypto.PublicKey import DSA
from socket import socket, AF_INET, SOCK_STREAM, SOCK_NONBLOCK

# Set a file write by others.
temp_file = "/tmp/foo.txt"
# Set a file write by others. another comment
temp_file = "/tmp/foo.txt" # comment another comment
os.chmod(temp_file, stat.S_IWOTH)

with open(temp_file, 'r') as f:
Expand All @@ -24,27 +24,27 @@
key_size=KEY_SIZE,
)


# comment
private_dsa_key_2 = DSA.generate(bits=KEY_SIZE)

assert(private_dsa_key_2 == private_dsa_key)

# comment
program = 'a = 5\nb=10\nprint("Sum =", a+b)'
exec(program)


# comment
def is_real_user(user="user123", password="Password1"):
return True


# comment
sock = socket(
AF_INET,
SOCK_STREAM | SOCK_NONBLOCK)

# Bind the socket to the internet with a port number
sock.bind(("::", 32007))


# comment
def add_server_port(sg, server_name, port):
server = _get_server(sg, server_name, port)
if server is not None:
Expand Down