For anyone else who is having issues with this if you want to run custom LDAP queries with windapsearch.py like in the OP you need to use the --custom flag, not -s. Also, the OP’s custom query will return the user that has those attributes set, but to get the decimal value bitmask for the two properties just add the final number in each half of the query.