|
47 | 47 | use Data::Dumper; |
48 | 48 | use Scalar::Util qw(tainted); |
49 | 49 |
|
50 | | -my $VERSION="0.8.8"; |
| 50 | +my $VERSION="0.8.9"; |
51 | 51 | my $verbose = 0; |
52 | 52 | my $debug = 0; |
53 | 53 | my $global_fail_limit = 1000; # no command line option yet |
@@ -928,7 +928,53 @@ sub get_user_details_from_rid { |
928 | 928 | print "[V] Attempting to get detailed user info with command: $command\n" if $verbose; |
929 | 929 | my $user_info = `$command`; |
930 | 930 | ($user_info) = $user_info =~ /([^\n]*User Name.*logon_hrs[^\n]*)/s; |
931 | | - print "$user_info\n\n" if defined($user_info); |
| 931 | + print "$user_info\n" if defined($user_info); |
| 932 | + my ($acb_info) = $user_info =~ /acb_info\s+:\s+0x([0-9a-fA-F]+)/; |
| 933 | + if ($acb_info) { |
| 934 | + my $acb_int = hex($acb_info); |
| 935 | + my $pad = "\t"; |
| 936 | + if ($acb_int & 0x00000001) { |
| 937 | + printf $pad . "%-25.25s: %s\n", "Account Disabled", "True"; |
| 938 | + } else { |
| 939 | + printf $pad . "%-25.25s: %s\n", "Account Disabled", "False"; |
| 940 | + } |
| 941 | + if ($acb_int & 0x00000200) { |
| 942 | + printf $pad . "%-25.25s: %s\n", "Password does not expire", "True"; |
| 943 | + } else { |
| 944 | + printf $pad . "%-25.25s: %s\n", "Password does not expire", "False"; |
| 945 | + } |
| 946 | + if ($acb_int & 0x00000400) { |
| 947 | + printf $pad . "%-25.25s: %s\n", "Account locked out", "True"; |
| 948 | + } else { |
| 949 | + printf $pad . "%-25.25s: %s\n", "Account locked out", "False"; |
| 950 | + } |
| 951 | + if ($acb_int & 0x00020000) { |
| 952 | + printf $pad . "%-25.25s: %s\n", "Password expired", "True"; |
| 953 | + } else { |
| 954 | + printf $pad . "%-25.25s: %s\n", "Password expired", "False"; |
| 955 | + } |
| 956 | + if ($acb_int & 0x00000040) { |
| 957 | + printf $pad . "%-25.25s: %s\n", "Interdomain trust account", "True"; |
| 958 | + } else { |
| 959 | + printf $pad . "%-25.25s: %s\n", "Interdomain trust account", "False"; |
| 960 | + } |
| 961 | + if ($acb_int & 0x00000080) { |
| 962 | + printf $pad . "%-25.25s: %s\n", "Workstation trust account", "True"; |
| 963 | + } else { |
| 964 | + printf $pad . "%-25.25s: %s\n", "Workstation trust account", "False"; |
| 965 | + } |
| 966 | + if ($acb_int & 0x00000100) { |
| 967 | + printf $pad . "%-25.25s: %s\n", "Server trust account", "True"; |
| 968 | + } else { |
| 969 | + printf $pad . "%-25.25s: %s\n", "Server trust account", "False"; |
| 970 | + } |
| 971 | + if ($acb_int & 0x00002000) { |
| 972 | + printf $pad . "%-25.25s: %s\n", "Trusted for delegation", "True"; |
| 973 | + } else { |
| 974 | + printf $pad . "%-25.25s: %s\n", "Trusted for delegation", "False"; |
| 975 | + } |
| 976 | + } |
| 977 | + print "\n"; |
932 | 978 | } |
933 | 979 |
|
934 | 980 | sub invalid_rid { |
|
0 commit comments