@@ -0,0 +1,1171 @@
+#!/bin/env python%0A# A very simple python script to generate jboss/wildfly password hashes%0A# Requires a username, realm and password%0A#%0A# In jboss, these three are hashed as follows (from add-user.sh):%0A#   %22%0A#   By default the properties realm expects the entries to be in the format: -%0A#   username=HEX( MD5( username ':' realm ':' password))%0A#   %22%0A# This script does that, just using python%0A#%0A# No sanity checking etc is provided%0A# Author: Too embarrassed to put his/her name to this%0A# Reviewers: Please fix at your earliest convenience%0A# Date: 20180919%0A%0Aimport sys, hashlib%0A%0A# Rudementary help system%0Aif len(sys.argv) != 4 :%0A    print('Usage: ./jboss_pwd_hash.py username realm password')%0A    sys.exit()%0A%0A# Assign the positional parameters from 1 onwards to the variable 'triplet'%0Atriplet = ' '.join(sys.argv%5B1:%5D)%0A%0A# Replace the spaces in the variable with colons%0Atriplet = triplet.replace(%22 %22, %22:%22)%0A%0A# md5 our variable, then hex it%0Amd5sum = hashlib.md5(triplet).hexdigest()%0A%0A# Finally, print out what we've generated%0Aprint md5sum%0A%0A# The below is here for debugging/testing%0A#md5sum = hashlib.md5(%22testUserOne:ApplicationRealm:testPasswordOne%22).hexdigest(); print md5sum%0A

Create jboss_pwd_hash.py