Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.4 #268

Merged
merged 114 commits into from
Jan 17, 2023
Merged

2.2.4 #268

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a110670
Update PSFalcon.psd1
bk-cs Oct 31, 2022
e65e861
Removed blank lines
bk-cs Nov 7, 2022
22ff717
Update psf-output.ps1
bk-cs Nov 8, 2022
ca6d9c5
Update psf-real-time-response.ps1
bk-cs Nov 10, 2022
dad5b81
Update user-management.ps1
bk-cs Nov 14, 2022
cb479f8
Update user-management.ps1
bk-cs Nov 14, 2022
ecce799
Update psf-policies.ps1
bk-cs Nov 14, 2022
4de75e2
Issue #256: Removed type definition when creating build tag variables…
bk-cs Nov 15, 2022
cdf0595
Delete mobile-enrollment.ps1
bk-cs Nov 17, 2022
650eeec
Create enrollments.ps1
bk-cs Nov 17, 2022
adcca7b
Update linux.json
bk-cs Nov 18, 2022
14e4b39
Update mac.json
bk-cs Nov 18, 2022
875ade2
Update windows.json
bk-cs Nov 18, 2022
b169dfd
Update enrollments.ps1
bk-cs Nov 21, 2022
a486242
Update linux.json
bk-cs Nov 22, 2022
e839e45
Update mac.json
bk-cs Nov 22, 2022
1cfa7bc
Update windows.json
bk-cs Nov 22, 2022
179a1e6
Reorganzied ValueFromPipeline
bk-cs Nov 22, 2022
c2b4b5f
Update policy-sensor-update.ps1
bk-cs Nov 23, 2022
e559f6a
Update intel.ps1
bk-cs Nov 28, 2022
62f4959
Update ioa.ps1
bk-cs Nov 28, 2022
1a93dd3
Update message-center.ps1
bk-cs Nov 28, 2022
e5d3da6
Update recon.ps1
bk-cs Nov 28, 2022
0337a41
Update iocs.ps1
bk-cs Nov 28, 2022
7071db0
Create settings-discover.ps1
bk-cs Nov 28, 2022
ce4c5dc
Update user-management.ps1
bk-cs Nov 28, 2022
be71790
Update cloud-connect-aws.ps1
bk-cs Nov 28, 2022
ae2310e
Update psf-devices.ps1
bk-cs Nov 29, 2022
30420c3
Update psf-devices.ps1
bk-cs Nov 29, 2022
47f00f7
Update fwmgr.ps1
bk-cs Dec 1, 2022
ebe6cb9
Update iocs.ps1
bk-cs Dec 1, 2022
f3ed571
Update mssp.ps1
bk-cs Dec 2, 2022
344bbd0
Update settings.ps1
bk-cs Dec 2, 2022
358b2d2
Update policy-ioa-exclusions.ps1
bk-cs Dec 2, 2022
a0b52a3
Update installation-tokens.ps1
bk-cs Dec 2, 2022
4cf150e
Update real-time-response.ps1
bk-cs Dec 2, 2022
72806cb
Update recon.ps1
bk-cs Dec 2, 2022
87ba6c4
Update PSFalcon.psd1
bk-cs Dec 2, 2022
81197fe
Update PSFalcon.psd1
bk-cs Dec 2, 2022
d25608b
Update real-time-response.ps1
bk-cs Dec 5, 2022
3480a2b
Added 'Test-StringPattern' and renamed commands
bk-cs Dec 5, 2022
5b050a5
Added 'Select-Property' function
bk-cs Dec 5, 2022
588f5aa
Create ods.ps1
bk-cs Dec 5, 2022
677154e
Update settings.ps1
bk-cs Dec 6, 2022
785fa03
Update PSFalcon.psd1
bk-cs Dec 6, 2022
89329a8
Added 'archives'
bk-cs Dec 7, 2022
9749664
Update archives.ps1
bk-cs Dec 7, 2022
a2644c1
Update archives.ps1
bk-cs Dec 7, 2022
45b381c
Update ods.ps1
bk-cs Dec 7, 2022
e2b8333
Update Class.ps1
bk-cs Dec 7, 2022
81fbf14
Update samples.ps1
bk-cs Dec 8, 2022
c55ab3f
Added 7z support
bk-cs Dec 8, 2022
a902ce2
Update psf-sensors.ps1
bk-cs Dec 8, 2022
1491381
Added 'Get-FalconCve'
bk-cs Dec 8, 2022
2cdb20b
Added 'Get-FalconReconRecord'
bk-cs Dec 8, 2022
7a73c95
Update Class.ps1
bk-cs Dec 8, 2022
4041281
Update message-center.ps1
bk-cs Dec 8, 2022
077a4a3
Update Class.ps1
bk-cs Dec 8, 2022
d0e0d7d
Update PSFalcon.psd1
bk-cs Dec 8, 2022
7cf1b9c
Update recon.ps1
bk-cs Dec 8, 2022
d4e9879
Update mssp.ps1
bk-cs Dec 8, 2022
5278a8e
Added fwmgr commands
bk-cs Dec 8, 2022
bdfec2c
Bugfix for #260
bk-cs Dec 9, 2022
8443092
Update PSFalcon.psd1
bk-cs Dec 9, 2022
23818e7
Updated array iteration for consistency
bk-cs Dec 9, 2022
814793f
Internal function updates
bk-cs Dec 9, 2022
1a1370d
Added warning message
bk-cs Dec 12, 2022
e45a854
Added regex validation
bk-cs Dec 12, 2022
8344ead
Added commands
bk-cs Dec 12, 2022
f64858b
Update PSFalcon.psd1
bk-cs Dec 12, 2022
0216ed1
Update PSFalcon.psd1
bk-cs Dec 13, 2022
42737db
Added pipeline support
bk-cs Dec 13, 2022
cb4b299
Added commands
bk-cs Dec 13, 2022
6737a9c
Issue #263
bk-cs Dec 13, 2022
83c6136
Update PSFalcon.psd1
bk-cs Dec 13, 2022
664eb19
Update recon.ps1
bk-cs Dec 14, 2022
23c09c7
Update Private.ps1
bk-cs Dec 14, 2022
d58c069
Added sort values for 'Invoke-FalconReconExport'
bk-cs Dec 16, 2022
fe516a2
Update recon.ps1
bk-cs Dec 16, 2022
32b2831
Update Private.ps1
bk-cs Dec 16, 2022
79b2936
Update PSFalcon.psd1
bk-cs Dec 16, 2022
0eb7506
Added 'ConvertTo-FalconFirewallRule'
bk-cs Dec 21, 2022
b288ec8
Update psf-fwmgr.ps1
bk-cs Dec 21, 2022
40fbdcd
Removed location related commands
bk-cs Dec 22, 2022
c4b40f1
Changed 'Humio' to 'Falcon LogScale'
bk-cs Dec 22, 2022
1988462
Modified help link
bk-cs Dec 22, 2022
0d96ab0
Corrected help link
bk-cs Dec 22, 2022
006b615
Updated 'Import-FalconConfig'
bk-cs Dec 23, 2022
d692a85
Update PSFalcon.psd1
bk-cs Dec 23, 2022
c6a87d1
Updated 'New-FalconIoaExclusion'
bk-cs Dec 23, 2022
d04cc81
Update message-center.ps1
bk-cs Dec 29, 2022
0dbfb69
Update PSFalcon.psd1
bk-cs Dec 29, 2022
8d4dc56
Create image-assessment.ps1
bk-cs Dec 29, 2022
d64d47a
Update real-time-response.ps1
bk-cs Dec 30, 2022
668fd64
Update PSFalcon.psd1
bk-cs Jan 3, 2023
dbd7d3c
Modified policy json
bk-cs Jan 3, 2023
289abbd
Updated
bk-cs Jan 4, 2023
e0b84c6
Update PSFalcon.psd1
bk-cs Jan 5, 2023
07fbf6f
Update malquery.ps1
bk-cs Jan 5, 2023
1028ce6
Update falconx.ps1
bk-cs Jan 5, 2023
9712d98
Update scanner.ps1
bk-cs Jan 5, 2023
513f939
Update Private.ps1
bk-cs Jan 5, 2023
dae8035
Update oauth2.ps1
bk-cs Jan 5, 2023
8aa75a1
Issue #266
bk-cs Jan 6, 2023
95b4eb0
Update kubernetes-protection.ps1
bk-cs Jan 10, 2023
816e63e
Update fwmgr.ps1
bk-cs Jan 11, 2023
fecc2d3
Update psf-policies.ps1
bk-cs Jan 11, 2023
5a11820
Added ShouldProcess message
bk-cs Jan 11, 2023
46a3d78
Update psf-devices.ps1
bk-cs Jan 11, 2023
a6a1e00
Update psf-real-time-response.ps1
bk-cs Jan 12, 2023
5c57c1c
Update intel.ps1
bk-cs Jan 13, 2023
4b87a3e
Revert "Update intel.ps1"
bk-cs Jan 13, 2023
7d412d2
Added 'Get-FalconAttck'
bk-cs Jan 13, 2023
b934519
Update intel.ps1
bk-cs Jan 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Class/Class.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class ApiClient {
[System.IO.FileMode]::Open)
$Filename = [System.IO.Path]::GetFileName($this.Path($_.Value))
$StreamContent = [System.Net.Http.StreamContent]::New($FileStream)
$FileType = $this.StreamType($Filename)
if ($FileType) { $StreamContent.Headers.ContentType = $FileType }
$Message.Content.Add($StreamContent,$_.Key,$Filename)
@($_.Key,'<StreamContent>') -join '='
} else {
Expand Down Expand Up @@ -74,6 +76,9 @@ class ApiClient {
if ($Output.Result.Headers) {
Write-Verbose "[ApiClient.Invoke] $($Output.Result.Headers.GetEnumerator().foreach{
@($_.Key,(@($_.Value) -join ', ')) -join '=' } -join ', ')"
($Output.Result.Headers.GetEnumerator().Where({ $_.Key -match '^X-Api-Deprecation' })).foreach{
Write-Warning ([string]$_.Key,[string]$_.Value -join ': ')
}
}
if ($Output.Result -and $this.Collector.Enable -contains 'responses') { $this.Log($Output.Result) }
} catch {
Expand Down Expand Up @@ -135,4 +140,37 @@ class ApiClient {
Remove-Job -Id $_.Id
}
}
[string] StreamType([string]$String) {
[string]$Extension = [System.IO.Path]::GetExtension($String) -replace '^\.',$null
$Output = switch -Regex ($Extension) {
'^(bmp|gif|jp(e?)g|png)$' { "image/$_" }
'^(pdf|zip)$' { "application/$_" }
'^7z$' { 'application/x-7z-compressed' }
'^(csv|txt)$' {
if ($_ -eq 'txt') { 'text/plain' } else { "text/$_" }
}
'^doc(x?)$' {
if ($_ -match 'x$') {
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
} else {
'application/msword'
}
}
'^ppt(x?)$' {
if ($_ -match 'x$') {
'application/vnd.openxmlformats-officedocument.presentationml.presentation'
} else {
'application/vnd.ms-powerpoint'
}
}
'^xls(x?)$' {
if ($_ -match 'x$') {
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
} else {
'application/vnd.ms-excel'
}
}
}
return $Output
}
}
Loading