Files
claudetools/temp/compile_results.py
Mike Swanson fa15b03180 sync: Auto-sync from ACG-M-L5090 at 2026-03-10 19:11:00
Synced files:
- Quote wizard frontend (all components, hooks, types, config)
- API updates (config, models, routers, schemas, services)
- Client work (bg-builders, gurushow)
- Scripts (BGB Lesley termination, CIPP, Datto, migration)
- Temp files (Bardach contacts, VWP investigation, misc)
- Credentials and session logs
- Email service, PHP API, session logs

Machine: ACG-M-L5090
Timestamp: 2026-03-10 19:11:00

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 19:59:08 -07:00

44 lines
1.1 KiB
Python

import json
# Load sign-in data
signins = json.load(open('D:/ClaudeTools/temp/vwp_signins_raw.json')).get('value', [])
# Load existing results
try:
results = json.load(open('D:/ClaudeTools/temp/vwp_bec_results.json'))
except:
results = {}
# Add sign-in data
results['signins'] = signins
# Add sign-in summary
ips = {}
locations = {}
failed = 0
risky = 0
for s in signins:
ip = s.get('ipAddress', 'N/A')
loc = s.get('location', {})
country = loc.get('countryOrRegion', '?')
loc_str = f"{loc.get('city','?')}, {loc.get('state','?')}, {country}"
ips[ip] = ips.get(ip, 0) + 1
locations[loc_str] = locations.get(loc_str, 0) + 1
if s.get('status', {}).get('errorCode', 0) != 0:
failed += 1
if s.get('riskLevelDuringSignIn', 'none') not in ('none', 'low', None, ''):
risky += 1
results['signin_summary'] = {
'total': len(signins),
'failed': failed,
'risky': risky,
'unique_ips': len(ips),
'ips': ips,
'locations': locations
}
with open('D:/ClaudeTools/temp/vwp_bec_results.json', 'w') as f:
json.dump(results, f, indent=2, default=str)
print('Results compiled and saved.')