PyADRecon 0.13.6__tar.gz → 0.13.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/CHANGELOG.md +7 -7
  2. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PKG-INFO +1 -1
  3. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/PKG-INFO +1 -1
  4. pyadrecon-0.13.7/PyADRecon.egg-info/scm_version.json +8 -0
  5. pyadrecon-0.13.7/package.json +3 -0
  6. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/pyadrecon.py +238 -3
  7. pyadrecon-0.13.6/PyADRecon.egg-info/scm_version.json +0 -8
  8. pyadrecon-0.13.6/package.json +0 -3
  9. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.dockerignore +0 -0
  10. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/FUNDING.yml +0 -0
  11. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  12. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  13. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/pyadrecon.png +0 -0
  14. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/workflows/conventional-commits.yml +0 -0
  15. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.github/workflows/pypi.yml +0 -0
  16. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/.gitignore +0 -0
  17. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/Dockerfile +0 -0
  18. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/LICENSE +0 -0
  19. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/SOURCES.txt +0 -0
  20. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/dependency_links.txt +0 -0
  21. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/entry_points.txt +0 -0
  22. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/requires.txt +0 -0
  23. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/scm_file_list.json +0 -0
  24. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/PyADRecon.egg-info/top_level.txt +0 -0
  25. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/README.md +0 -0
  26. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/dashboard_generator.py +0 -0
  27. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/pyproject.toml +0 -0
  28. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/requirements.txt +0 -0
  29. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/setup.cfg +0 -0
  30. {pyadrecon-0.13.6 → pyadrecon-0.13.7}/windows/README.md +0 -0
@@ -1,3 +1,10 @@
1
+ ## [0.13.7](https://github.com/l4rm4nd/PyADRecon/compare/v0.13.6...v0.13.7) (2026-07-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add eol to computers and stats ([50a4fb0](https://github.com/l4rm4nd/PyADRecon/commit/50a4fb09c48155bab03bc880cc7e93a3bdbf29bc))
7
+
1
8
  ## [0.13.6](https://github.com/l4rm4nd/PyADRecon/compare/v0.13.5...v0.13.6) (2026-07-09)
2
9
 
3
10
 
@@ -26,10 +33,3 @@
26
33
 
