|
@@ -295,14 +295,18 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
'''
|
|
|
ids = sorted(bot_configs.keys())
|
|
|
for pos,bot in enumerate(ids):
|
|
|
- #print(type(bot_configs))
|
|
|
- # Set TTL based on TTL distribution of IP address
|
|
|
- bot_ttl_dist = self.statistics.get_ttl_distribution(bot_configs[bot]["IP"])
|
|
|
- if len(bot_ttl_dist) > 0:
|
|
|
- source_ttl_prob_dict = Lea.fromValFreqsDict(bot_ttl_dist)
|
|
|
- bot_configs[bot]["TTL"] = source_ttl_prob_dict.random()
|
|
|
- else:
|
|
|
- bot_configs[bot]["TTL"] = self.statistics.process_db_query("most_used(ttlValue)")
|
|
|
+ bot_type = bot_configs[bot]["Type"]
|
|
|
+ print(bot_type)
|
|
|
+ if(bot_type == "local"): # Set fix TTL for local Bots
|
|
|
+ bot_configs[bot]["TTL"] = 128
|
|
|
+ # Set TTL based on TTL distribution of IP address
|
|
|
+ else: # Set varying TTl for external Bots
|
|
|
+ bot_ttl_dist = self.statistics.get_ttl_distribution(bot_configs[bot]["IP"])
|
|
|
+ if len(bot_ttl_dist) > 0:
|
|
|
+ source_ttl_prob_dict = Lea.fromValFreqsDict(bot_ttl_dist)
|
|
|
+ bot_configs[bot]["TTL"] = source_ttl_prob_dict.random()
|
|
|
+ else:
|
|
|
+ bot_configs[bot]["TTL"] = self.statistics.process_db_query("most_used(ttlValue)")
|
|
|
|
|
|
|
|
|
# parse input CSV or XML
|