Skip to content

Commit

Permalink
initial commit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
robert.weber.ctr@navy.mil committed May 31, 2017
1 parent e881d9c commit 0ab09d3
Show file tree
Hide file tree
Showing 1,746 changed files with 3,575,602 additions and 1 deletion.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# CSTS
CSTS
Cyber Security Tool Suite
38 changes: 38 additions & 0 deletions acheievement.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[CmdletBinding()]
param (
$text = "Test Accomplishment Goes Here",
$out = "achievement_$((get-date).ToString('yyyyMMddHHmmss')).png",
$font = 14
)

Begin{
try{
Add-Type -AssemblyName System.Drawing
$bmp = new-object System.Drawing.Bitmap "$pwd\images\achievement.png"
$headerFont = new-object System.Drawing.Font Consolas,22
$textFont = new-object System.Drawing.Font Consolas,$font
$brushFg = [System.Drawing.Brushes]::White
$graphics = [System.Drawing.Graphics]::FromImage($bmp)
}catch{
write-error "Could Not Initialize Variables"
}
}

Process{
try{
$graphics.DrawString('Achievement Unlocked',$headerFont,$brushFg,65,0)
$graphics.DrawString($text,$textFont,$brushFg,70,45)
}catch{
Write-Error "Could not Add Text to Bitmap"
}
}

End{
try{
$graphics.Dispose()
$bmp.Save("$(pwd)\results\$($out)")
Invoke-Item "$(pwd)\results\$($out)"
}catch{
Write-Error "Could not save Bitmap"
}
}
Loading

0 comments on commit 0ab09d3

Please sign in to comment.