Skip to content

Generate Random Ports

Jens Keim edited this page Apr 15, 2019 · 1 revision

Introduction

The library function gen_random_server_port(offset: in=2199) in /ID2TLib/PortGenerator.py generates a random port, by computing the port number, which is assembled by the first and last character of a host name. The characters are chosen from a valid, synthetical generated computer name.

Input

  • offset: the default offset is a constant value and is chosen from a Sality implementation of 2011

Returns the calculated port number