소스 검색

corrected code requirements of review process

Joshua 7 년 전
부모
커밋
a1b19af7f4
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      code/ID2TLib/PortGenerator.py

+ 2 - 0
code/ID2TLib/PortGenerator.py

@@ -6,6 +6,8 @@ def gen_random_server_port(offset: int=2199):
     Generates a valid random first and last character for a bots hostname
     and computes a port from these two characters.
     The default offset is chosen from a Sality implementation in 2011
+    :param offest: default value, which is added to the two ASCII values
+    :return: sum of two ASCII characters and the default value
     """
     firstLetter = random.choice(string.ascii_letters);
     lastLetter = random.choice(string.ascii_letters + string.digits);