Forum Discussion

NisHera's avatar
NisHera
Valued Contributor
8 years ago
Solved

hashlib in python

When I run following in python gets nothing (empty log messages)

import requests, json, hashlib

def ABCD ():
  Log.Message("",hashlib.algorithms_available)
  Log.Message("",hashlib.algorithms_guaranteed)

dose that means no MD5 available?

there is no error on importing 

  • Hi,

     

    hashlib.algorithms_available and hashlib.algorithms_guaranteed returns a set of data. You should convert it to the string to post into the TC log:

     

    Log.Message("", str(hashlib.algorithms_available))

     

1 Reply

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    hashlib.algorithms_available and hashlib.algorithms_guaranteed returns a set of data. You should convert it to the string to post into the TC log:

     

    Log.Message("", str(hashlib.algorithms_available))