pfSense_API

Automate your pfSense management (by masters274)

pfSense_API Alternatives

Similar projects and alternatives to pfSense_API

  • platform-compat

    Discontinued Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better pfSense_API alternative or higher similarity.

pfSense_API reviews and mentions

Posts with mentions or reviews of pfSense_API. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-18.
  • pfSense configuration backup
    2 projects | /r/PowerShell | 18 Jun 2022
    <# .Synopsis Get pfSense configuration .DESCRIPTION Get a copy of pfsense configuration XML file. .EXAMPLE $splat = @{ Uri = 'https://30.20.10.0:54321' Username = 'admin' Password = 'pfsense' } $session = Connect-PfSense @splat Get-PfSenseConfig -Session $session .EXAMPLE # You can pipe both commands to save you some typing $splat = @{ Uri = 'https://30.20.10.0:54321' Username = 'admin' Password = 'pfsense' } Connect-PfSense @splat | Get-PfSenseConfig .EXAMPLE # If you want to save the file with filename supplied by pfSense $splat = @{ Uri = 'https://30.20.10.0:54321' Username = 'admin' Password = 'pfsense' } Connect-PfSense @splat -SkipCertificateCheck | Get-PfSenseConfig -Object | % { $_.config | Set-Content $_.filename } .INPUTS Session object from Connect-PfSense .OUTPUTS String .NOTES Based on the work of Chris, https://github.com/masters274/pfSense_API MIT license. Author: poshftw, 2022 #> function Get-PfSenseConfig { [CmdletBinding()] [Alias()] [OutputType([string])] Param ( # Session object from Connect-PfSense [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)] $Session, # Output as an object @{FileName, Config} [switch]$Object ) $wrUri = '{0}/diag_backup.php' -f $Session.Uri $webRequestSplat = @{ ErrorAction = 'Stop' } if ($Session.SkipCertificateCheck) { $webRequestSplat.Add('SkipCertificateCheck', $true) } try { $request = Invoke-WebRequest -Uri $wruri -Method Get -WebSession $Session.Session @webRequestSplat $Body = @{ __csrf_magic = $request.InputFields[0].Value donotbackuprrd = 'yes' download = 'Download configuration as XML' } $request = Invoke-WebRequest -Uri $wrUri -Method Post -Body $Body -WebSession $Session.Session @webRequestSplat # check received data if ($request.Headers['Content-Type'] -match 'application/octet-stream') { # pfsense supplies filename by itself # but dear Redmond, why do we need those ugly join hacks? $null = $request.Headers['Content-Disposition'] -join '' -match 'filename=(?.+\.xml)' $filename = $Matches['filename'] #convert from bytes $Encoder = [System.Text.Encoding]::ASCII $Config = $Encoder.GetString($request.Content) if ($Object) { [PSCustomObject][ordered]@{ Filename = $filename Config = $Config } } else{ $Config } } elseif ($request.Headers['Content-Type'] -match 'html') { $thisErrorMessage = ("Operation failed, probably wrong credentials: {0}" -f $Error[0]) } else { $thisErrorMessage = ("Unknown error has occured: {0}" -f $Error[0]) } } catch { $Error[0] Write-Error -Message $thisErrorMessage } }

Stats

Basic pfSense_API repo stats
1
9
5.7
4 months ago

masters274/pfSense_API is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of pfSense_API is PowerShell.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com