27
34
  * add EOL systemd detection ([81bdb7f](https://github.com/l4rm4nd/PyADRecon/commit/81bdb7f516a3023af08b7cab2be3b6242d68c174))
28
35
 
29
- ## [0.13.2](https://github.com/l4rm4nd/PyADRecon/compare/v0.13.1...v0.13.2) (2026-02-22)
30
-
31
-
32
- ### Bug Fixes
33
-
34
- * rework Foreign Security Principals in Privileged Groups ([50fe76e](https://github.com/l4rm4nd/PyADRecon/commit/50fe76e8674a79a84678947fde3d488a73e2f383))
35
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyADRecon
3
- Version: 0.13.6
3
+ Version: 0.13.7
4
4
  Summary: Python Active Directory Reconnaissance Tool (ADRecon port) with NTLM and Kerberos support.
5
5
  Author: LRVT
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyADRecon
3
- Version: 0.13.6
3
+ Version: 0.13.7
4
4
  Summary: Python Active Directory Reconnaissance Tool (ADRecon port) with NTLM and Kerberos support.
5
5
  Author: LRVT
6
6
  License-Expression: MIT
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.13.7",
3
+ "distance": 0,
4
+ "node": "g8654e54d541c0a3aede726f84523447c542e2cb6",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-07-10"
8
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "version": "0.13.7"
3
+ }
@@ -1,4 +1,3 @@
1
-
2
1
  #!/usr/bin/env python3
3
2
  """
4
3
  PyADRecon - Python Active Directory Reconnaissance Tool
@@ -104,7 +103,7 @@ if not KERBEROS_AVAILABLE:
104
103
 
105
104
 
106
105
  # Constants
107
- VERSION = "v0.13.6" # Automatically updated by CI/CD pipeline during release
106
+ VERSION = "v0.13.7" # Automatically updated by CI/CD pipeline during release
108
107
  BANNER = f"""
109
108
  ╔═════════════════════════════════════════════════════════
110
109
  ║ PyADRecon {VERSION} - Python AD Reconnaissance Tool
@@ -605,6 +604,179 @@ def calculate_user_stats(users_data: List[Dict], password_age_days: int = 180, d
605
604
  return stats
606
605
 
607
606
 
607
+ def get_os_eol_info(os_string: str) -> Dict[str, Any]:
608
+ """Return EOL status, EOL date, and days until/since EOL for a given OS string.
609
+
610
+ Returns a dict with keys: 'EOL Status', 'EOL Date', 'EOL Days Until/Since'.
611
+ All values are empty strings when the OS is not recognized.
612
+ """
613
+ BUILD_MAPPING = {
614
+ # Windows 11 builds
615
+ '22000': '21H2',
616
+ '22621': '22H2',
617
+ '22631': '23H2',
618
+ '26100': '24H2',
619
+ '26200': '25H2',
620
+ '28000': '26H1',
621
+ # Windows 10 builds
622
+ '10240': '1507',
623
+ '10586': '1511',
624
+ '14393': '1607',
625
+ '15063': '1703',
626
+ '16299': '1709',
627
+ '17134': '1803',
628
+ '17763': '1809',
629
+ '18362': '1903',
630
+ '18363': '1909',
631
+ '19041': '2004',
632
+ '19042': '20H2',
633
+ '19043': '21H1',
634
+ '19044': '21H2',
635
+ '19045': '22H2',
636
+ }
637
+
638
+ EOL_DATABASE = {
639
+ 'Server 2003': {'securityEnd': '2015-07-14'},
640
+ 'Server 2008': {'securityEnd': '2020-01-14'},
641
+ 'Server 2008 R2': {'securityEnd': '2020-01-14'},
642
+ 'Server 2012': {'securityEnd': '2023-10-10'},
643
+ 'Server 2012 R2': {'securityEnd': '2023-10-10'},
644
+ 'Server 2016': {'securityEnd': '2027-01-12'},
645
+ 'Server 2019': {'securityEnd': '2029-01-09'},
646
+ 'Server 2022': {'securityEnd': '2031-10-14'},
647
+ 'Server 2025': {'securityEnd': '2034-10-10'},
648
+ 'XP': {'securityEnd': '2014-04-08'},
649
+ 'Vista': {'securityEnd': '2017-04-11'},
650
+ '7': {'securityEnd': '2020-01-14'},
651
+ '8': {'securityEnd': '2016-01-12'},
652
+ '8.1': {'securityEnd': '2023-01-10'},
653
+ '10-1507': {'securityEnd': '2025-10-14'},
654
+ '10-1507-E-LTSC': {'securityEnd': '2025-10-14'},
655
+ '10-1511': {'securityEnd': '2017-10-10'},
656
+ '10-1607': {'securityEnd': '2026-10-13'},
657
+ '10-1607-E-LTSC': {'securityEnd': '2026-10-13'},
658
+ '10-1703': {'securityEnd': '2019-10-08'},
659
+ '10-1709': {'securityEnd': '2020-10-13'},
660
+ '10-1803': {'securityEnd': '2021-05-11'},
661
+ '10-1809': {'securityEnd': '2021-05-11'},
662
+ '10-1809-E-LTSC': {'securityEnd': '2029-01-09'},
663
+ '10-1903': {'securityEnd': '2020-12-08'},
664
+ '10-1909': {'securityEnd': '2022-05-10'},
665
+ '10-2004': {'securityEnd': '2021-12-14'},
666
+ '10-20H2': {'securityEnd': '2023-05-09'},
667
+ '10-21H1': {'securityEnd': '2022-12-13'},
668
+ '10-21H2': {'securityEnd': '2024-06-11'},
669
+ '10-21H2-E-LTSC': {'securityEnd': '2027-01-12'},
670
+ '10-22H2': {'securityEnd': '2025-10-14'},
671
+ '11-21H2-Pro': {'securityEnd': '2023-10-10'},
672
+ '11-21H2-Enterprise': {'securityEnd': '2024-10-08'},
673
+ '11-22H2-Pro': {'securityEnd': '2024-10-08'},
674
+ '11-22H2-Enterprise': {'securityEnd': '2025-10-14'},
675
+ '11-23H2-Pro': {'securityEnd': '2025-11-11'},
676
+ '11-23H2-Enterprise': {'securityEnd': '2026-11-10'},
677
+ '11-24H2-Pro': {'securityEnd': '2026-10-13'},
678
+ '11-24H2-Enterprise': {'securityEnd': '2027-10-12'},
679
+ '11-25H2-Pro': {'securityEnd': '2027-10-12'},
680
+ '11-25H2-Enterprise': {'securityEnd': '2028-10-10'},
681
+ 'Ubuntu 16.04': {'securityEnd': '2021-04-02'},
682
+ 'Ubuntu 18.04': {'securityEnd': '2023-05-31'},
683
+ 'Ubuntu 20.04': {'securityEnd': '2025-05-31'},
684
+ 'Ubuntu 22.04': {'securityEnd': '2027-04-01'},
685
+ 'Debian 9': {'securityEnd': '2020-07-18'},
686
+ 'Debian 10': {'securityEnd': '2022-09-10'},
687
+ 'Debian 11': {'securityEnd': '2024-08-14'},
688
+ 'Debian 12': {'securityEnd': '2026-06-10'},
689
+ }
690
+
691
+ empty = {'EOL Status': '', 'EOL Date': '', 'EOL Days Until/Since': ''}
692
+
693
+ if not os_string:
694
+ return empty
695
+
696
+ build_match = re.search(r'\((\d{5})\)', os_string)
697
+ build_number = build_match.group(1) if build_match else None
698
+ version = BUILD_MAPPING.get(build_number) if build_number else None
699
+
700
+ eol_key = None
701
+
702
+ if re.search(r'Windows Server 2003', os_string, re.IGNORECASE):
703
+ eol_key = 'Server 2003'
704
+ elif re.search(r'Windows Server 2008 R2', os_string, re.IGNORECASE):
705
+ eol_key = 'Server 2008 R2'
706
+ elif re.search(r'Windows Server 2008(?! R2)', os_string, re.IGNORECASE):
707
+ eol_key = 'Server 2008'
708
+ elif re.search(r'Windows Server 2012 R2', os_string, re.IGNORECASE):
709
+ eol_key = 'Server 2012 R2'
710
+ elif re.search(r'Windows Server 2012(?! R2)', os_string, re.IGNORECASE):
711
+ eol_key = 'Server 2012'
712
+ elif re.search(r'Windows Server 2016', os_string, re.IGNORECASE):
713
+ eol_key = 'Server 2016'
714
+ elif re.search(r'Windows Server 2019', os_string, re.IGNORECASE):
715
+ eol_key = 'Server 2019'
716
+ elif re.search(r'Windows Server 2022', os_string, re.IGNORECASE):
717
+ eol_key = 'Server 2022'
718
+ elif re.search(r'Windows Server 2025', os_string, re.IGNORECASE):
719
+ eol_key = 'Server 2025'
720
+ elif re.search(r'Windows 11', os_string, re.IGNORECASE) and version:
721
+ is_enterprise = bool(re.search(r'Enterprise', os_string, re.IGNORECASE))
722
+ edition = 'Enterprise' if is_enterprise else 'Pro'
723
+ eol_key = f'11-{version}-{edition}'
724
+ elif re.search(r'Windows 10', os_string, re.IGNORECASE) and version:
725
+ is_enterprise = bool(re.search(r'Enterprise', os_string, re.IGNORECASE))
726
+ is_ltsc = bool(re.search(r'LTSC', os_string, re.IGNORECASE))
727
+ eol_key = f'10-{version}-E-LTSC' if (is_enterprise and is_ltsc) else f'10-{version}'
728
+ elif re.search(r'Windows XP', os_string, re.IGNORECASE):
729
+ eol_key = 'XP'
730
+ elif re.search(r'Windows Vista', os_string, re.IGNORECASE):
731
+ eol_key = 'Vista'
732
+ elif re.search(r'Windows 7', os_string, re.IGNORECASE):
733
+ eol_key = '7'
734
+ elif re.search(r'Windows 8\.1', os_string, re.IGNORECASE):
735
+ eol_key = '8.1'
736
+ elif re.search(r'Windows 8(?!\.1)', os_string, re.IGNORECASE):
737
+ eol_key = '8'
738
+ elif re.search(r'Ubuntu.*16\.04', os_string, re.IGNORECASE):
739
+ eol_key = 'Ubuntu 16.04'
740
+ elif re.search(r'Ubuntu.*18\.04', os_string, re.IGNORECASE):
741
+ eol_key = 'Ubuntu 18.04'
742
+ elif re.search(r'Ubuntu.*20\.04', os_string, re.IGNORECASE):
743
+ eol_key = 'Ubuntu 20.04'
744
+ elif re.search(r'Ubuntu.*22\.04', os_string, re.IGNORECASE):
745
+ eol_key = 'Ubuntu 22.04'
746
+ elif re.search(r'Debian.*9', os_string, re.IGNORECASE):
747
+ eol_key = 'Debian 9'
748
+ elif re.search(r'Debian.*10', os_string, re.IGNORECASE):
749
+ eol_key = 'Debian 10'
750
+ elif re.search(r'Debian.*11', os_string, re.IGNORECASE):
751
+ eol_key = 'Debian 11'
752
+ elif re.search(r'Debian.*12', os_string, re.IGNORECASE):
753
+ eol_key = 'Debian 12'
754
+
755
+ if eol_key is None or eol_key not in EOL_DATABASE:
756
+ return empty
757
+
758
+ security_end_str = EOL_DATABASE[eol_key]['securityEnd']
759
+ security_end = datetime.strptime(security_end_str, '%Y-%m-%d')
760
+ now = datetime.now()
761
+ twelve_months_from_now = now + timedelta(days=365)
762
+
763
+ if now > security_end:
764
+ eol_status = 'EoL'
765
+ days_diff = (now - security_end).days
766
+ elif security_end <= twelve_months_from_now:
767
+ eol_status = 'Soon EoL'
768
+ days_diff = -((security_end - now).days)
769
+ else:
770
+ eol_status = 'Supported'
771
+ days_diff = -((security_end - now).days)
772
+
773
+ return {
774
+ 'EOL Status': eol_status,
775
+ 'EOL Date': security_end_str,
776
+ 'EOL Days Until/Since': days_diff,
777
+ }
778
+
779
+
608
780
  def calculate_computer_stats(computers_data: List[Dict], laps_data: List[Dict] = None, password_age_days: int = 30, dormant_days: int = 90) -> Dict[str, Any]:
609
781
  """Calculate computer account statistics for the Computer Stats tab."""
610
782
  if not computers_data:
@@ -3081,6 +3253,8 @@ class PyADRecon:
3081
3253
  ipv4_address = hostname_to_ip.get(hostname_part, '')
3082
3254
  ipv6_address = hostname_to_ipv6.get(hostname_part, '')
3083
3255
 
3256
+ eol_info = get_os_eol_info(os_full)
3257
+
3084
3258
  results.append({
3085
3259
  "UserName": get_attr(entry, 'sAMAccountName', ''),
3086
3260
  "Name": get_attr(entry, 'name', ''),
@@ -3089,6 +3263,9 @@ class PyADRecon:
3089
3263
  "IPv4Address": ipv4_address,
3090
3264
  "IPv6Address": ipv6_address,
3091
3265
  "Operating System": os_full,
3266
+ "EOL Status": eol_info['EOL Status'],
3267
+ "EOL Date": eol_info['EOL Date'],
3268
+ "EOL Days Until/Since": eol_info['EOL Days Until/Since'],
3092
3269
  "Logon Age (days)": logon_age_days,
3093
3270
  "Password Age (days)": pwd_age_days,
3094
3271
  f"Dormant (> {self.config.dormant_days} days)": dormant,
@@ -5594,6 +5771,7 @@ class PyADRecon:
5594
5771
  # Critical security issues (RED)
5595
5772
  red_columns = {
5596
5773
  "Delegation Type": ("Unconstrained", "Unconstrained"),
5774
+ "EOL Status": ("EoL", "EoL"),
5597
5775
  }
5598
5776
 
5599
5777
  # Medium security issues (ORANGE)
@@ -5640,6 +5818,21 @@ class PyADRecon:
5640
5818
  if cell.value in [True, "TRUE"]:
5641
5819
  cell.fill = yellow_fill
5642
5820
 
5821
+ # EOL Status: Soon EoL — orange if < 180 days until EoL, yellow otherwise
5822
+ if "EOL Status" in headers and "EOL Days Until/Since" in headers:
5823
+ eol_status_cell = ws.cell(row=row_idx, column=headers["EOL Status"])
5824
+ if eol_status_cell.value == "Soon EoL":
5825
+ days_cell = ws.cell(row=row_idx, column=headers["EOL Days Until/Since"])
5826
+ try:
5827
+ days_val = int(days_cell.value)
5828
+ except (TypeError, ValueError):
5829
+ days_val = None
5830
+ # days_val is negative (future) for Soon EoL; abs < 180 → orange
5831
+ if days_val is not None and abs(days_val) < 180:
5832
+ eol_status_cell.fill = orange_fill
5833
+ else:
5834
+ eol_status_cell.fill = yellow_fill
5835
+
5643
5836
  # Special: Gray out entire row for disabled computers (after other formatting)
5644
5837
  if is_disabled:
5645
5838
  gray_fill = PatternFill(start_color="E0E0E0", end_color="E0E0E0", fill_type="solid")
@@ -6458,7 +6651,28 @@ class PyADRecon:
6458
6651
  cat_total,
6459
6652
  total_pct
6460
6653
  ])
6461
-
6654
+
6655
+ # EOL Summary section
6656
+ computer_stats_ws.append([])
6657
+ eol_heading_cell = WriteOnlyCell(computer_stats_ws, value="EOL Summary")
6658
+ eol_heading_cell.font = Font(bold=True, size=12)
6659
+ computer_stats_ws.append([eol_heading_cell])
6660
+ computer_stats_ws.append([])
6661
+
6662
+ eol_header_row = []
6663
+ for header in ["EOL Status", "Count", "Percentage"]:
6664
+ cell = WriteOnlyCell(computer_stats_ws, value=header)
6665
+ cell.font = header_font
6666
+ cell.fill = header_fill
6667
+ cell.alignment = left_alignment
6668
+ eol_header_row.append(cell)
6669
+ computer_stats_ws.append(eol_header_row)
6670
+
6671
+ eol_stats = computer_stats.get('eol_stats', {})
6672
+ for label, count in eol_stats.items():
6673
+ pct = f"{(count / total_count * 100):.1f}%" if total_count > 0 else "0.0%"
6674
+ computer_stats_ws.append([label, count, pct])
6675
+
6462
6676
  # Order sheets according to SHEET_ORDER, then add any remaining
6463
6677
  # (excluding AboutPyADRecon since it was already created first)
6464
6678
  ordered_names = []
@@ -7036,6 +7250,27 @@ def generate_excel_from_csv(csv_dir: str, output_file: str = None):
7036
7250
  total_pct
7037
7251
  ])
7038
7252
 
7253
+ # EOL Summary section
7254
+ computer_stats_ws.append([])
7255
+ eol_heading_cell = WriteOnlyCell(computer_stats_ws, value="EOL Summary")
7256
+ eol_heading_cell.font = Font(bold=True, size=12)
7257
+ computer_stats_ws.append([eol_heading_cell])
7258
+ computer_stats_ws.append([])
7259
+
7260
+ eol_header_row = []
7261
+ for header in ["EOL Status", "Count", "Percentage"]:
7262
+ cell = WriteOnlyCell(computer_stats_ws, value=header)
7263
+ cell.font = header_font
7264
+ cell.fill = header_fill
7265
+ cell.alignment = left_alignment
7266
+ eol_header_row.append(cell)
7267
+ computer_stats_ws.append(eol_header_row)
7268
+
7269
+ eol_stats = computer_stats.get('eol_stats', {})
7270
+ for label, count in eol_stats.items():
7271
+ pct = f"{(count / total_count * 100):.1f}%" if total_count > 0 else "0.0%"
7272
+ computer_stats_ws.append([label, count, pct])
7273
+
7039
7274
  # Process each CSV file (excluding AboutPyADRecon as it was already created)
7040
7275
  remaining_csv_files = [f for f in csv_files if f != 'AboutPyADRecon.csv']
7041
7276
  total_files = len(remaining_csv_files)
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.13.6",
3
- "distance": 0,
4
- "node": "g1368450e6959273d1c70e123a482a34eba76c542",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-07-09"
8
- }
@@ -1,3 +0,0 @@
1
- {
2
- "version": "0.13.6"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes