Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure Agent

This agent collects PC information and sends it to a server via API.

Features

  • Collects detailed PC information (OS, CPU, RAM, disk, network, etc.)
  • Sends data to server via API
  • Supports both development and production servers
  • Displays icon in taskbar when run manually
  • Runs in continuous mode to collect and send information periodically
  • Provides user-friendly and consistent system information formatting

Requirements

  • Python 3.6 or higher (for running from source)
  • Windows OS (for full functionality)

Usage

Basic usage

python main.py

Specify server

python main.py --server http://localhost:3001

Run hidden (no taskbar icon)

python main.py --hidden

Run continuously with taskbar icon

python main.py --run-continuous

How It Works

The agent is designed to run manually when needed. It can operate in two modes:

  1. Single Run Mode: Collects information once and exits
  2. Continuous Mode: Runs continuously, collecting and sending information every 6 hours

The agent will:

  • Collect PC information (OS, CPU, RAM, disk, network, etc.)
  • Send data to the configured server
  • Display an icon in the taskbar when running in continuous mode

API Endpoints

  • Development server: http://localhost:3001/api/agent
  • Production server: https://10.1.32.66/api/agent

Collected Information

The agent collects the following information:

  • PC name
  • User name
  • IP address
  • MAC address
  • CPU model and specifications (formatted for user-friendliness)
  • RAM size
  • Operating system details (formatted for consistency)
  • Disk information (SSD/HDD detection)
  • Office installation information (prioritizes actual Office products over runtime components)

Improvements for User-Friendly Information

The agent now formats system information to be more user-friendly and consistent:

CPU Information

  • Technical processor strings like "Intel64 Family 6 Model 60 Stepping 3 GenuineIntel" are formatted to more readable forms
  • Common processor names are extracted and presented clearly
  • Excessive technical details are removed while preserving essential information

OS Information

  • Operating system details are formatted consistently
  • Build numbers and architecture information are presented in a standardized format
  • Windows 11 is correctly identified based on build numbers

Office Information

  • Prioritizes actual Office products over runtime components
  • Excludes Visual Studio Tools for Office Runtime and similar non-Office components
  • Sorts results by version priority (365/2021 > 2019 > 2016 > 2013 > 2010)

Configuration

The agent uses a config.json file for configuration, including server URLs and authentication credentials.

Default credentials:

You can modify these in the config.json file.

Logging

The agent creates a log file agent.log in the same directory.

Build

To build the package:

python build_package.py --build --package

Clean up build artifacts

If you're having trouble deleting the package folder, use one of these cleanup methods:

Method 1: Batch script (Windows)

cleanup.bat

Method 2: Python script

python cleanup.py

Method 3: PowerShell script (most effective)

powershell -ExecutionPolicy Bypass -File force_delete.ps1

Kill running agent

taskkill /f /im InfraAgent.exe

About

this repo are Infra-Agent

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages