Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Keystone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Third Party Mirrors
Keystone
Commits
fba74235
Commit
fba74235
authored
8 years ago
by
FuzzySecurity
Browse files
Options
Downloads
Patches
Plain Diff
+fixes
Spacing & future-proof version
parent
fa5fd0c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/powershell/Keystone/Keystone.psm1
+44
-38
44 additions, 38 deletions
bindings/powershell/Keystone/Keystone.psm1
with
44 additions
and
38 deletions
bindings/powershell/Keystone/Keystone.psm1
+
44
−
38
View file @
fba74235
...
...
@@ -61,8 +61,8 @@ function Get-KeystoneAssembly {
#>
param
(
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$True
)]
[
ValidateSet
(
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$True
)]
[
ValidateSet
(
'KS_ARCH_ARM'
,
'KS_ARCH_ARM64'
,
'KS_ARCH_MIPS'
,
...
...
@@ -73,10 +73,10 @@ function Get-KeystoneAssembly {
'KS_ARCH_HEXAGON'
,
'KS_ARCH_MAX'
)
]
[
String
]
$Architecture
,
[
String
]
$Architecture
,
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$True
)]
[
ValidateSet
(
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$True
)]
[
ValidateSet
(
'KS_MODE_LITTLE_ENDIAN'
,
'KS_MODE_BIG_ENDIAN'
,
'KS_MODE_ARM'
,
...
...
@@ -97,14 +97,14 @@ function Get-KeystoneAssembly {
'KS_MODE_SPARC64'
,
'KS_MODE_V9'
)
]
[
String
]
$Mode
,
[
String
]
$Mode
,
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$True
)]
[
ValidateNotNullOrEmpty
()]
[
string
]
$Code
,
[
Parameter
(
ParameterSetName
=
'Keystone'
,
Mandatory
=
$False
)]
[
ValidateSet
(
[
ValidateSet
(
'KS_OPT_SYNTAX_INTEL'
,
'KS_OPT_SYNTAX_ATT'
,
'KS_OPT_SYNTAX_NASM'
,
...
...
@@ -112,39 +112,11 @@ function Get-KeystoneAssembly {
'KS_OPT_SYNTAX_GAS'
)
]
[
String
]
$Syntax
=
"KS_OPT_SYNTAX_INTEL"
,
[
Parameter
(
ParameterSetName
=
'Version'
,
Mandatory
=
$False
)]
[
switch
]
$Version
=
$null
)
if
(
$Version
){
$Banner
=
@"
;#
#########
######"" ;;
###";#### ;##############
##### ### ##"" "## ""######
#### ### ""### "###
#### ## "### "#
"### \# ; ####
"### " ##"####
## \### ## ####
#### "###; ### ####
######## "#" ;### ###"#####
"#############" ####"/##"
" ;#######
"#######"
#
-=[Keystone Engine v0.9.1]=-
"@
# Mmm ASCII version banner!
$Banner
Return
}
# Compatibility for PS v2 / PS v3+
if
(
!
$PSScriptRoot
)
{
$PSScriptRoot
=
Split-Path
$MyInvocation
.
MyCommand
.
Path
-Parent
...
...
@@ -224,9 +196,43 @@ function Get-KeystoneAssembly {
[DllImport("
$DllPath
")]
public static extern void ks_free(
IntPtr handle);
[DllImport("
$DllPath
")]
public static extern int ks_version(
uint major,
uint minor);
}
"@
if
(
$Version
){
$VerCount
=
[
System.BitConverter
]::
GetBytes
(
$
([
Keystone
]::
ks_version
(
$null
,
$null
)))
$Banner
=
@"
;#
#########
######"" ;;
###";#### ;##############
##### ### ##"" "## ""######
#### ### ""### "###
#### ## "### "#
"### \# ; ####
"### " ##"####
## \### ## ####
#### "###; ### ####
######## "#" ;### ###"#####
"#############" ####"/##"
" ;#######
"#######"
#
-=[Keystone Engine v
$(
$VerCount
[
1
]
)
.
$(
$VerCount
[
0
]
)
]=-
"@
# Mmm ASCII version banner!
$Banner
Return
}
# Asm Handle
$AsmHandle
=
[
IntPtr
]::
Zero
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment