Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
OrchestrationAPI
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor 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
Marius Raes
OrchestrationAPI
Commits
0aeeaee3
Commit
0aeeaee3
authored
3 years ago
by
Marius Raes
Browse files
Options
Downloads
Patches
Plain Diff
try catch
parent
dbcfc41c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/orchestrationLogic/HEAT/bootup.ps1
+19
-1
19 additions, 1 deletion
source/orchestrationLogic/HEAT/bootup.ps1
source/orchestrationLogic/orchestrator.py
+1
-1
1 addition, 1 deletion
source/orchestrationLogic/orchestrator.py
with
20 additions
and
2 deletions
source/orchestrationLogic/HEAT/bootup.ps1
+
19
−
1
View file @
0aeeaee3
...
@@ -22,6 +22,8 @@ if( !(Test-Path -Path "C:\flag.txt")) {
...
@@ -22,6 +22,8 @@ if( !(Test-Path -Path "C:\flag.txt")) {
$usr
=
"
$dc
\Administrator"
$usr
=
"
$dc
\Administrator"
$creds
=
New-Object
System.Management.Automation.PSCredential
(
$usr
,
$pw
)
$creds
=
New-Object
System.Management.Automation.PSCredential
(
$usr
,
$pw
)
$added
=
$true
$i
=
0
;
do
{
do
{
try
{
try
{
Add-Computer
-DomainName
$dc
-Credential
$creds
-ErrorAction
Stop
Add-Computer
-DomainName
$dc
-Credential
$creds
-ErrorAction
Stop
...
@@ -38,6 +40,22 @@ if( !(Test-Path -Path "C:\flag.txt")) {
...
@@ -38,6 +40,22 @@ if( !(Test-Path -Path "C:\flag.txt")) {
}
else
{
}
else
{
echo
"else"
echo
"else"
<
RDPMembers
>
# Adds users to the rdp member group
$added
=
$true
$i
=
0
;
do
{
try
{
<
RDPMembers
>
# Adds users to the rdp member group
echo
"adding succeeded"
}
catch
{
echo
"adding faled retrying in one minute"
$added
=
$false
$i
=
$i
+
1
Start-Sleep
-s
60
}
}
while
((
-Not
$added
)
-And
(
$i
-lt
10
))
}
}
This diff is collapsed.
Click to expand it.
source/orchestrationLogic/orchestrator.py
+
1
−
1
View file @
0aeeaee3
...
@@ -158,6 +158,6 @@ class Orchestrator:
...
@@ -158,6 +158,6 @@ class Orchestrator:
def
allowRDP
(
self
,
members
):
def
allowRDP
(
self
,
members
):
result
=
''
result
=
''
for
member
in
members
:
for
member
in
members
:
result
+=
"
Add-LocalGroupMember -Group
'
Remote Desktop Users
'
-Member
'
{}
'
;
"
.
format
(
member
)
result
+=
"
Add-LocalGroupMember -Group
'
Remote Desktop Users
'
-Member
'
{}
'
-ErrorAction Stop
;
"
.
format
(
member
)
return
result
return
result
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