mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Compare commits
561 Commits
2022.01.07
...
v1.77.3-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5c156e0b1 | ||
|
|
a7e8d8523a | ||
|
|
2ead94a740 | ||
|
|
737df595df | ||
|
|
e1023a6aed | ||
|
|
0eedfab5b1 | ||
|
|
c682b603e7 | ||
|
|
fe063a98cd | ||
|
|
c90beb66a0 | ||
|
|
f38dc86551 | ||
|
|
389776ae64 | ||
|
|
ebe782e5a4 | ||
|
|
d3f497bfbc | ||
|
|
e89b1f4139 | ||
|
|
b5c431b8e7 | ||
|
|
3746ba1819 | ||
|
|
945bff3c17 | ||
|
|
d7e318b1f8 | ||
|
|
eb3db198a1 | ||
|
|
a908a783be | ||
|
|
1ae9960e82 | ||
|
|
5aa8425209 | ||
|
|
b794aa8089 | ||
|
|
e8bb0bffaa | ||
|
|
e1e0661f25 | ||
|
|
7848c83c72 | ||
|
|
2de37ed9c7 | ||
|
|
425b433cd2 | ||
|
|
44e07e3cdb | ||
|
|
689f882104 | ||
|
|
207beaee12 | ||
|
|
bd21b85de7 | ||
|
|
2e7579cac5 | ||
|
|
ec63812af0 | ||
|
|
8dfe1a22c9 | ||
|
|
c0e3f547ec | ||
|
|
dafb1b364c | ||
|
|
7d1b9d8635 | ||
|
|
8041f58ffd | ||
|
|
d018fdbace | ||
|
|
489602ffb3 | ||
|
|
600ba73f5f | ||
|
|
88600ae6df | ||
|
|
5e3bce9a92 | ||
|
|
9b28b7057d | ||
|
|
0a17220446 | ||
|
|
7684b19d13 | ||
|
|
47baf3b662 | ||
|
|
bc5e2b9437 | ||
|
|
cf0ef6d9d0 | ||
|
|
b6f3047f82 | ||
|
|
0a418561d7 | ||
|
|
6da79a41df | ||
|
|
3ddeac6c74 | ||
|
|
98f97c442d | ||
|
|
472d33ba12 | ||
|
|
d906cfcc1e | ||
|
|
0f0d8bdcdb | ||
|
|
005b2485f6 | ||
|
|
ffd90bed70 | ||
|
|
70264a24ab | ||
|
|
ad3a37fde3 | ||
|
|
9dac0eeaac | ||
|
|
8dac393bb4 | ||
|
|
287d1a5575 | ||
|
|
20278e0e53 | ||
|
|
a3c3ec8c5c | ||
|
|
3039b25a66 | ||
|
|
0b7ce92af8 | ||
|
|
e3ec521a1d | ||
|
|
88999263a7 | ||
|
|
9687ccd01d | ||
|
|
ca62502499 | ||
|
|
8b3a68f58e | ||
|
|
08eb35a360 | ||
|
|
dec82b41f2 | ||
|
|
b9ab5c76f7 | ||
|
|
6de0c536e8 | ||
|
|
3f0aca97bf | ||
|
|
ccb51a2603 | ||
|
|
99d9e70921 | ||
|
|
b8b54271dd | ||
|
|
49a1549e5a | ||
|
|
b3f936c194 | ||
|
|
f3b10d4c20 | ||
|
|
94b17037d0 | ||
|
|
83f3846ce6 | ||
|
|
711a751117 | ||
|
|
e013e32792 | ||
|
|
6e64b09256 | ||
|
|
e32d268587 | ||
|
|
05635dec93 | ||
|
|
e694923d33 | ||
|
|
7322683465 | ||
|
|
64688f3512 | ||
|
|
762760af2f | ||
|
|
48e6881401 | ||
|
|
95c958136f | ||
|
|
53a6be0f82 | ||
|
|
0b4d95be1c | ||
|
|
aad3948475 | ||
|
|
093370081e | ||
|
|
33426ceee9 | ||
|
|
5f5700b948 | ||
|
|
802e9abfef | ||
|
|
45149d6547 | ||
|
|
595681a982 | ||
|
|
e1cac723d6 | ||
|
|
683f84f053 | ||
|
|
b6d882a06f | ||
|
|
9d4bfbcb1c | ||
|
|
b563747046 | ||
|
|
1ebd0a430f | ||
|
|
ef4366be4d | ||
|
|
484283fef8 | ||
|
|
b546a48a5f | ||
|
|
51bd64d005 | ||
|
|
2c65d12b92 | ||
|
|
c43a3b5115 | ||
|
|
515778b13d | ||
|
|
bb4b9ce9e7 | ||
|
|
1d6707fecd | ||
|
|
5b2a46ed91 | ||
|
|
24fa97da4c | ||
|
|
b0109c2581 | ||
|
|
20f237ec4c | ||
|
|
6ea535ae29 | ||
|
|
57ca8a3eee | ||
|
|
307ea42a0f | ||
|
|
ac41c04f67 | ||
|
|
b3496e79de | ||
|
|
4f7aa755e3 | ||
|
|
d3af50f009 | ||
|
|
ba77a7b7c0 | ||
|
|
666a0e1537 | ||
|
|
96f4307910 | ||
|
|
81e997eb60 | ||
|
|
7132c6e7c2 | ||
|
|
cb01e92fe2 | ||
|
|
2c9c512d74 | ||
|
|
8d05c9040b | ||
|
|
4e994fb202 | ||
|
|
ab2a778694 | ||
|
|
115375820d | ||
|
|
8cb753916b | ||
|
|
ec3a0cee9b | ||
|
|
13f8f82537 | ||
|
|
54544dd2aa | ||
|
|
ac99115424 | ||
|
|
d6c6038193 | ||
|
|
c97b84e4a2 | ||
|
|
6698ec0b06 | ||
|
|
290b1c4de5 | ||
|
|
d497a50727 | ||
|
|
2837c91f5e | ||
|
|
9a717f28c6 | ||
|
|
e416c2c9c9 | ||
|
|
331cdaa6ce | ||
|
|
aa329b1a9a | ||
|
|
16c080942d | ||
|
|
4acc111b3d | ||
|
|
afe453d371 | ||
|
|
e93c120dac | ||
|
|
2f701458f4 | ||
|
|
6a35961dfb | ||
|
|
1a90095ba3 | ||
|
|
5dc87213b5 | ||
|
|
ff8044b09b | ||
|
|
f1fa40f6fd | ||
|
|
9bc5b62828 | ||
|
|
5aae586812 | ||
|
|
bc5e5be42e | ||
|
|
be68573378 | ||
|
|
cf0bc3d270 | ||
|
|
d5773eb2e9 | ||
|
|
50523e5b67 | ||
|
|
feeca86c6a | ||
|
|
a2e2671483 | ||
|
|
0b4d6ef8ef | ||
|
|
bdf0e532a5 | ||
|
|
d8cf72d09b | ||
|
|
6c3ec8f058 | ||
|
|
fbd9b76a09 | ||
|
|
bee216220a | ||
|
|
4ca7f34989 | ||
|
|
51015e6b51 | ||
|
|
46100d6d94 | ||
|
|
c94eac3863 | ||
|
|
965b0e5b6d | ||
|
|
000cea1dda | ||
|
|
6d4d60e3b1 | ||
|
|
9957282bfa | ||
|
|
9b603dd956 | ||
|
|
759ee55780 | ||
|
|
93b2edb5a5 | ||
|
|
4d49c14bb9 | ||
|
|
6398808a0a | ||
|
|
64e20f3665 | ||
|
|
3b542d8868 | ||
|
|
d5af0e43a5 | ||
|
|
7a8ef87dc7 | ||
|
|
7a5293cde3 | ||
|
|
26400631a0 | ||
|
|
97a5c584be | ||
|
|
0700b6573c | ||
|
|
d8f66a4188 | ||
|
|
c22971cf54 | ||
|
|
9d2dd5dd93 | ||
|
|
c19d512631 | ||
|
|
9efda5fef3 | ||
|
|
a27cdcfdb5 | ||
|
|
5667a07b25 | ||
|
|
7d0bd85466 | ||
|
|
4f269442a6 | ||
|
|
16d182fca2 | ||
|
|
6d1a206cc9 | ||
|
|
d8a7fdbf4f | ||
|
|
516b365ebc | ||
|
|
6da6a5ede9 | ||
|
|
67244f1957 | ||
|
|
0a304e9a03 | ||
|
|
05154af606 | ||
|
|
7454b15ec9 | ||
|
|
38f435f639 | ||
|
|
5f38ec7210 | ||
|
|
ca143bf969 | ||
|
|
402e5c3665 | ||
|
|
290dbcc3ed | ||
|
|
a7749c70e7 | ||
|
|
9f0cfd5f22 | ||
|
|
f47434c09e | ||
|
|
795a4b571e | ||
|
|
f71727e05e | ||
|
|
d2fa8e86b1 | ||
|
|
23dcd9d30f | ||
|
|
d6890c6ecd | ||
|
|
b1a6ba78d4 | ||
|
|
e6abe3f3a1 | ||
|
|
6c32540ecb | ||
|
|
951ad5cd0a | ||
|
|
5f56477123 | ||
|
|
3180f38a1d | ||
|
|
07f15993e5 | ||
|
|
fc8e9c7689 | ||
|
|
7cb20b9e28 | ||
|
|
ffc2351d64 | ||
|
|
f10fec61ac | ||
|
|
e41200067c | ||
|
|
30f6d3dde7 | ||
|
|
7f9dcb11f0 | ||
|
|
d5fa2f62c0 | ||
|
|
fa7967190d | ||
|
|
20e04c0d75 | ||
|
|
d5eea9db20 | ||
|
|
8cb598ce25 | ||
|
|
f3a57d7f23 | ||
|
|
14e47def9d | ||
|
|
7573081d7a | ||
|
|
aaca581324 | ||
|
|
43c2797a51 | ||
|
|
da6bbf65f0 | ||
|
|
7d0cbf423e | ||
|
|
d94eab71da | ||
|
|
b0a8ccc5b6 | ||
|
|
5cbf1f1568 | ||
|
|
22cde74db2 | ||
|
|
cdc3759c04 | ||
|
|
38abc8a167 | ||
|
|
7c7c7086ce | ||
|
|
50daf64025 | ||
|
|
dc38df5389 | ||
|
|
a46b2c9d98 | ||
|
|
200756361c | ||
|
|
877a1e4cd0 | ||
|
|
a382206f5a | ||
|
|
1af7a622a6 | ||
|
|
3f95b2aa7e | ||
|
|
b7871e2e04 | ||
|
|
6b6ceda497 | ||
|
|
b01b8e4bc8 | ||
|
|
20f7cb1cd0 | ||
|
|
3e1ee0056d | ||
|
|
a3a851e57f | ||
|
|
cf650d4318 | ||
|
|
58e7420f04 | ||
|
|
aedaf084d9 | ||
|
|
c18f638989 | ||
|
|
fb50cdc058 | ||
|
|
68e702c344 | ||
|
|
651b18a8b3 | ||
|
|
2174e56407 | ||
|
|
ea27a4da02 | ||
|
|
321fd1162b | ||
|
|
c51f38ddc7 | ||
|
|
b34cd1acc5 | ||
|
|
43f20bb83a | ||
|
|
79b8ddef15 | ||
|
|
2642ea0601 | ||
|
|
7a2f934f6a | ||
|
|
f299fefcdc | ||
|
|
209319f460 | ||
|
|
5ec4f4dcea | ||
|
|
16f67d58d1 | ||
|
|
542d794ab4 | ||
|
|
ede1573b56 | ||
|
|
bc8eec8887 | ||
|
|
59b0654b95 | ||
|
|
cae3477591 | ||
|
|
6a3115b80a | ||
|
|
1232d7c288 | ||
|
|
8e1b4c9271 | ||
|
|
0f8810e22a | ||
|
|
7bbff38b6b | ||
|
|
4a7b8fa250 | ||
|
|
53acc94976 | ||
|
|
ab8d83b12d | ||
|
|
713a0a6174 | ||
|
|
a3b9695b81 | ||
|
|
85dd381bd9 | ||
|
|
05b418e9b6 | ||
|
|
40af584afe | ||
|
|
93fe32491b | ||
|
|
4b67fcb0d4 | ||
|
|
0b0c92717d | ||
|
|
4564cafa85 | ||
|
|
2e21f8d03a | ||
|
|
4336254d56 | ||
|
|
bc5e9279a5 | ||
|
|
1bfbb956c2 | ||
|
|
b336db773c | ||
|
|
30e7d2424c | ||
|
|
cbb8c0234d | ||
|
|
95469107fd | ||
|
|
ba0058c0b9 | ||
|
|
8f35afe353 | ||
|
|
aaf219eb90 | ||
|
|
1167794d58 | ||
|
|
929babd69a | ||
|
|
870b7c1ffd | ||
|
|
9ed9d835b9 | ||
|
|
985feb4b91 | ||
|
|
c43c85bb21 | ||
|
|
038074131c | ||
|
|
ab9156a7d3 | ||
|
|
f4b76818e8 | ||
|
|
12a399a354 | ||
|
|
dfdbbea85c | ||
|
|
5fad5ec4c7 | ||
|
|
fe94da4727 | ||
|
|
361ae3af50 | ||
|
|
a2e302ebfa | ||
|
|
186ab9c00e | ||
|
|
9a2453524a | ||
|
|
3a2e128e98 | ||
|
|
1bd2dbf9f0 | ||
|
|
b7f880e7f8 | ||
|
|
13cd926b4f | ||
|
|
6fb7b1c6e4 | ||
|
|
8f35015a6c | ||
|
|
a926bccb97 | ||
|
|
b9f2abf5eb | ||
|
|
8dc5bda171 | ||
|
|
d24bdb543b | ||
|
|
dc921161e4 | ||
|
|
8e248cb545 | ||
|
|
ae93be4cfb | ||
|
|
42949fbe91 | ||
|
|
21dd175456 | ||
|
|
a3df0da26b | ||
|
|
6b9d4fd107 | ||
|
|
fac2ae6399 | ||
|
|
46732803c3 | ||
|
|
39d205bd4d | ||
|
|
8e2bd7997e | ||
|
|
76db9a6c62 | ||
|
|
c03d5e891d | ||
|
|
b21f6e8ce7 | ||
|
|
4b916f1888 | ||
|
|
1f80e5339b | ||
|
|
dc616f8ea1 | ||
|
|
dc6588243f | ||
|
|
690d3b0d4e | ||
|
|
4bc5dffabb | ||
|
|
55a1e4a544 | ||
|
|
5cb32dd75a | ||
|
|
f858c9fe48 | ||
|
|
0ac39af404 | ||
|
|
fc757b236f | ||
|
|
a921e6e3d4 | ||
|
|
8cf0f50565 | ||
|
|
575ad7664f | ||
|
|
be17488070 | ||
|
|
f504107928 | ||
|
|
0113f549c5 | ||
|
|
9ff831faab | ||
|
|
a9ca243c0b | ||
|
|
553bbef45f | ||
|
|
8f713f861b | ||
|
|
324054b9d7 | ||
|
|
d3fc9404ee | ||
|
|
5bb780439b | ||
|
|
f0e6008441 | ||
|
|
39dd69f15e | ||
|
|
7b2e89df26 | ||
|
|
aa853f8481 | ||
|
|
83bba75af6 | ||
|
|
23889aa5b1 | ||
|
|
5e6094fc42 | ||
|
|
a4181cb6d6 | ||
|
|
88c49f0722 | ||
|
|
513d9e199c | ||
|
|
e80975c56e | ||
|
|
9051ac102c | ||
|
|
39a9b2e619 | ||
|
|
dbc55d248f | ||
|
|
2b46180bfb | ||
|
|
5abe6c7e27 | ||
|
|
4595ebeb9a | ||
|
|
815c08e6d4 | ||
|
|
a72ad218a0 | ||
|
|
944ad1f769 | ||
|
|
e17a68f61c | ||
|
|
0b8196be68 | ||
|
|
d9c01148b7 | ||
|
|
2b3cfd992f | ||
|
|
7e4bd7a6f3 | ||
|
|
161e0ed637 | ||
|
|
1ee03e863c | ||
|
|
2411481d8b | ||
|
|
0314a627ed | ||
|
|
4d339a0b09 | ||
|
|
c171e7f94b | ||
|
|
eac4d966d9 | ||
|
|
c20868c20c | ||
|
|
bb74d46f1f | ||
|
|
152d48c583 | ||
|
|
b7a0155ba4 | ||
|
|
0414724b21 | ||
|
|
469f21db8d | ||
|
|
b6c9d30195 | ||
|
|
7b89430317 | ||
|
|
5bd854116a | ||
|
|
3fb7575529 | ||
|
|
a3a868c2ce | ||
|
|
1eb6fc2235 | ||
|
|
5ff4502f0a | ||
|
|
3126b8d4b0 | ||
|
|
dfb1d34b8a | ||
|
|
ace62c07be | ||
|
|
ec2f3024b6 | ||
|
|
25543f6561 | ||
|
|
3278657da7 | ||
|
|
90c4d12688 | ||
|
|
4ceaea99f7 | ||
|
|
585de34ef1 | ||
|
|
60e1a3ce93 | ||
|
|
413d77ff1a | ||
|
|
d8bb561063 | ||
|
|
5dff2c20b2 | ||
|
|
27803e7787 | ||
|
|
58f9c1575f | ||
|
|
7b909665b9 | ||
|
|
11eee991a1 | ||
|
|
7056a859ef | ||
|
|
2455f0d73e | ||
|
|
943d36e23e | ||
|
|
b563ac6e0c | ||
|
|
ed37a8ca2a | ||
|
|
55bee8b0d8 | ||
|
|
6bd18c29e3 | ||
|
|
37fc611767 | ||
|
|
f95fe351e2 | ||
|
|
2fb0ab1d91 | ||
|
|
85f7be1d79 | ||
|
|
b3e5c1abc2 | ||
|
|
9e216c0020 | ||
|
|
a9f00b6a8c | ||
|
|
46e7b02da2 | ||
|
|
8db0bc6e6f | ||
|
|
1702b5867a | ||
|
|
c03a6452ef | ||
|
|
69b840fb12 | ||
|
|
9385ab287f | ||
|
|
d2b2c39b97 | ||
|
|
f8ff978738 | ||
|
|
d50b32236c | ||
|
|
88d1db2840 | ||
|
|
b1dbe562d6 | ||
|
|
e95b6f1b5d | ||
|
|
1cbb7bb5dd | ||
|
|
34f3ffa129 | ||
|
|
ecd25a673e | ||
|
|
58d0778c3d | ||
|
|
81a5422974 | ||
|
|
eb859e5ede | ||
|
|
c8035b5071 | ||
|
|
a98a336e52 | ||
|
|
d7f6535b85 | ||
|
|
f9d4e3152b | ||
|
|
69bd816aeb | ||
|
|
783810749c | ||
|
|
92c3c967ba | ||
|
|
c632ba4306 | ||
|
|
e29d2c25ba | ||
|
|
5cfdc96cd2 | ||
|
|
a20e10b342 | ||
|
|
39b7414553 | ||
|
|
0eef20caf6 | ||
|
|
859d12b450 | ||
|
|
cd7c594b76 | ||
|
|
39862e15f6 | ||
|
|
87b0cf5c3f | ||
|
|
a14219e1e2 | ||
|
|
ee4660707c | ||
|
|
ccdf15c79c | ||
|
|
b31362afab | ||
|
|
74d6c88565 | ||
|
|
638f64b888 | ||
|
|
ffff9c1529 | ||
|
|
39968c7c6e | ||
|
|
2c3edf0ff2 | ||
|
|
2c4445a2d9 | ||
|
|
09114a5ed3 | ||
|
|
22e7825d65 | ||
|
|
62862141a8 | ||
|
|
920461920c | ||
|
|
f5d0e93ecd | ||
|
|
952a2f536b | ||
|
|
fbb9d849b4 | ||
|
|
65a13dee68 | ||
|
|
09d26b37c7 | ||
|
|
47de6905df | ||
|
|
c0cf316c16 | ||
|
|
c055f8069d | ||
|
|
575356214f | ||
|
|
4b5dc4152a | ||
|
|
a023409fe9 | ||
|
|
d36c59658d | ||
|
|
4f832ee70b | ||
|
|
7b97097515 | ||
|
|
86b3cb8d5d | ||
|
|
33e007ad48 | ||
|
|
efea9f0857 | ||
|
|
aa755a0093 | ||
|
|
807e80acbe | ||
|
|
4096247ee8 | ||
|
|
782d09ddbc | ||
|
|
4c304e11f3 | ||
|
|
aee497de03 | ||
|
|
823f8614e5 | ||
|
|
b54afb8823 | ||
|
|
22e611c63b | ||
|
|
3deb01a65d | ||
|
|
6f24b0bb71 | ||
|
|
9d7921f538 | ||
|
|
a4e66b3d11 | ||
|
|
3866ff76f9 | ||
|
|
82f947abdd | ||
|
|
47c6f53b43 | ||
|
|
606657524e | ||
|
|
168285944c |
130
.github/workflows/build-x86_64.yml
vendored
Normal file
130
.github/workflows/build-x86_64.yml
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
name: Build x86_64
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v1.77.3-dev
|
||||
|
||||
jobs:
|
||||
Build-Debug-MSI:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.12.4'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Debug Installer" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish MSI as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-msi-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNGInstaller\Installer\bin\x64\Debug\en-US\
|
||||
if-no-files-found: error
|
||||
|
||||
Build-Debug-Portable:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.8.3'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Debug Portable" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish Portable Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-portable-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNG\bin\x64\Debug Portable\
|
||||
if-no-files-found: error
|
||||
|
||||
Build-Release:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.12.4'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Release Installer and Portable" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish MSI Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-msi-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNGInstaller\Installer\bin\x64\Release\en-US\
|
||||
if-no-files-found: error
|
||||
|
||||
- name: 06. Publish Portable Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-portable-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNG\bin\x64\Release
|
||||
if-no-files-found: error
|
||||
|
||||
Create-Release:
|
||||
needs: [Build-Debug-MSI, Build-Debug-Portable, Build-Release]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: 03. Create compressed archives # Needs to be done because "actions/download-artifact@v4" is extracting the zipped Artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
zip -r debug-msi-x86_64.zip debug-msi-x86_64/
|
||||
zip -r debug-portable-x86_64.zip debug-portable-x86_64/
|
||||
zip -r release-msi-x86_64.zip release-msi-x86_64/
|
||||
zip -r release-portable-x86_64.zip release-portable-x86_64/
|
||||
|
||||
- name: 04. Create Release
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release create "v1.77.3-dev-${GITHUB_RUN_NUMBER}" \
|
||||
--title "v1.77.3-dev-${GITHUB_RUN_NUMBER}" \
|
||||
--prerelease \
|
||||
--generate-notes \
|
||||
$GITHUB_WORKSPACE/debug-msi-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/debug-portable-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/release-msi-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/release-portable-x86_64.zip
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -283,6 +283,6 @@ Installer Projects/Installer/Fragments/HelpFilesFragment.wxs
|
||||
InstallerProjects/Installer/Fragments/FilesFragment.wxs
|
||||
InstallerProjects/Installer/Resources/License.rtf
|
||||
|
||||
# gh-pages info
|
||||
runlocal.bat
|
||||
/_site
|
||||
# mRemoteNG
|
||||
**/mRemoteNG/Properties/AssemblyInfo.tt
|
||||
**/mRemoteNG/Properties/AssemblyInfo.cs
|
||||
11
Add-ons/README.md
Normal file
11
Add-ons/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## Add-ons library by 3rd party
|
||||
This is a list of add-ons, plugins and extentions what could be used with mRemoteNG, if you wish to add yours to this list - just drop me a line: <a href="mailto:support@mremoteng.org">support@mremoteng.org</a>
|
||||
<br>
|
||||
|
||||
| <b>Date added</b> | <b>Author</b> | <b>Type</b> | <b>Name</b> | <b>Description</b> | <b>Repository</b> |
|
||||
| :---------------------------------------------------------:|:-------------------------------------------------:| :---------: |-------------|--------------------|:-----------------:|
|
||||
| 02-08-2022 | <a href="https://github.com/JustBeta"><img align="left" src="https://avatars.githubusercontent.com/u/25150896?v=4" alt="JustBeta" width="30px"/>JustBeta</a> | script | Export-MobaXterm2mRemoteNG | Conversion of MobaXterm's ini file to mRemoteNG format. | [GITHUB Repository](https://github.com/JustBeta/Export-MobaXtern2mRemoteNG/tree/main) |
|
||||
|
||||
<br>
|
||||
|
||||
For a detailed usage examples and documentation please reach out authors.
|
||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -2,8 +2,36 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
## [1.77.3.1784]
|
||||
### Fixed
|
||||
- #2362: Fix use of sql database
|
||||
- #2356: Improve speed for the display of the options page
|
||||
- #2352: SSH.NET Update
|
||||
- #2346: Modify "auto reconnect" to have the ability to really auto-reconnect
|
||||
- #2340: Set the default theme setting
|
||||
- #2339: Add 2 missing settings
|
||||
- #2261: Implement Show/Hide file menu in view menu
|
||||
- #2244: Save RCG and RestrictedAdmin fields correctly in connections file
|
||||
- #2195: Fix crafted XML File Code Execution vulnerability
|
||||
- #304: use pwfile instead of cleartext password for puttyng
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- #2285: Support extraction of SSH private keys from external cred prov
|
||||
- #2268: Postregsql database support
|
||||
|
||||
### Updated
|
||||
- #2295: Updates hyperlink style to make links more visible to end users
|
||||
- #2337: Set language.resx to auto generate the designer class
|
||||
|
||||
## [1.77.3]
|
||||
### Added
|
||||
- #1736: Update of SSH.NET to 2020.0.2 to allow File Transfer again
|
||||
- #2138: Improve compatibility with Remote Desktop Connection Manager v2.83
|
||||
- #2123: Thycotic Secret Server - Added 2FA OTP support
|
||||
### Changed
|
||||
- #1546: Enable resize without reconnect for RDP Version Rdc9 or higher
|
||||
|
||||
## [1.77.2]
|
||||
### Added
|
||||
- #2086: Replace WebClient with async HttpClient for updater.
|
||||
- #1850: Minify config xml
|
||||
@@ -34,6 +62,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- #1325: Language resource files cleanup
|
||||
- #xxxx: Secret Server connector via new field "API User ID" instead of SSAPI: prefix
|
||||
### Fixed
|
||||
- #2125: Fixed string parsing logic for Quick Connect toolbar.
|
||||
- #2122: Fix to avoid throwing exception incase if not able decrypt connections and ask to open another one or create a new.
|
||||
- #2117: Fix of broken Links due migration to .NET 6 and branch renaming
|
||||
- #2098: Fix failed BinaryFileTest
|
||||
- #2097: Fix failed tests related to mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
- #2096: Corrected encryption code of LegacyRijndaelCryptographyProvider
|
||||
|
||||
127
CREDITS.md
Normal file
127
CREDITS.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# Contributors
|
||||
|
||||
## Current mRemoteNG dev team
|
||||
|
||||
[David Sparer](http://github.com/sparerd)
|
||||
[Sean Kaim](http://github.com/kmscode)
|
||||
[Faryan Rezagholi](http://github.com/farosch)
|
||||
[Bennett Blodinger](http://github.com/benwa)
|
||||
|
||||
[Joe Cefoli](http://github.com/jcefoli)
|
||||
[countchappy](http://github.com/countchappy)
|
||||
Tony Lambert
|
||||
[Julien Roncaglia](http://github.com/vbfox)
|
||||
[peterchenadded](http://github.com/peterchenadded)
|
||||
[Brandon Wulf](http://github.com/mrwulf)
|
||||
[Pedro Rodrigues](http://github.com/pedro2555)
|
||||
[dekelMP](http://github.com/dekelMP)
|
||||
[Bruce](http://github.com/brucetp)
|
||||
[Camilo Alvarez](http://github.com/jotatsu)
|
||||
[DamianBis](http://github.com/DamianBis)
|
||||
[pfjason](http://github.com/pfjason)
|
||||
[sirLoaf](http://github.com/sirLoaf)
|
||||
[Fyers](http://github.com/Fyers)
|
||||
[Vladimir Semenov](http://github.com/sli-pro)
|
||||
[Stephan](http://github.com/st-schuler)
|
||||
[Aleksey Reytsman](http://github.com/areytsman)
|
||||
[Cristian Abelleira](http://github.com/CrAbelleira)
|
||||
[MitchellBot](http://github.com/MitchellBot)
|
||||
[Filippo Ferrazini](http://github.com/Filippo125)
|
||||
|
||||
## Past Contributors
|
||||
|
||||
Felix Deimel - mRemote original developer
|
||||
Riley McArdle - mRemoteNG original developer
|
||||
|
||||
[Hayato Iriumi](http://github.com/hiriumi)
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
[Brandhor](http://github.com/Brandhor)
|
||||
[Dimitrij](http://github.com/Kvarkas)
|
||||
|
||||
## Translators
|
||||
|
||||
Eugenio "Ryo567" Martínez
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
Hayato Iriumi
|
||||
[Sebastien Thieury](http://github.com/SebThieu)
|
||||
Riza Emet
|
||||
[Lukas Plachy](http://github.com/rheingold)
|
||||
Gyuha Shin
|
||||
[Stefan](http://github.com/polluks)
|
||||
[emazv72](http://github.com/emazv72)
|
||||
[Vladimir Semenov](http://github.com/sli-pro)
|
||||
[Marco Sousa](http://github.com/marcomsousa)
|
||||
[wwj402](http://github.com/wwj402)
|
||||
[Fyers](http://github.com/Fyers)
|
||||
[pablomh](http://github.com/pablomh)
|
||||
[Damian Szczepanik](http://github.com/damianszczepanik)
|
||||
[Mant1kor](http://github.com/Mant1kor)
|
||||
|
||||
# Included Source Code
|
||||
|
||||
**[Command Line Arguments Parser](http://www.codeproject.com/KB/recipes/command_line.aspx)**
|
||||
Copyright © 2002 Richard Lopes
|
||||
MIT License
|
||||
|
||||
**[FilteredPropertyGrid](http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx)**
|
||||
Copyright © 2006 Azuria
|
||||
|
||||
**[InputBox](http://www.csharp-examples.net/inputbox/)**
|
||||
Copyright © 2016 Jan Slama
|
||||
|
||||
**[IP TextBox](http://www.codeproject.com/Articles/11576/IP-TextBox)**
|
||||
Copyright © 2005 mawnkay
|
||||
|
||||
**[PortableSettingsProvider](https://github.com/crdx/PortableSettingsProvider)**
|
||||
Copyright © 2014 crdx
|
||||
|
||||
**[ADTree](http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx)**
|
||||
Copyright © 2004 Marc Merritt © 2008 Felix Deimel
|
||||
|
||||
# Included Components
|
||||
|
||||
**[CefSharp](https://github.com/cefsharp/CefSharp)**
|
||||
Copyright © The CefSharp Authors
|
||||
MIT License
|
||||
|
||||
**[DockPanel Suite](https://github.com/dockpanelsuite/dockpanelsuite)**
|
||||
Copyright © 2018 @roken and @lextm (formerly Weifen Luo)
|
||||
MIT License
|
||||
|
||||
**[log4net](http://logging.apache.org/log4net/)**
|
||||
Copyright © 2001-2015 The Apache Software Foundation
|
||||
Apache License Version 2.0
|
||||
|
||||
**[PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/)**
|
||||
Copyright © 1997-2017 Simon Tatham
|
||||
MIT License
|
||||
|
||||
**[Silk Icon Set](http://www.famfamfam.com/)**
|
||||
Copyright © 2005-2008 FAMFAMFAM
|
||||
Creative Commons Attribution 2.5 License
|
||||
|
||||
**[SSH.NET](https://github.com/sshnet/SSH.NET)**
|
||||
Copyright © 2016
|
||||
MIT License
|
||||
|
||||
**[VncSharp](https://github.com/humphd/VncSharp) (Archived)**
|
||||
Copyright © 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
|
||||
**[ObjectListView](https://sourceforge.net/projects/objectlistview/)**
|
||||
Copyright © 2006-2016 Phillip Piper
|
||||
GNU General Public License (GPL) Version 3
|
||||
|
||||
**[ConsoleControl](https://github.com/dwmkerr/consolecontrol)**
|
||||
Copyright © 2015 Dave Kerr
|
||||
MIT License
|
||||
BIN
ExternalConnectors/CPS/CPS.ico
Normal file
BIN
ExternalConnectors/CPS/CPS.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
241
ExternalConnectors/CPS/CPSConnectionForm.Designer.cs
generated
Normal file
241
ExternalConnectors/CPS/CPSConnectionForm.Designer.cs
generated
Normal file
@@ -0,0 +1,241 @@
|
||||
namespace ExternalConnectors.CPS
|
||||
{
|
||||
partial class CPSConnectionForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CPSConnectionForm));
|
||||
tbServerURL = new TextBox();
|
||||
label3 = new Label();
|
||||
tbAPIKey = new TextBox();
|
||||
btnOK = new Button();
|
||||
btnCancel = new Button();
|
||||
tableLayoutPanel1 = new TableLayoutPanel();
|
||||
label1 = new Label();
|
||||
label6 = new Label();
|
||||
tbOTP = new TextBox();
|
||||
cbUseSSO = new CheckBox();
|
||||
tableLayoutPanel2 = new TableLayoutPanel();
|
||||
label4 = new Label();
|
||||
tableLayoutPanel1.SuspendLayout();
|
||||
tableLayoutPanel2.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tbServerURL
|
||||
//
|
||||
tbServerURL.Dock = DockStyle.Fill;
|
||||
tbServerURL.Location = new Point(298, 5);
|
||||
tbServerURL.Margin = new Padding(5);
|
||||
tbServerURL.Name = "tbServerURL";
|
||||
tbServerURL.Size = new Size(611, 27);
|
||||
tbServerURL.TabIndex = 0;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Dock = DockStyle.Fill;
|
||||
label3.Location = new Point(5, 84);
|
||||
label3.Margin = new Padding(5, 0, 5, 0);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(283, 42);
|
||||
label3.TabIndex = 5;
|
||||
label3.Text = "API Key";
|
||||
label3.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tbAPIKey
|
||||
//
|
||||
tbAPIKey.Dock = DockStyle.Fill;
|
||||
tbAPIKey.Location = new Point(298, 89);
|
||||
tbAPIKey.Margin = new Padding(5);
|
||||
tbAPIKey.Name = "tbAPIKey";
|
||||
tbAPIKey.Size = new Size(611, 27);
|
||||
tbAPIKey.TabIndex = 4;
|
||||
tbAPIKey.UseSystemPasswordChar = true;
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
btnOK.Anchor = AnchorStyles.Right;
|
||||
btnOK.DialogResult = DialogResult.OK;
|
||||
btnOK.Location = new Point(337, 16);
|
||||
btnOK.Margin = new Padding(5);
|
||||
btnOK.Name = "btnOK";
|
||||
btnOK.Size = new Size(101, 35);
|
||||
btnOK.TabIndex = 6;
|
||||
btnOK.Text = "OK";
|
||||
btnOK.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
btnCancel.Anchor = AnchorStyles.Left;
|
||||
btnCancel.DialogResult = DialogResult.Cancel;
|
||||
btnCancel.Location = new Point(474, 16);
|
||||
btnCancel.Margin = new Padding(5);
|
||||
btnCancel.Name = "btnCancel";
|
||||
btnCancel.Size = new Size(101, 35);
|
||||
btnCancel.TabIndex = 11;
|
||||
btnCancel.Text = "Cancel";
|
||||
btnCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
tableLayoutPanel1.ColumnCount = 2;
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 32.06997F));
|
||||
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 67.93003F));
|
||||
tableLayoutPanel1.Controls.Add(label1, 0, 0);
|
||||
tableLayoutPanel1.Controls.Add(label3, 0, 2);
|
||||
tableLayoutPanel1.Controls.Add(tbServerURL, 1, 0);
|
||||
tableLayoutPanel1.Controls.Add(tbAPIKey, 1, 2);
|
||||
tableLayoutPanel1.Controls.Add(label6, 0, 3);
|
||||
tableLayoutPanel1.Controls.Add(tbOTP, 1, 3);
|
||||
tableLayoutPanel1.Controls.Add(cbUseSSO, 0, 1);
|
||||
tableLayoutPanel1.Dock = DockStyle.Top;
|
||||
tableLayoutPanel1.Location = new Point(0, 0);
|
||||
tableLayoutPanel1.Margin = new Padding(5);
|
||||
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
tableLayoutPanel1.RowCount = 5;
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));
|
||||
tableLayoutPanel1.Size = new Size(914, 212);
|
||||
tableLayoutPanel1.TabIndex = 12;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Dock = DockStyle.Fill;
|
||||
label1.Location = new Point(5, 0);
|
||||
label1.Margin = new Padding(5, 0, 5, 0);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(283, 42);
|
||||
label1.TabIndex = 2;
|
||||
label1.Text = "Passwordstate URL";
|
||||
label1.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Dock = DockStyle.Fill;
|
||||
label6.Location = new Point(3, 126);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new Size(287, 42);
|
||||
label6.TabIndex = 15;
|
||||
label6.Text = "2FA OTP (Optional)";
|
||||
//
|
||||
// tbOTP
|
||||
//
|
||||
tbOTP.Dock = DockStyle.Fill;
|
||||
tbOTP.Location = new Point(298, 131);
|
||||
tbOTP.Margin = new Padding(5);
|
||||
tbOTP.Name = "tbOTP";
|
||||
tbOTP.Size = new Size(611, 27);
|
||||
tbOTP.TabIndex = 5;
|
||||
//
|
||||
// cbUseSSO
|
||||
//
|
||||
cbUseSSO.Anchor = AnchorStyles.Left;
|
||||
cbUseSSO.AutoSize = true;
|
||||
cbUseSSO.Location = new Point(5, 53);
|
||||
cbUseSSO.Margin = new Padding(5, 5, 5, 0);
|
||||
cbUseSSO.Name = "cbUseSSO";
|
||||
cbUseSSO.Size = new Size(157, 24);
|
||||
cbUseSSO.TabIndex = 14;
|
||||
cbUseSSO.Text = "Use SSO / WinAuth";
|
||||
cbUseSSO.UseVisualStyleBackColor = true;
|
||||
cbUseSSO.CheckedChanged += cbUseSSO_CheckedChanged;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
tableLayoutPanel2.ColumnCount = 5;
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 106F));
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 26F));
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
|
||||
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 107F));
|
||||
tableLayoutPanel2.Controls.Add(btnOK, 1, 0);
|
||||
tableLayoutPanel2.Controls.Add(btnCancel, 3, 0);
|
||||
tableLayoutPanel2.Dock = DockStyle.Bottom;
|
||||
tableLayoutPanel2.Location = new Point(0, 300);
|
||||
tableLayoutPanel2.Margin = new Padding(5);
|
||||
tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
tableLayoutPanel2.RowCount = 1;
|
||||
tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
|
||||
tableLayoutPanel2.Size = new Size(914, 67);
|
||||
tableLayoutPanel2.TabIndex = 13;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Dock = DockStyle.Fill;
|
||||
label4.Location = new Point(0, 212);
|
||||
label4.Margin = new Padding(5, 0, 5, 0);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(345, 20);
|
||||
label4.TabIndex = 14;
|
||||
label4.Text = "URL is the base URL, like https://pass.domain.local/";
|
||||
label4.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// CPSConnectionForm
|
||||
//
|
||||
AcceptButton = btnOK;
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(914, 367);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(tableLayoutPanel2);
|
||||
Controls.Add(tableLayoutPanel1);
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
Margin = new Padding(5);
|
||||
Name = "CPSConnectionForm";
|
||||
Text = "Passwordstate API Login Data";
|
||||
Activated += CPSConnectionForm_Activated;
|
||||
tableLayoutPanel1.ResumeLayout(false);
|
||||
tableLayoutPanel1.PerformLayout();
|
||||
tableLayoutPanel2.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Label label3;
|
||||
|
||||
public System.Windows.Forms.TextBox tbServerURL;
|
||||
//public System.Windows.Forms.TextBox tbUsername;
|
||||
public System.Windows.Forms.TextBox tbAPIKey;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
public System.Windows.Forms.CheckBox cbUseSSO;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private Label label6;
|
||||
public TextBox tbOTP;
|
||||
}
|
||||
}
|
||||
41
ExternalConnectors/CPS/CPSConnectionForm.cs
Normal file
41
ExternalConnectors/CPS/CPSConnectionForm.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace ExternalConnectors.CPS
|
||||
{
|
||||
public partial class CPSConnectionForm : Form
|
||||
{
|
||||
public CPSConnectionForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CPSConnectionForm_Activated(object sender, EventArgs e)
|
||||
{
|
||||
SetVisibility();
|
||||
if (cbUseSSO.Checked)
|
||||
btnOK.Focus();
|
||||
else
|
||||
{
|
||||
if (tbAPIKey.Text.Length == 0)
|
||||
tbAPIKey.Focus();
|
||||
else
|
||||
tbOTP.Focus();
|
||||
}
|
||||
|
||||
tbAPIKey.Focus();
|
||||
if (!string.IsNullOrEmpty(tbAPIKey.Text) || cbUseSSO.Checked == true)
|
||||
tbOTP.Focus();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void cbUseSSO_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetVisibility();
|
||||
}
|
||||
private void SetVisibility()
|
||||
{
|
||||
bool ch = cbUseSSO.Checked;
|
||||
tbAPIKey.Enabled = !ch;
|
||||
//tbUsername.Enabled = !ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
149
ExternalConnectors/CPS/CPSConnectionForm.resx
Normal file
149
ExternalConnectors/CPS/CPSConnectionForm.resx
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAA
|
||||
AAAtLDAA+PDaAP///wD79ugA/PrzAPf39wBGRUkA7NacAM2WAAA3z6kA+Pz/AIKBgwD+//4A4sNtAHXe
|
||||
xAD8+vIAjuTOANOjHgDV6/4AJZf3APn5+QDw37IAIB8jAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
301
ExternalConnectors/CPS/PasswordstateInterface.cs
Normal file
301
ExternalConnectors/CPS/PasswordstateInterface.cs
Normal file
@@ -0,0 +1,301 @@
|
||||
using Microsoft.Win32;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Org.BouncyCastle.Crypto.Parameters;
|
||||
using Org.BouncyCastle.OpenSsl;
|
||||
using Org.BouncyCastle.Security;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
namespace ExternalConnectors.CPS;
|
||||
|
||||
public class PasswordstateInterface
|
||||
{
|
||||
private static class CPSConnectionData
|
||||
{
|
||||
public static string ssUsername = "";
|
||||
public static string ssPassword = "";
|
||||
public static string ssUrl = "";
|
||||
public static string ssOTP = "";
|
||||
public static DateTime ssOTPTimeStampExpiration;
|
||||
|
||||
public static bool ssSSO = false;
|
||||
public static bool initdone = false;
|
||||
|
||||
//token
|
||||
//public static string ssTokenBearer = "";
|
||||
//public static DateTime ssTokenExpiresOn = DateTime.UtcNow;
|
||||
//public static string ssTokenRefresh = "";
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
// 2024-05-04 passwordstate currently does not support auth tokens, so we need to re-enter otp codes frequently
|
||||
if (!string.IsNullOrEmpty(ssOTP) && DateTime.Now > ssOTPTimeStampExpiration)
|
||||
{
|
||||
ssOTP = "";
|
||||
initdone = false;
|
||||
}
|
||||
|
||||
if (initdone == true)
|
||||
return;
|
||||
|
||||
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteCPSInterface");
|
||||
try
|
||||
{
|
||||
// display gui and ask for data
|
||||
CPSConnectionForm f = new CPSConnectionForm();
|
||||
//string? un = key.GetValue("Username") as string;
|
||||
//f.tbUsername.Text = un ?? "";
|
||||
f.tbAPIKey.Text = CPSConnectionData.ssPassword; // in OTP refresh cases, this value might already be filled
|
||||
|
||||
string? url = key.GetValue("URL") as string;
|
||||
if (url == null || !url.Contains("://"))
|
||||
url = "https://cred.domain.local/SecretServer";
|
||||
f.tbServerURL.Text = url;
|
||||
|
||||
var b = key.GetValue("SSO");
|
||||
if (b == null || (string)b != "True")
|
||||
ssSSO = false;
|
||||
else
|
||||
ssSSO = true;
|
||||
f.cbUseSSO.Checked = ssSSO;
|
||||
|
||||
// show dialog
|
||||
while (true)
|
||||
{
|
||||
_ = f.ShowDialog();
|
||||
|
||||
if (f.DialogResult != DialogResult.OK)
|
||||
return;
|
||||
|
||||
// store values to memory
|
||||
//ssUsername = f.tbUsername.Text;
|
||||
ssPassword = f.tbAPIKey.Text;
|
||||
ssUrl = f.tbServerURL.Text;
|
||||
ssSSO = f.cbUseSSO.Checked;
|
||||
ssOTP = f.tbOTP.Text;
|
||||
ssOTPTimeStampExpiration = DateTime.Now.AddSeconds(30);
|
||||
// check connection first
|
||||
try
|
||||
{
|
||||
if (TestCredentials() == true)
|
||||
{
|
||||
initdone = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Test Credentials failed - please check your credentials");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// write values to registry
|
||||
//key.SetValue("Username", ssUsername);
|
||||
key.SetValue("URL", ssUrl);
|
||||
key.SetValue("SSO", ssSSO);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
key.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TestCredentials()
|
||||
{
|
||||
return ConnectionTest();
|
||||
}
|
||||
private static bool ConnectionTest()
|
||||
{
|
||||
if (CPSConnectionData.ssSSO)
|
||||
{
|
||||
string url = $"{CPSConnectionData.ssUrl}/winapi/passwordlists/";
|
||||
|
||||
using HttpClient client = new HttpClient(new HttpClientHandler() { UseDefaultCredentials = true });
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "mRemote");
|
||||
client.DefaultRequestHeaders.Add("OTP", CPSConnectionData.ssOTP);
|
||||
|
||||
var json = client.GetStringAsync(url).Result;
|
||||
JsonNode? data = JsonSerializer.Deserialize<JsonNode>(json);
|
||||
if (data == null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
string url = $"{CPSConnectionData.ssUrl}/api/passwordlists/";
|
||||
using HttpClient client = new HttpClient();
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "mRemote");
|
||||
client.DefaultRequestHeaders.Add("APIKey", CPSConnectionData.ssPassword);
|
||||
client.DefaultRequestHeaders.Add("OTP", CPSConnectionData.ssOTP);
|
||||
|
||||
var json = client.GetStringAsync(url).Result;
|
||||
JsonNode? data = JsonSerializer.Deserialize<JsonNode>(json);
|
||||
if (data == null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static JsonNode? FetchDataWinAuth(int secretID)
|
||||
{
|
||||
string url = $"{CPSConnectionData.ssUrl}/winapi/passwords/{secretID}";
|
||||
|
||||
using HttpClient client = new HttpClient(new HttpClientHandler() { UseDefaultCredentials = true });
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "mRemote");
|
||||
client.DefaultRequestHeaders.Add("OTP", CPSConnectionData.ssOTP);
|
||||
|
||||
var json = client.GetStringAsync(url).Result;
|
||||
JsonNode? data = JsonSerializer.Deserialize<JsonNode>(json);
|
||||
if (data == null)
|
||||
return null;
|
||||
JsonNode? element = data[0];
|
||||
return element;
|
||||
}
|
||||
private static JsonNode? FetchDataAPIKeyAuth(int secretID)
|
||||
{
|
||||
string url = $"{CPSConnectionData.ssUrl}/api/passwords/{secretID}";
|
||||
|
||||
using HttpClient client = new HttpClient();
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "mRemote");
|
||||
client.DefaultRequestHeaders.Add("APIKey", CPSConnectionData.ssPassword);
|
||||
client.DefaultRequestHeaders.Add("OTP", CPSConnectionData.ssOTP);
|
||||
|
||||
var json = client.GetStringAsync(url).Result;
|
||||
JsonNode? data = JsonSerializer.Deserialize<JsonNode>(json);
|
||||
if (data == null)
|
||||
return null;
|
||||
JsonNode? element = data[0];
|
||||
return element;
|
||||
}
|
||||
|
||||
private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain, out string privatekey)
|
||||
{
|
||||
// clear return variables
|
||||
secretDomain = "";
|
||||
secretUsername = "";
|
||||
secretPassword = "";
|
||||
privatekey = "";
|
||||
string privatekeypassphrase = "";
|
||||
JsonNode? element = null;
|
||||
|
||||
if (CPSConnectionData.ssSSO)
|
||||
element = FetchDataWinAuth(secretID);
|
||||
else
|
||||
element = FetchDataAPIKeyAuth(secretID);
|
||||
|
||||
if (element == null)
|
||||
return;
|
||||
|
||||
var dom = element["Domain"];
|
||||
if (dom != null) secretDomain = dom.ToString();
|
||||
|
||||
var user = element["UserName"];
|
||||
if (user != null) secretUsername = user.ToString();
|
||||
|
||||
var pw = element["Password"];
|
||||
if (pw != null) secretPassword = pw.ToString();
|
||||
|
||||
var privkey = element["GenericField1"];
|
||||
if (privkey != null) privatekey = privkey.ToString();
|
||||
|
||||
var phrase = element["GenericField3"];
|
||||
if (phrase != null) privatekeypassphrase = phrase.ToString();
|
||||
|
||||
// need to decode the private key?
|
||||
if (!string.IsNullOrEmpty(privatekeypassphrase))
|
||||
{
|
||||
try
|
||||
{
|
||||
var key = DecodePrivateKey(privatekey, privatekeypassphrase);
|
||||
privatekey = key;
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// conversion to putty format necessary?
|
||||
if (!string.IsNullOrEmpty(privatekey) && !privatekey.StartsWith("PuTTY-User-Key-File-2"))
|
||||
{
|
||||
try
|
||||
{
|
||||
RSACryptoServiceProvider key = ImportPrivateKey(privatekey);
|
||||
privatekey = PuttyKeyFileGenerator.ToPuttyPrivateKey(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region PUTTY KEY HANDLING
|
||||
// decode rsa private key with encryption password
|
||||
private static string DecodePrivateKey(string encryptedPrivateKey, string password)
|
||||
{
|
||||
TextReader textReader = new StringReader(encryptedPrivateKey);
|
||||
PemReader pemReader = new PemReader(textReader, new PasswordFinder(password));
|
||||
|
||||
AsymmetricCipherKeyPair keyPair = (AsymmetricCipherKeyPair)pemReader.ReadObject();
|
||||
|
||||
TextWriter textWriter = new StringWriter();
|
||||
var pemWriter = new PemWriter(textWriter);
|
||||
pemWriter.WriteObject(keyPair.Private);
|
||||
pemWriter.Writer.Flush();
|
||||
|
||||
return ""+textWriter.ToString();
|
||||
}
|
||||
private class PasswordFinder : IPasswordFinder
|
||||
{
|
||||
private string password;
|
||||
|
||||
public PasswordFinder(string password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
public char[] GetPassword()
|
||||
{
|
||||
return password.ToCharArray();
|
||||
}
|
||||
}
|
||||
|
||||
// read private key pem string to rsacryptoserviceprovider
|
||||
public static RSACryptoServiceProvider ImportPrivateKey(string pem)
|
||||
{
|
||||
PemReader pr = new PemReader(new StringReader(pem));
|
||||
AsymmetricCipherKeyPair KeyPair = (AsymmetricCipherKeyPair)pr.ReadObject();
|
||||
RSAParameters rsaParams = DotNetUtilities.ToRSAParameters((RsaPrivateCrtKeyParameters)KeyPair.Private);
|
||||
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
|
||||
rsa.ImportParameters(rsaParams);
|
||||
return rsa;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
// input: must be the secret id to fetch
|
||||
public static void FetchSecretFromServer(string secretID, out string username, out string password, out string domain, out string privatekey)
|
||||
{
|
||||
// get secret id
|
||||
int sid = Int32.Parse(secretID);
|
||||
|
||||
// init connection credentials, display popup if necessary
|
||||
CPSConnectionData.Init();
|
||||
|
||||
// get the secret
|
||||
FetchSecret(sid, out username, out password, out domain, out privatekey);
|
||||
}
|
||||
}
|
||||
BIN
ExternalConnectors/DSS/DSS.ico
Normal file
BIN
ExternalConnectors/DSS/DSS.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -1,4 +1,4 @@
|
||||
namespace ExternalConnectors.TSS
|
||||
namespace ExternalConnectors.DSS
|
||||
{
|
||||
partial class SSConnectionForm
|
||||
{
|
||||
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SSConnectionForm));
|
||||
this.tbSSURL = new System.Windows.Forms.TextBox();
|
||||
this.tbUsername = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
@@ -39,6 +40,8 @@
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cbUseSSO = new System.Windows.Forms.CheckBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.tbOTP = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
@@ -48,29 +51,29 @@
|
||||
// tbSSURL
|
||||
//
|
||||
this.tbSSURL.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbSSURL.Location = new System.Drawing.Point(260, 4);
|
||||
this.tbSSURL.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tbSSURL.Location = new System.Drawing.Point(298, 5);
|
||||
this.tbSSURL.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tbSSURL.Name = "tbSSURL";
|
||||
this.tbSSURL.Size = new System.Drawing.Size(536, 23);
|
||||
this.tbSSURL.Size = new System.Drawing.Size(611, 27);
|
||||
this.tbSSURL.TabIndex = 0;
|
||||
//
|
||||
// tbUsername
|
||||
//
|
||||
this.tbUsername.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbUsername.Location = new System.Drawing.Point(260, 35);
|
||||
this.tbUsername.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tbUsername.Location = new System.Drawing.Point(298, 47);
|
||||
this.tbUsername.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tbUsername.Name = "tbUsername";
|
||||
this.tbUsername.Size = new System.Drawing.Size(536, 23);
|
||||
this.tbUsername.Size = new System.Drawing.Size(611, 27);
|
||||
this.tbUsername.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label3.Location = new System.Drawing.Point(4, 62);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label3.Location = new System.Drawing.Point(5, 84);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(248, 23);
|
||||
this.label3.Size = new System.Drawing.Size(283, 42);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Password";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -78,10 +81,10 @@
|
||||
// tbPassword
|
||||
//
|
||||
this.tbPassword.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbPassword.Location = new System.Drawing.Point(260, 66);
|
||||
this.tbPassword.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tbPassword.Location = new System.Drawing.Point(298, 89);
|
||||
this.tbPassword.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tbPassword.Name = "tbPassword";
|
||||
this.tbPassword.Size = new System.Drawing.Size(536, 23);
|
||||
this.tbPassword.Size = new System.Drawing.Size(611, 27);
|
||||
this.tbPassword.TabIndex = 4;
|
||||
this.tbPassword.UseSystemPasswordChar = true;
|
||||
//
|
||||
@@ -89,11 +92,11 @@
|
||||
//
|
||||
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOK.Location = new System.Drawing.Point(296, 12);
|
||||
this.btnOK.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnOK.Location = new System.Drawing.Point(337, 16);
|
||||
this.btnOK.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(88, 26);
|
||||
this.btnOK.TabIndex = 10;
|
||||
this.btnOK.Size = new System.Drawing.Size(101, 35);
|
||||
this.btnOK.TabIndex = 6;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
//
|
||||
@@ -101,10 +104,10 @@
|
||||
//
|
||||
this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(415, 12);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.btnCancel.Location = new System.Drawing.Point(474, 16);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(88, 26);
|
||||
this.btnCancel.Size = new System.Drawing.Size(101, 35);
|
||||
this.btnCancel.TabIndex = 11;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
@@ -114,37 +117,37 @@
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.06997F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.93003F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label5, 1, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tbSSURL, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.cbUseSSO, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tbUsername, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tbPassword, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.cbUseSSO, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tbOTP, 1, 3);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 4;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 108);
|
||||
this.tableLayoutPanel1.RowCount = 5;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(914, 212);
|
||||
this.tableLayoutPanel1.TabIndex = 12;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label5.Location = new System.Drawing.Point(260, 85);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label5.Location = new System.Drawing.Point(298, 168);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(536, 23);
|
||||
this.label5.Size = new System.Drawing.Size(611, 44);
|
||||
this.label5.TabIndex = 15;
|
||||
this.label5.Text = "For SSO to work, additional IIS configuration is required!";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -153,10 +156,10 @@
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label1.Location = new System.Drawing.Point(4, 0);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Location = new System.Drawing.Point(5, 0);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(248, 31);
|
||||
this.label1.Size = new System.Drawing.Size(283, 42);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Secret Server URL";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -165,10 +168,10 @@
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label2.Location = new System.Drawing.Point(4, 31);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Location = new System.Drawing.Point(5, 42);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(248, 31);
|
||||
this.label2.Size = new System.Drawing.Size(283, 42);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "DOMAIN\\Username";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -176,42 +179,61 @@
|
||||
// cbUseSSO
|
||||
//
|
||||
this.cbUseSSO.AutoSize = true;
|
||||
this.cbUseSSO.Location = new System.Drawing.Point(4, 89);
|
||||
this.cbUseSSO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 0);
|
||||
this.cbUseSSO.Location = new System.Drawing.Point(5, 173);
|
||||
this.cbUseSSO.Margin = new System.Windows.Forms.Padding(5, 5, 5, 0);
|
||||
this.cbUseSSO.Name = "cbUseSSO";
|
||||
this.cbUseSSO.Size = new System.Drawing.Size(69, 19);
|
||||
this.cbUseSSO.Size = new System.Drawing.Size(86, 24);
|
||||
this.cbUseSSO.TabIndex = 14;
|
||||
this.cbUseSSO.Text = "Use SSO";
|
||||
this.cbUseSSO.UseVisualStyleBackColor = true;
|
||||
this.cbUseSSO.CheckedChanged += new System.EventHandler(this.cbUseSSO_CheckedChanged);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label6.Location = new System.Drawing.Point(3, 126);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(287, 42);
|
||||
this.label6.TabIndex = 15;
|
||||
this.label6.Text = "2FA OTP (Optional)";
|
||||
//
|
||||
// tbOTP
|
||||
//
|
||||
this.tbOTP.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tbOTP.Location = new System.Drawing.Point(296, 130);
|
||||
this.tbOTP.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.tbOTP.Name = "tbOTP";
|
||||
this.tbOTP.Size = new System.Drawing.Size(615, 27);
|
||||
this.tbOTP.TabIndex = 5;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.ColumnCount = 5;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 106F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 23F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 26F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 107F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.btnOK, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.btnCancel, 3, 0);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 148);
|
||||
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 300);
|
||||
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 1;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(800, 50);
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(914, 67);
|
||||
this.tableLayoutPanel2.TabIndex = 13;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label4.Location = new System.Drawing.Point(0, 108);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label4.Location = new System.Drawing.Point(0, 212);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(341, 15);
|
||||
this.label4.Size = new System.Drawing.Size(427, 20);
|
||||
this.label4.TabIndex = 14;
|
||||
this.label4.Text = "URL is the base URL, like https://cred.domain.local/SecretServer";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
@@ -219,13 +241,14 @@
|
||||
// SSConnectionForm
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 198);
|
||||
this.ClientSize = new System.Drawing.Size(914, 367);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.tableLayoutPanel2);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.Name = "SSConnectionForm";
|
||||
this.Text = "Secret Server API Login Data";
|
||||
this.Activated += new System.EventHandler(this.SSConnectionForm_Activated);
|
||||
@@ -252,5 +275,7 @@
|
||||
public System.Windows.Forms.CheckBox cbUseSSO;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private Label label5;
|
||||
private Label label6;
|
||||
public TextBox tbOTP;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace ExternalConnectors.TSS
|
||||
namespace ExternalConnectors.DSS
|
||||
{
|
||||
public partial class SSConnectionForm : Form
|
||||
{
|
||||
@@ -13,7 +13,12 @@
|
||||
if (cbUseSSO.Checked)
|
||||
btnOK.Focus();
|
||||
else
|
||||
tbPassword.Focus();
|
||||
{
|
||||
if (tbPassword.Text.Length == 0)
|
||||
tbPassword.Focus();
|
||||
else
|
||||
tbOTP.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void cbUseSSO_CheckedChanged(object sender, EventArgs e)
|
||||
615
ExternalConnectors/DSS/SSConnectionForm.resx
Normal file
615
ExternalConnectors/DSS/SSConnectionForm.resx
Normal file
@@ -0,0 +1,615 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAQAQEAAAAEAIAAoQAAARgAAACAgAAABACAAKBAAAG5AAAAYGAAAAQAgACgJAACWUAAAEBAAAAEA
|
||||
IAAoBAAAvlkAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD9/f3e/f397vz9
|
||||
/e79/f3u7ezr7p6Xju5XTEHuNScV7i8hCe4r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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -12,7 +12,7 @@
|
||||
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
|
||||
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
|
||||
|
||||
namespace SecretServerAuthentication.TSS
|
||||
namespace SecretServerAuthentication.DSS
|
||||
{
|
||||
using System = global::System;
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace SecretServerAuthentication.TSS
|
||||
/// <param name="refresh_token">The refresh token. Required when refreshing a token.</param>
|
||||
/// <returns>Successful retrieval of an access token</returns>
|
||||
/// <exception cref="ApiException">A server side error occurred.</exception>
|
||||
public System.Threading.Tasks.Task<TokenResponse> AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token)
|
||||
public System.Threading.Tasks.Task<TokenResponse> AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token, string OTP)
|
||||
{
|
||||
return AuthorizeAsync(grant_type, username, password, refresh_token, System.Threading.CancellationToken.None);
|
||||
return AuthorizeAsync(grant_type, username, password, refresh_token, System.Threading.CancellationToken.None, OTP);
|
||||
}
|
||||
|
||||
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
||||
@@ -71,7 +71,7 @@ namespace SecretServerAuthentication.TSS
|
||||
/// <param name="refresh_token">The refresh token. Required when refreshing a token.</param>
|
||||
/// <returns>Successful retrieval of an access token</returns>
|
||||
/// <exception cref="ApiException">A server side error occurred.</exception>
|
||||
public async System.Threading.Tasks.Task<TokenResponse> AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token, System.Threading.CancellationToken cancellationToken)
|
||||
public async System.Threading.Tasks.Task<TokenResponse> AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token, System.Threading.CancellationToken cancellationToken, string OTP)
|
||||
{
|
||||
var urlBuilder_ = new System.Text.StringBuilder();
|
||||
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/oauth2/token");
|
||||
@@ -93,6 +93,9 @@ namespace SecretServerAuthentication.TSS
|
||||
keyValues_.Add(new System.Collections.Generic.KeyValuePair<string, string>("password", ConvertToString(password, System.Globalization.CultureInfo.InvariantCulture)));
|
||||
if (refresh_token != null)
|
||||
keyValues_.Add(new System.Collections.Generic.KeyValuePair<string, string>("refresh_token", ConvertToString(refresh_token, System.Globalization.CultureInfo.InvariantCulture)));
|
||||
if (OTP != null)
|
||||
request_.Headers.Add("OTP", ConvertToString(OTP, System.Globalization.CultureInfo.InvariantCulture));
|
||||
|
||||
request_.Content = new System.Net.Http.FormUrlEncodedContent(keyValues_);
|
||||
request_.Method = new System.Net.Http.HttpMethod("POST");
|
||||
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
||||
@@ -125,6 +128,7 @@ namespace SecretServerAuthentication.TSS
|
||||
{
|
||||
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
|
||||
}
|
||||
|
||||
return objectResponse_.Object;
|
||||
}
|
||||
else
|
||||
@@ -275,10 +279,25 @@ namespace SecretServerAuthentication.TSS
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public TokenResponseToken_type Token_type { get; set; }
|
||||
|
||||
|
||||
private string _Expires_in;
|
||||
/// <summary>Authentication token expiration time, in seconds</summary>
|
||||
[Newtonsoft.Json.JsonProperty("expires_in", Required = Newtonsoft.Json.Required.Always)]
|
||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
||||
public string Expires_in { get; set; }
|
||||
// public string Expires_in { get; set; }
|
||||
|
||||
public string Expires_in
|
||||
{
|
||||
get { return _Expires_in; }
|
||||
set
|
||||
{
|
||||
_Expires_in = value;
|
||||
Expires_on = DateTime.UtcNow.AddSeconds(Double.Parse(value) - 60);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Authentication token expiration time in UTC</summary>
|
||||
public DateTime Expires_on { get; set; }
|
||||
|
||||
/// <summary>Refresh token. This is only provided when the server is set to allow refresh tokens for web services and when the session timeout duration is not set to Unlimited.</summary>
|
||||
[Newtonsoft.Json.JsonProperty("refresh_token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
||||
341
ExternalConnectors/DSS/SecretServerInterface.cs
Normal file
341
ExternalConnectors/DSS/SecretServerInterface.cs
Normal file
@@ -0,0 +1,341 @@
|
||||
using Microsoft.Win32;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Org.BouncyCastle.Crypto.Parameters;
|
||||
using Org.BouncyCastle.OpenSsl;
|
||||
using Org.BouncyCastle.Security;
|
||||
using SecretServerAuthentication.DSS;
|
||||
using SecretServerRestClient.DSS;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace ExternalConnectors.DSS;
|
||||
|
||||
public class SecretServerInterface
|
||||
{
|
||||
private static class SSConnectionData
|
||||
{
|
||||
public static string ssUsername = "";
|
||||
public static string ssPassword = "";
|
||||
public static string ssUrl = "";
|
||||
public static string ssOTP = "";
|
||||
public static bool ssSSO = false;
|
||||
public static bool initdone = false;
|
||||
|
||||
//token
|
||||
public static string ssTokenBearer = "";
|
||||
public static DateTime ssTokenExpiresOn = DateTime.UtcNow;
|
||||
public static string ssTokenRefresh = "";
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
if (initdone == true)
|
||||
return;
|
||||
|
||||
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteSSInterface");
|
||||
try
|
||||
{
|
||||
// display gui and ask for data
|
||||
SSConnectionForm f = new();
|
||||
string? un = key.GetValue("Username") as string;
|
||||
f.tbUsername.Text = un ?? "";
|
||||
f.tbPassword.Text = SSConnectionData.ssPassword; // in OTP refresh cases, this value might already be filled
|
||||
|
||||
string? url = key.GetValue("URL") as string;
|
||||
if (url == null || !url.Contains("://"))
|
||||
url = "https://cred.domain.local/SecretServer";
|
||||
f.tbSSURL.Text = url;
|
||||
|
||||
var b = key.GetValue("SSO");
|
||||
if (b == null || (string)b != "True")
|
||||
ssSSO = false;
|
||||
else
|
||||
ssSSO = true;
|
||||
f.cbUseSSO.Checked = ssSSO;
|
||||
|
||||
// show dialog
|
||||
while (true)
|
||||
{
|
||||
_ = f.ShowDialog();
|
||||
|
||||
if (f.DialogResult != DialogResult.OK)
|
||||
return;
|
||||
|
||||
// store values to memory
|
||||
ssUsername = f.tbUsername.Text;
|
||||
ssPassword = f.tbPassword.Text;
|
||||
ssUrl = f.tbSSURL.Text;
|
||||
ssSSO = f.cbUseSSO.Checked;
|
||||
ssOTP = f.tbOTP.Text;
|
||||
// check connection first
|
||||
try
|
||||
{
|
||||
if (TestCredentials() == true)
|
||||
{
|
||||
initdone = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Test Credentials failed - please check your credentials");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// write values to registry
|
||||
key.SetValue("Username", ssUsername);
|
||||
key.SetValue("URL", ssUrl);
|
||||
key.SetValue("SSO", ssSSO);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
key.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TestCredentials()
|
||||
{
|
||||
if (SSConnectionData.ssSSO)
|
||||
{
|
||||
// checking creds doesn't really make sense here, as we can't modify them anyway if something is wrong
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (!String.IsNullOrEmpty(GetToken()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static SecretsServiceClient ConstructSecretsServiceClient()
|
||||
{
|
||||
string baseURL = SSConnectionData.ssUrl;
|
||||
if (SSConnectionData.ssSSO)
|
||||
{
|
||||
// REQUIRES IIS CONFIG! https://docs.thycotic.com/ss/11.0.0/api-scripting/webservice-iwa-powershell
|
||||
var handler = new HttpClientHandler() { UseDefaultCredentials = true };
|
||||
var httpClient = new HttpClient(handler);
|
||||
{
|
||||
// Call REST API:
|
||||
return new SecretsServiceClient($"{baseURL}/winauthwebservices/api", httpClient);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var httpClient = new HttpClient();
|
||||
{
|
||||
|
||||
var token = GetToken();
|
||||
// Set credentials (token):
|
||||
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
|
||||
|
||||
// Call REST API:
|
||||
return new SecretsServiceClient($"{baseURL}/api", httpClient);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain, out string privatekey)
|
||||
{
|
||||
var client = ConstructSecretsServiceClient();
|
||||
SecretModel secret = client.GetSecretAsync(false, true, secretID, null).Result;
|
||||
|
||||
// clear return variables
|
||||
secretDomain = "";
|
||||
secretUsername = "";
|
||||
secretPassword = "";
|
||||
privatekey = "";
|
||||
string privatekeypassphrase = "";
|
||||
|
||||
// parse data and extract what we need
|
||||
foreach (var item in secret.Items)
|
||||
{
|
||||
if (item.FieldName.ToLower().Equals("domain"))
|
||||
secretDomain = item.ItemValue;
|
||||
else if (item.FieldName.ToLower().Equals("username"))
|
||||
secretUsername = item.ItemValue;
|
||||
else if (item.FieldName.ToLower().Equals("password"))
|
||||
secretPassword = item.ItemValue;
|
||||
else if (item.FieldName.ToLower().Equals("private key"))
|
||||
{
|
||||
client.ReadResponseNoJSONConvert = true;
|
||||
privatekey = client.GetFieldAsync(false, false, secretID, "private-key").Result;
|
||||
client.ReadResponseNoJSONConvert = false;
|
||||
}
|
||||
else if (item.FieldName.ToLower().Equals("private key passphrase"))
|
||||
privatekeypassphrase = item.ItemValue;
|
||||
}
|
||||
|
||||
// need to decode the private key?
|
||||
if (!string.IsNullOrEmpty(privatekeypassphrase))
|
||||
{
|
||||
try
|
||||
{
|
||||
var key = DecodePrivateKey(privatekey, privatekeypassphrase);
|
||||
privatekey = key;
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// conversion to putty format necessary?
|
||||
if (!string.IsNullOrEmpty(privatekey) && !privatekey.StartsWith("PuTTY-User-Key-File-2"))
|
||||
{
|
||||
try
|
||||
{
|
||||
RSACryptoServiceProvider key = ImportPrivateKey(privatekey);
|
||||
privatekey = PuttyKeyFileGenerator.ToPuttyPrivateKey(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region PUTTY KEY HANDLING
|
||||
// decode rsa private key with encryption password
|
||||
private static string DecodePrivateKey(string encryptedPrivateKey, string password)
|
||||
{
|
||||
TextReader textReader = new StringReader(encryptedPrivateKey);
|
||||
PemReader pemReader = new(textReader, new PasswordFinder(password));
|
||||
|
||||
AsymmetricCipherKeyPair keyPair = (AsymmetricCipherKeyPair)pemReader.ReadObject();
|
||||
|
||||
TextWriter textWriter = new StringWriter();
|
||||
var pemWriter = new PemWriter(textWriter);
|
||||
pemWriter.WriteObject(keyPair.Private);
|
||||
pemWriter.Writer.Flush();
|
||||
|
||||
return ""+textWriter.ToString();
|
||||
}
|
||||
private class PasswordFinder : IPasswordFinder
|
||||
{
|
||||
private string password;
|
||||
|
||||
public PasswordFinder(string password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
public char[] GetPassword()
|
||||
{
|
||||
return password.ToCharArray();
|
||||
}
|
||||
}
|
||||
|
||||
// read private key pem string to rsacryptoserviceprovider
|
||||
public static RSACryptoServiceProvider ImportPrivateKey(string pem)
|
||||
{
|
||||
PemReader pr = new(new StringReader(pem));
|
||||
AsymmetricCipherKeyPair KeyPair = (AsymmetricCipherKeyPair)pr.ReadObject();
|
||||
RSAParameters rsaParams = DotNetUtilities.ToRSAParameters((RsaPrivateCrtKeyParameters)KeyPair.Private);
|
||||
RSACryptoServiceProvider rsa = new();
|
||||
rsa.ImportParameters(rsaParams);
|
||||
return rsa;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region TOKEN
|
||||
private static string GetToken()
|
||||
{
|
||||
// if there is no token, fetch a fresh one
|
||||
if (String.IsNullOrEmpty(SSConnectionData.ssTokenBearer))
|
||||
{
|
||||
return GetTokenFresh();
|
||||
}
|
||||
// if there is a token, check if it is valid
|
||||
if (SSConnectionData.ssTokenExpiresOn >= DateTime.UtcNow)
|
||||
{
|
||||
return SSConnectionData.ssTokenBearer;
|
||||
}
|
||||
else
|
||||
{
|
||||
// try using refresh token
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
var tokenClient = new OAuth2ServiceClient(SSConnectionData.ssUrl, httpClient);
|
||||
TokenResponse token = new();
|
||||
try
|
||||
{
|
||||
token = tokenClient.AuthorizeAsync(Grant_type.Refresh_token, null, null, SSConnectionData.ssTokenRefresh, null).Result;
|
||||
var tokenResult = token.Access_token;
|
||||
|
||||
SSConnectionData.ssTokenBearer = tokenResult;
|
||||
SSConnectionData.ssTokenRefresh = token.Refresh_token;
|
||||
SSConnectionData.ssTokenExpiresOn = token.Expires_on;
|
||||
return tokenResult;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// refresh token failed. clean memory and start fresh
|
||||
SSConnectionData.ssTokenBearer = "";
|
||||
SSConnectionData.ssTokenRefresh = "";
|
||||
SSConnectionData.ssTokenExpiresOn = DateTime.Now;
|
||||
// if OTP is required we need to ask user for a new OTP
|
||||
if (!String.IsNullOrEmpty(SSConnectionData.ssOTP))
|
||||
{
|
||||
SSConnectionData.initdone = false;
|
||||
// the call below executes a connection test, which fetches a valid token
|
||||
SSConnectionData.Init();
|
||||
// we now have a fresh token in memory. return it to caller
|
||||
return SSConnectionData.ssTokenBearer;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no user interaction required. get a fresh token and return it to caller
|
||||
return GetTokenFresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static string GetTokenFresh()
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
// Authenticate:
|
||||
var tokenClient = new OAuth2ServiceClient(SSConnectionData.ssUrl, httpClient);
|
||||
// call below will throw an exception if the creds are invalid
|
||||
var token = tokenClient.AuthorizeAsync(Grant_type.Password, SSConnectionData.ssUsername, SSConnectionData.ssPassword, null, SSConnectionData.ssOTP).Result;
|
||||
// here we can be sure the creds are ok - return success state
|
||||
var tokenResult = token.Access_token;
|
||||
|
||||
SSConnectionData.ssTokenBearer = tokenResult;
|
||||
SSConnectionData.ssTokenRefresh = token.Refresh_token;
|
||||
SSConnectionData.ssTokenExpiresOn = token.Expires_on;
|
||||
return tokenResult;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
// input must be the secret id to fetch
|
||||
public static void FetchSecretFromServer(string input, out string username, out string password, out string domain, out string privatekey)
|
||||
{
|
||||
// get secret id
|
||||
int secretID = Int32.Parse(input);
|
||||
|
||||
// init connection credentials, display popup if necessary
|
||||
SSConnectionData.Init();
|
||||
|
||||
// get the secret
|
||||
FetchSecret(secretID, out username, out password, out domain, out privatekey);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
|
||||
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
|
||||
|
||||
namespace SecretServerRestClient.TSS
|
||||
namespace SecretServerRestClient.DSS
|
||||
{
|
||||
using System = global::System;
|
||||
|
||||
@@ -72886,6 +72886,9 @@ namespace SecretServerRestClient.TSS
|
||||
}
|
||||
|
||||
public bool ReadResponseAsString { get; set; }
|
||||
// RR 2022-09-97
|
||||
public bool ReadResponseNoJSONConvert { get; set; }
|
||||
// RR END
|
||||
|
||||
protected virtual async System.Threading.Tasks.Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -72894,6 +72897,14 @@ namespace SecretServerRestClient.TSS
|
||||
return new ObjectResponseResult<T>(default(T), string.Empty);
|
||||
}
|
||||
|
||||
// RR 2022-09-97
|
||||
if (ReadResponseNoJSONConvert)
|
||||
{
|
||||
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
return new ObjectResponseResult<T>((T)(object)responseText, responseText); // not sure if this is best practice, but it works.
|
||||
}
|
||||
// RR END
|
||||
|
||||
if (ReadResponseAsString)
|
||||
{
|
||||
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
@@ -7,22 +7,24 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<Platforms>x64</Platforms>
|
||||
<Configurations>Debug;Release;Debug Portable;Release Portable</Configurations>
|
||||
<Configurations>Debug;Release;Debug Portable;Release Portable;Deploy to github</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Portable|x64'">
|
||||
<Optimize>True</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.7.5.9" />
|
||||
<PackageReference Include="AWSSDK.EC2" Version="3.7.50.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.7.401.6" />
|
||||
<PackageReference Include="AWSSDK.EC2" Version="3.7.429.1" />
|
||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="AWS\AWSConnectionForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="TSS\SSConnectionForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="AWS\AWSConnectionForm.cs" />
|
||||
<Compile Update="CPS\CPSConnectionForm.cs" />
|
||||
<Compile Update="DSS\SSConnectionForm.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
111
ExternalConnectors/PuttyKeyFileGenerator.cs
Normal file
111
ExternalConnectors/PuttyKeyFileGenerator.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ExternalConnectors;
|
||||
|
||||
public class PuttyKeyFileGenerator
|
||||
{
|
||||
private const int prefixSize = 4;
|
||||
private const int paddedPrefixSize = prefixSize + 1;
|
||||
private const int lineLength = 64;
|
||||
private const string keyType = "ssh-rsa";
|
||||
private const string encryptionType = "none";
|
||||
|
||||
public static string ToPuttyPrivateKey(RSACryptoServiceProvider cryptoServiceProvider, string Comment = "imported-openssh-key")
|
||||
{
|
||||
var publicParameters = cryptoServiceProvider.ExportParameters(false);
|
||||
byte[] publicBuffer = new byte[3 + keyType.Length + GetPrefixSize(publicParameters.Exponent) + publicParameters.Exponent!.Length + GetPrefixSize(publicParameters.Modulus) + publicParameters.Modulus!.Length + 1];
|
||||
|
||||
using (var bw = new BinaryWriter(new MemoryStream(publicBuffer)))
|
||||
{
|
||||
bw.Write(new byte[] { 0x00, 0x00, 0x00 });
|
||||
bw.Write(Encoding.ASCII.GetBytes(keyType));
|
||||
PutPrefixed(bw, publicParameters.Exponent, CheckIsNeddPadding(publicParameters.Exponent));
|
||||
PutPrefixed(bw, publicParameters.Modulus, CheckIsNeddPadding(publicParameters.Modulus));
|
||||
}
|
||||
var publicBlob = System.Convert.ToBase64String(publicBuffer);
|
||||
|
||||
var privateParameters = cryptoServiceProvider.ExportParameters(true);
|
||||
|
||||
byte[] privateBuffer = new byte[paddedPrefixSize + privateParameters.D!.Length + paddedPrefixSize + privateParameters.P!.Length + paddedPrefixSize + privateParameters.Q!.Length + paddedPrefixSize + privateParameters.InverseQ!.Length];
|
||||
|
||||
using (var bw = new BinaryWriter(new MemoryStream(privateBuffer)))
|
||||
{
|
||||
PutPrefixed(bw, privateParameters.D, true);
|
||||
PutPrefixed(bw, privateParameters.P, true);
|
||||
PutPrefixed(bw, privateParameters.Q, true);
|
||||
PutPrefixed(bw, privateParameters.InverseQ, true);
|
||||
}
|
||||
var privateBlob = System.Convert.ToBase64String(privateBuffer);
|
||||
|
||||
HMACSHA1 hmacSha1 = new(SHA1.Create().ComputeHash(Encoding.ASCII.GetBytes("putty-private-key-file-mac-key")));
|
||||
byte[] bytesToHash = new byte[prefixSize + keyType.Length + prefixSize + encryptionType.Length + prefixSize + Comment.Length + prefixSize + publicBuffer.Length + prefixSize + privateBuffer.Length];
|
||||
|
||||
using (var bw = new BinaryWriter(new MemoryStream(bytesToHash)))
|
||||
{
|
||||
PutPrefixed(bw, Encoding.ASCII.GetBytes(keyType));
|
||||
PutPrefixed(bw, Encoding.ASCII.GetBytes(encryptionType));
|
||||
PutPrefixed(bw, Encoding.ASCII.GetBytes(Comment));
|
||||
PutPrefixed(bw, publicBuffer);
|
||||
PutPrefixed(bw, privateBuffer);
|
||||
}
|
||||
|
||||
var hash = string.Join("", hmacSha1.ComputeHash(bytesToHash).Select(x => $"{x:x2}"));
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("PuTTY-User-Key-File-2: " + keyType);
|
||||
sb.AppendLine("Encryption: " + encryptionType);
|
||||
sb.AppendLine("Comment: " + Comment);
|
||||
|
||||
var publicLines = SpliceText(publicBlob, lineLength);
|
||||
sb.AppendLine("Public-Lines: " + publicLines.Length);
|
||||
foreach (var line in publicLines)
|
||||
{
|
||||
sb.AppendLine(line);
|
||||
}
|
||||
|
||||
var privateLines = SpliceText(privateBlob, lineLength);
|
||||
sb.AppendLine("Private-Lines: " + privateLines.Length);
|
||||
foreach (var line in privateLines)
|
||||
{
|
||||
sb.AppendLine(line);
|
||||
}
|
||||
|
||||
sb.AppendLine("Private-MAC: " + hash);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static void PutPrefixed(BinaryWriter bw, byte[] bytes, bool addLeadingNull = false)
|
||||
{
|
||||
bw.Write(BitConverter.GetBytes(bytes.Length + (addLeadingNull ? 1 : 0)).Reverse().ToArray());
|
||||
if (addLeadingNull)
|
||||
bw.Write(new byte[] { 0x00 });
|
||||
bw.Write(bytes);
|
||||
}
|
||||
|
||||
private static string[] SpliceText(string text, int lineLength)
|
||||
{
|
||||
return Regex.Matches(text, ".{1," + lineLength + "}").Cast<Match>().Select(m => m.Value).ToArray();
|
||||
}
|
||||
|
||||
private static int GetPrefixSize(byte[]? bytes)
|
||||
{
|
||||
if (bytes is null)
|
||||
return 0;
|
||||
|
||||
return CheckIsNeddPadding(bytes) ? paddedPrefixSize : prefixSize;
|
||||
}
|
||||
|
||||
private static bool CheckIsNeddPadding(byte[] bytes)
|
||||
{
|
||||
if (bytes is null || bytes.Length == 0)
|
||||
return false;
|
||||
|
||||
// 128 == 10000000
|
||||
// This means that the number of bits can be divided by 8.
|
||||
// According to the algorithm in putty, you need to add a padding.
|
||||
return bytes[0] >= 128;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,184 +0,0 @@
|
||||
using Microsoft.Win32;
|
||||
using SecretServerAuthentication.TSS;
|
||||
using SecretServerRestClient.TSS;
|
||||
|
||||
namespace ExternalConnectors.TSS
|
||||
{
|
||||
public class SecretServerInterface
|
||||
{
|
||||
private static class SSConnectionData
|
||||
{
|
||||
public static string ssUsername = "";
|
||||
public static string ssPassword = "";
|
||||
public static string ssUrl = "";
|
||||
public static bool ssSSO = false;
|
||||
|
||||
public static bool initdone = false;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
if (ssPassword != "" || initdone == true)
|
||||
return;
|
||||
|
||||
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteSSInterface");
|
||||
try
|
||||
{
|
||||
// display gui and ask for data
|
||||
SSConnectionForm f = new SSConnectionForm();
|
||||
string? un = key.GetValue("Username") as string;
|
||||
f.tbUsername.Text = un ?? "";
|
||||
|
||||
string? url = key.GetValue("URL") as string;
|
||||
if (url == null || !url.Contains("://"))
|
||||
url = "https://cred.domain.local/SecretServer";
|
||||
f.tbSSURL.Text = url;
|
||||
|
||||
var b = key.GetValue("SSO");
|
||||
if (b == null || (string)b != "True")
|
||||
ssSSO = false;
|
||||
else
|
||||
{
|
||||
ssSSO = true;
|
||||
initdone = true;
|
||||
}
|
||||
f.cbUseSSO.Checked = ssSSO;
|
||||
|
||||
// show dialog
|
||||
while(true)
|
||||
{
|
||||
_ = f.ShowDialog();
|
||||
|
||||
if (f.DialogResult != DialogResult.OK)
|
||||
return;
|
||||
|
||||
// store values to memory
|
||||
ssUsername = f.tbUsername.Text;
|
||||
ssPassword = f.tbPassword.Text;
|
||||
ssUrl = f.tbSSURL.Text;
|
||||
ssSSO = f.cbUseSSO.Checked;
|
||||
|
||||
// check connection first
|
||||
try
|
||||
{
|
||||
if (TestCredentials() == true)
|
||||
break;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("TestCredentials failed - please check your credentials");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// write values to registry
|
||||
key.SetValue("Username", ssUsername);
|
||||
key.SetValue("URL", ssUrl);
|
||||
key.SetValue("SSO", ssSSO);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
key.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TestCredentials()
|
||||
{
|
||||
string authUsername = SSConnectionData.ssUsername;
|
||||
string authPassword = SSConnectionData.ssPassword;
|
||||
string baseURL = SSConnectionData.ssUrl;
|
||||
|
||||
if (SSConnectionData.ssSSO)
|
||||
{
|
||||
// checking creds doesn't really make sense here, as we can't modify them anyway if something is wrong
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
// Authenticate:
|
||||
var tokenClient = new OAuth2ServiceClient(baseURL, httpClient);
|
||||
// call below will throw an exception if the creds are invalid
|
||||
var token = tokenClient.AuthorizeAsync(Grant_type.Password, authUsername, authPassword, null).Result;
|
||||
// here we can be sure the creds are ok - return success state
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain)
|
||||
{
|
||||
string authUsername = SSConnectionData.ssUsername;
|
||||
string authPassword = SSConnectionData.ssPassword;
|
||||
string baseURL = SSConnectionData.ssUrl;
|
||||
|
||||
SecretModel secret;
|
||||
if (SSConnectionData.ssSSO)
|
||||
{
|
||||
// REQUIRES IIS CONFIG! https://docs.thycotic.com/ss/11.0.0/api-scripting/webservice-iwa-powershell
|
||||
var handler = new HttpClientHandler() { UseDefaultCredentials = true };
|
||||
using (var httpClient = new HttpClient(handler))
|
||||
{
|
||||
// Call REST API:
|
||||
var client = new SecretsServiceClient($"{baseURL}/winauthwebservices/api", httpClient);
|
||||
secret = client.GetSecretAsync(false, true, secretID, null).Result;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
// Authenticate:
|
||||
var tokenClient = new OAuth2ServiceClient(baseURL, httpClient);
|
||||
var token = tokenClient.AuthorizeAsync(Grant_type.Password, authUsername, authPassword, null).Result;
|
||||
var tokenResult = token.Access_token;
|
||||
|
||||
// Set credentials (token):
|
||||
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", tokenResult);
|
||||
|
||||
// Call REST API:
|
||||
var client = new SecretsServiceClient($"{baseURL}/api", httpClient);
|
||||
secret = client.GetSecretAsync(false, true, secretID, null).Result;
|
||||
}
|
||||
}
|
||||
|
||||
// clear return variables
|
||||
secretDomain = "";
|
||||
secretUsername = "";
|
||||
secretPassword = "";
|
||||
|
||||
// parse data and extract what we need
|
||||
foreach (var item in secret.Items)
|
||||
{
|
||||
if (item.FieldName.ToLower().Equals("domain"))
|
||||
secretDomain = item.ItemValue;
|
||||
else if (item.FieldName.ToLower().Equals("username"))
|
||||
secretUsername = item.ItemValue;
|
||||
else if (item.FieldName.ToLower().Equals("password"))
|
||||
secretPassword = item.ItemValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// input must be in form "SSAPI:xxxx" where xxx is the secret id to fetch
|
||||
public static void FetchSecretFromServer(string input, out string username, out string password, out string domain)
|
||||
{
|
||||
// get secret id
|
||||
if (!input.StartsWith("SSAPI:"))
|
||||
throw new Exception("calling this function requires SSAPI: input");
|
||||
int secretID = Int32.Parse(input.Substring(6));
|
||||
|
||||
// init connection credentials, display popup if necessary
|
||||
SSConnectionData.Init();
|
||||
|
||||
// get the secret
|
||||
FetchSecret(secretID, out username, out password, out domain);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<br/><br/>
|
||||
<p align="center">
|
||||
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/Header_dark.png">
|
||||
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/Header_dark.png">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -20,10 +20,12 @@
|
||||
<a href="https://twitter.com/mremoteng">
|
||||
<img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/mremoteng?color=%231DA1F2&label=Twitter&logo=Twitter&style=flat-square">
|
||||
</a>
|
||||
<a href="https://gitter.im/mRemoteNG/PublicChat">
|
||||
<img alt="Gitter" src="https://img.shields.io/gitter/room/mRemoteNG/PublicChat?label=Join%20the%20Chat&logo=Gitter&style=flat-square">
|
||||
<a href="https://app.element.io/#/room/#mremoteng:matrix.org">
|
||||
<img alt="Element" src="https://img.shields.io/matrix/mremoteng:matrix.org?label=Join%20to%20chat%20about%20mRemoteNG&logo=element&style=social&link=https://app.element.io/#/room/#mremoteng:matrix.org">
|
||||
</a>
|
||||
<a href="https://www.paypal.me/DavidSparer">
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://www.paypal.com/paypalme/mremoteng">
|
||||
<img alt="PayPal" src="https://img.shields.io/badge/%24-PayPal-blue.svg?label=Donate&logo=PayPal&style=flat-square">
|
||||
</a>
|
||||
<a href="bitcoin:16fUnHUM3k7W9Fvpc6dug7TAdfeGEcLbSg">
|
||||
@@ -41,6 +43,9 @@
|
||||
<a href='https://mremoteng.readthedocs.io/en/latest/?badge=latest'>
|
||||
<img src='https://readthedocs.org/projects/mremoteng/badge/?version=latest' alt='Documentation Status' />
|
||||
</a>
|
||||
<a href="https://gurubase.io/g/mremoteng">
|
||||
<img alt="Gurubase" src="https://img.shields.io/badge/Gurubase-Ask%20mRemoteNG%20Guru-006BFF?style=flat-square">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
@@ -49,7 +54,7 @@
|
||||
| ---------------|--------------|-----------|
|
||||
| Stable |  | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.20) |
|
||||
| Preview |  | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.1) |
|
||||
| Nightly |  | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.2-nb) |
|
||||
| Nightly |  | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/2023.03.03-v1.77.3-nb) |
|
||||
|
||||
## Features
|
||||
|
||||
@@ -86,12 +91,14 @@ You will need to compile it yourself using Visual Studio.
|
||||
### Minimum Requirements
|
||||
|
||||
* [Microsoft Visual C++ Redistributable for Visual Studio 2015 - 2022](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
|
||||
* [Microsoft .NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
|
||||
* [Microsoft .NET 6.0 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/6.0)
|
||||
* Microsoft Terminal Service Client 6.0 or later
|
||||
* Needed if you use RDP. mstscax.dll and/or msrdp.ocx be registered.
|
||||
|
||||
### Download
|
||||
|
||||
> :star: Starting Windows 11 you can use winget to install mRemoteNG. Just run `winget install -e --id mRemoteNG.mRemoteNG`
|
||||
|
||||
mRemoteNG is available as a redistributable MSI package or as a portable ZIP package and can be downloaded from the following locations:
|
||||
* [GitHub](https://github.com/mRemoteNG/mRemoteNG/releases)
|
||||
* [Project Website](https://mremoteng.org/download)
|
||||
@@ -114,13 +121,17 @@ The MSI package of mRemoteNG can be installed using the command line:
|
||||
_If you are using the Portable version, simply deleting the folder that contains mRemoteNG should be sufficient. These uninstall instructions are only necessary for the normal binary .MSI installed version of mRemoteNG_
|
||||
|
||||
* Delete the folder where mRemoteNG was installed. By default, this is:
|
||||
`%PROGRAMFILES%\mRemoteNG`
|
||||
`%PROGRAMFILES%\mRemoteNG` (for versions before 1.77 on a x64 Windows its `%programfiles(x86)%\mRemoteNG`)
|
||||
|
||||
* Delete the mRemoteNG install entry from one of the following locations. Search for "mRemoteNG" in the DisplayName field:
|
||||
* x86: ``HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\``
|
||||
* x64: ``HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\``
|
||||
* Delete the mRemoteNG install entry from the following location. You may search for "mRemoteNG" in the DisplayName field:
|
||||
* x86 Windows or mRemoteNG starting with v1.77: `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\`
|
||||
* x64 Windows and mRemoteNG before 1.77: `HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\`
|
||||
* Remove the following registry key: `HKLM\SOFTWARE\mRemoteNG` (on x64 Windows with mRemoteNG before 1.77 it's `HKLM\SOFTWARE\WOW6432Node\mRemoteNG`)
|
||||
|
||||
* (Optional) If you would also like to delete user data remove `%LOCALAPPDATA%\mRemoteNG`
|
||||
* (Optional) If you would also like to remove the connection configuration, delete `%APPDATA%\mRemoteNG`
|
||||
|
||||
* (Optional) If no other software uses it, the "Microsoft Windows Desktop Runtime" may be uninstalled too.
|
||||
|
||||
## Featured Projects
|
||||
|
||||
@@ -139,5 +150,5 @@ Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to
|
||||
|
||||
</br>
|
||||
<p align="center">
|
||||
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/icon_ReSharper.png">
|
||||
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/icon_ReSharper.png">
|
||||
</p>
|
||||
38
Tools/cert/CodeSigning_Cert_mRemoteNG_Certum.enc
Normal file
38
Tools/cert/CodeSigning_Cert_mRemoteNG_Certum.enc
Normal file
@@ -0,0 +1,38 @@
|
||||
U2FsdGVkX1/uEeToOEIrunpoPNl7NUYNQfI+ixMzGgKX0DlHZxa/PonAVd9NoAE+
|
||||
dqWegkN8fa/M2HcW8moN5sN0yS88amG8cfwRZNRSgRB4IxDdYPjM/iX7y8FjUh9R
|
||||
OZnGhq1rAkqcf7ASAdZfQDSFOAEDPQgByN4IB2j/G3ueqV3jf5sWWiM0ielcorWX
|
||||
jXuEL7uIk9diI3Qh3BVqmrotzErzqTTLB4DWoL1aWqRRYH+exKahfcMT3C9r+tul
|
||||
ETH6o1im3kdYzFgHl58FmihbHa+h1+c+DWVGGXRxJPw1DZfg8/+ldIy8J75aWimz
|
||||
2MX+PiBVQj+wYlSSkQLj2EdbpSERlinE1O55ldwpbnMPAlYCgFRdO3/hiB6LiLLt
|
||||
n9s8f32HLNG20Mk1oxXdN9VPOw+RwQpUf6Zfcyps6e/9EFKBLnwq4cYwM/dHRuez
|
||||
w48EJX5wKzpukHn2UFg5aCRGYU/4NyUn+AlIjjCMBWY1R0uBhC340cl6YqoPFN12
|
||||
clzbS6JdQS+ktusCeaKcsj2iknVqQrGY81LKrTaQZdfehGwAn9pMWE3iWRX80yzO
|
||||
s08lpmHfPK4uhtlyIbdReLn4n7hvB8KRVa7Foms+4wpEwKrL8KF/8CYc89Tm3PSD
|
||||
LCrLr7rzCHh51ncJXHAwZqY2ZRLnQBVwhIRsFYyZ595b89tuDY00sYpWnTKzWubK
|
||||
UD993CmYKg1cA+mj6NR6iSmecawsUz68nI/nmHM2APE5cCCHSK3lz40e9Z9Hmy5Y
|
||||
kVS6c86a+gwNyn4F9t3iISdj2vIOwGMVWQLeY+nwpiKnnOuI0XPtIMjNbhoaDToT
|
||||
kph2ZVjqbpmYHgTSX71v8Y16Stl+p/dZn0dE2d4JhxOJxDN//H6y7mOwg8DYX9GP
|
||||
rFBMIEWyEQyEFYTmWgztQ5KU89w0lV1qiWpaiWR/ID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
|
||||
vT6uNK3URe1qDgX554cz8c6+KrkglTLFMuKfNWj3q/uSM0BxTTD9QgorNdlMmErH
|
||||
TfV/ZpZACpuMFRbC5xQRkCG1x4U12pdPbtIkGtVBJROEXhP1aw3BDWwrIN7zSgfj
|
||||
8I4OF4fbj/rSuvI4klzi1zlUMQQnenlRURE+7DKRxtWipJhW9vtDI0LXN7gGfmbR
|
||||
73uR3YUny6zUJ0svqaWj4Eo6t3g99nmk4D2hm/622dRksv2HqEQiq29jJxlcbdZB
|
||||
PU96wOp54s/BzgodyI5dh+xL06Obr9AltLV9vw3iK0VBZqquj9FuhvWC1tYlZQJF
|
||||
AOgVDOGUZzmAJXftI7gaohFBwsT5tAHQtBuY7tB3b1hrnfrFb9FTNxGZJKcIH3p4
|
||||
dOAvedsfuq+2/lU9iM4tX9fjSzfnGRZRuKCGDSdhE6EDik9/f2kSCoY9z0zJwdZH
|
||||
324TpGbZNbgcwgHDL9i5Nsnaua5yxtr0/Fr1We1tvn0=
|
||||
Binary file not shown.
@@ -1,17 +1,27 @@
|
||||
#Requires -Version 4.0
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$WebsiteTargetOwner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$WebsiteTargetRepository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$false)]
|
||||
$PreTagName = "",
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Stable","Beta","Development")]
|
||||
$UpdateChannel
|
||||
$ProjectName
|
||||
)
|
||||
|
||||
|
||||
|
||||
function New-MsiUpdateFileContent {
|
||||
param (
|
||||
[System.IO.FileInfo]
|
||||
@@ -25,7 +35,7 @@ function New-MsiUpdateFileContent {
|
||||
|
||||
$version = $MsiFile.BaseName -replace "[a-zA-Z-]*"
|
||||
$certThumbprint = (Get-AuthenticodeSignature -FilePath $MsiFile).SignerCertificate.Thumbprint
|
||||
$hash = Get-FileHash -Algorithm SHA512 $MsiFile | % { $_.Hash }
|
||||
$hash = Get-FileHash -Algorithm SHA512 $MsiFile | ForEach-Object { $_.Hash }
|
||||
|
||||
$fileContents = `
|
||||
"Version: $version
|
||||
@@ -49,7 +59,7 @@ function New-ZipUpdateFileContent {
|
||||
)
|
||||
|
||||
$version = $ZipFile.BaseName -replace "[a-zA-Z-]*"
|
||||
$hash = Get-FileHash -Algorithm SHA512 $ZipFile | % { $_.Hash }
|
||||
$hash = Get-FileHash -Algorithm SHA512 $ZipFile | ForEach-Object { $_.Hash }
|
||||
|
||||
$fileContents = `
|
||||
"Version: $version
|
||||
@@ -64,7 +74,7 @@ function Resolve-UpdateCheckFileName {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Stable","Beta","Development")]
|
||||
[ValidateSet("Stable","Preview","Nightly")]
|
||||
$UpdateChannel,
|
||||
|
||||
[string]
|
||||
@@ -75,8 +85,8 @@ function Resolve-UpdateCheckFileName {
|
||||
|
||||
$fileName = ""
|
||||
|
||||
if ($UpdateChannel -eq "Beta") { $fileName += "beta-" }
|
||||
elseif ($UpdateChannel -eq "Development") { $fileName += "dev-" }
|
||||
if ($UpdateChannel -eq "Preview") { $fileName += "preview-" }
|
||||
elseif ($UpdateChannel -eq "Nightly") { $fileName += "nightly-" }
|
||||
|
||||
$fileName += "update"
|
||||
|
||||
@@ -87,23 +97,72 @@ function Resolve-UpdateCheckFileName {
|
||||
Write-Output $fileName
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
# determine update channel
|
||||
if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") {
|
||||
Write-Output "UpdateChannel = Nightly"
|
||||
$UpdateChannel = "Nightly"
|
||||
$ModifiedTagName = "$PreTagName-$TagName-NB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Preview)") {
|
||||
Write-Output "UpdateChannel = Preview"
|
||||
$UpdateChannel = "Preview"
|
||||
$ModifiedTagName = "v$TagName-PB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Stable)") {
|
||||
Write-Output "UpdateChannel = Stable"
|
||||
$UpdateChannel = "Stable"
|
||||
$ModifiedTagName = "v" + $TagName.Split("-")[0]
|
||||
} else {
|
||||
$UpdateChannel = ""
|
||||
}
|
||||
|
||||
#$buildFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\mRemoteNG\bin\x64\Release" -Resolve -ErrorAction Ignore
|
||||
$ReleaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve
|
||||
|
||||
if ($UpdateChannel -ne "" -and $ReleaseFolder -ne "" -and $WebsiteTargetOwner -and $WebsiteTargetRepository) {
|
||||
|
||||
$releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve
|
||||
$msiFile = Get-ChildItem -Path "$ReleaseFolder\*.msi" -Exclude "*-symbols-*.zip" | Sort-Object LastWriteTime | Select-Object -last 1
|
||||
if (![string]::IsNullOrEmpty($msiFile)) {
|
||||
$msiUpdateContents = New-MsiUpdateFileContent -MsiFile $msiFile -TagName $ModifiedTagName
|
||||
$msiUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Normal
|
||||
Write-Output "`n`nMSI Update Check File Contents ($msiUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $msiUpdateContents -FilePath "$ReleaseFolder\$msiUpdateFileName"
|
||||
|
||||
# commit msi update txt file
|
||||
if ($env:WEBSITE_UPDATE_ENABLED.ToLower() -eq "true") {
|
||||
if ((Test-Path -Path "$ReleaseFolder\$msiUpdateFileName") -and (-not [string]::IsNullOrEmpty($WebsiteTargetRepository))) {
|
||||
Write-Output "Publish Update File $msiUpdateFileName to $WebsiteTargetRepository"
|
||||
$update_file_content_string = Get-Content "$ReleaseFolder\$msiUpdateFileName" | Out-String
|
||||
Set-GitHubContent -OwnerName $WebsiteTargetOwner -RepositoryName $WebsiteTargetRepository -Path $msiUpdateFileName -CommitMessage "Build $ModifiedTagName" -Content $update_file_content_string -BranchName main
|
||||
} else {
|
||||
Write-Warning "WARNING: Update file does not exist: $ReleaseFolder\$msiUpdateFileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# build msi update file
|
||||
$msiFile = Get-ChildItem -Path "$releaseFolder\*.msi" | sort LastWriteTime | select -last 1
|
||||
$msiUpdateContents = New-MsiUpdateFileContent -MsiFile $msiFile -TagName $TagName
|
||||
$msiUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Normal
|
||||
Write-Output "`n`nMSI Update Check File Contents ($msiUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $msiUpdateContents -FilePath "$releaseFolder\$msiUpdateFileName"
|
||||
# build zip update file
|
||||
$zipFile = Get-ChildItem -Path "$ReleaseFolder\*.zip" -Exclude "*-symbols-*.zip" | Sort-Object LastWriteTime | Select-Object -last 1
|
||||
if (![string]::IsNullOrEmpty($zipFile)) {
|
||||
$zipUpdateContents = New-ZipUpdateFileContent -ZipFile $zipFile -TagName $ModifiedTagName
|
||||
$zipUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Portable
|
||||
Write-Output "`n`nZip Update Check File Contents ($zipUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $zipUpdateContents -FilePath "$ReleaseFolder\$zipUpdateFileName"
|
||||
|
||||
# commit zip update txt file
|
||||
if ($env:WEBSITE_UPDATE_ENABLED.ToLower() -eq "true") {
|
||||
if ((Test-Path -Path "$ReleaseFolder\$zipUpdateFileName") -and (-not [string]::IsNullOrEmpty($WebsiteTargetRepository))) {
|
||||
Write-Output "Publish Update File $zipUpdateFileName to $WebsiteTargetRepository"
|
||||
$update_file_content_string = Get-Content "$ReleaseFolder\$zipUpdateFileName" | Out-String
|
||||
Set-GitHubContent -OwnerName $WebsiteTargetOwner -RepositoryName $WebsiteTargetRepository -Path $zipUpdateFileName -CommitMessage "Build $ModifiedTagName" -Content $update_file_content_string -BranchName main
|
||||
} else {
|
||||
Write-Warning "WARNING: Update file does not exist: $ReleaseFolder\$zipUpdateFileName"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Output "ReleaseFolder not found"
|
||||
}
|
||||
|
||||
|
||||
# build zip update file
|
||||
$zipFile = Get-ChildItem -Path "$releaseFolder\*.zip" | sort LastWriteTime | select -last 1
|
||||
$zipUpdateContents = New-ZipUpdateFileContent -ZipFile $zipFile -TagName $TagName
|
||||
$zipUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Portable
|
||||
Write-Output "`n`nZip Update Check File Contents ($zipUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $zipUpdateContents -FilePath "$releaseFolder\$zipUpdateFileName"
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
2
Tools/decrypt.bat
Normal file
2
Tools/decrypt.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
openssl enc -base64 -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -d -in cert/CodeSigning_Cert_mRemoteNG_Certum.enc -out cert/CodeSigning_Cert_mRemoteNG_Certum.cer
|
||||
pause
|
||||
2
Tools/encrypt.bat
Normal file
2
Tools/encrypt.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
openssl enc -base64 -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -e -in cert/CodeSigning_Cert_mRemoteNG_Certum.cer -out cert/CodeSigning_Cert_mRemoteNG_Certum.enc
|
||||
pause
|
||||
@@ -19,27 +19,28 @@ function EditBinCertificateIsValid() {
|
||||
"3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC",
|
||||
"98ED99A67886D020C564923B7DF25E9AC019DF26",
|
||||
"108E2BA23632620C427C570B6D9DB51AC31387FE",
|
||||
"5EAD300DC7E4D637948ECB0ED829A072BD152E17"
|
||||
"5EAD300DC7E4D637948ECB0ED829A072BD152E17",
|
||||
"97221B97098F37A135DCC212E2B41E452BCE51F2"
|
||||
)
|
||||
$file_signature = Get-AuthenticodeSignature -FilePath $Path
|
||||
if (($file_signature.Status -ne "Valid") -or ($valid_microsoft_cert_thumbprints -notcontains $file_signature.SignerCertificate.Thumbprint)) {
|
||||
Write-Warning "Could not validate the signature of $Path"
|
||||
Write-Warning "Could not validate the signature of $Path $($file_signature.SignerCertificate.Thumbprint)"
|
||||
Write-Output "file_signature.SignerCertificate.Thumbprint: $($file_signature.SignerCertificate.Thumbprint)"
|
||||
return $false
|
||||
} else {
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ToolCanBeExecuted {
|
||||
param (
|
||||
[string]
|
||||
$Path
|
||||
)
|
||||
$null = & $Path
|
||||
Write-Output ($LASTEXITCODE -gt 0)
|
||||
$env:PATHEXT.Contains((Get-Item $Path).Extension.ToUpper())
|
||||
}
|
||||
|
||||
|
||||
$rootSearchPaths = @(
|
||||
[System.IO.Directory]::EnumerateFileSystemEntries("C:\Program Files", "*Visual Studio*", [System.IO.SearchOption]::TopDirectoryOnly),
|
||||
[System.IO.Directory]::EnumerateFileSystemEntries("C:\Program Files (x86)", "*Visual Studio*", [System.IO.SearchOption]::TopDirectoryOnly)
|
||||
@@ -51,7 +52,8 @@ foreach ($searchPath in $rootSearchPaths) {
|
||||
Write-Verbose "Searching in folder '$visualStudioFolder'"
|
||||
$matchingExes = [System.IO.Directory]::EnumerateFileSystemEntries($visualStudioFolder, $FileName, [System.IO.SearchOption]::AllDirectories)
|
||||
foreach ($matchingExe in $matchingExes) {
|
||||
if ((EditBinCertificateIsValid -Path $matchingExe) -and (ToolCanBeExecuted -Path $matchingExe)) {
|
||||
#if ((EditBinCertificateIsValid -Path $matchingExe) -and (ToolCanBeExecuted -Path $matchingExe)) {
|
||||
if (ToolCanBeExecuted -Path $matchingExe) {
|
||||
return $matchingExe
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,32 @@ $githubUrl = 'https://api.github.com'
|
||||
# GitHub doesn't support the default powershell protocol (TLS 1.0)
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
if ($IsAppVeyor) {
|
||||
#$CURRENT_GITHUB_USER = $env:APPVEYOR_REPO_NAME.Split("/")[0]
|
||||
Install-Module -Name PowerShellForGitHub -Scope CurrentUser
|
||||
Set-GitHubConfiguration -DisableTelemetry
|
||||
$PSDefaultParameterValues["*-GitHub*:AccessToken"] = "$env:ACCESS_TOKEN"
|
||||
#New-Item -Path "$Env:APPVEYOR_BUILD_FOLDER\Release" -ItemType Directory -Force
|
||||
}
|
||||
|
||||
function New-TemporaryDirectory {
|
||||
$parent = [System.IO.Path]::GetTempPath()
|
||||
[string] $name = [System.Guid]::NewGuid()
|
||||
$fullTempPath = (Join-Path $parent $name)
|
||||
New-Item -ItemType Directory -Path $fullTempPath
|
||||
return $fullTempPath
|
||||
}
|
||||
|
||||
Function ConvertFrom-Base64($base64) {
|
||||
return [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($base64))
|
||||
}
|
||||
|
||||
Function ConvertTo-Base64($plain) {
|
||||
return [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($plain))
|
||||
}
|
||||
|
||||
function Publish-GitHubRelease {
|
||||
param (
|
||||
[string]
|
||||
@@ -232,4 +258,4 @@ function New-GitHubReleaseRequestBody {
|
||||
|
||||
$json_body = ConvertTo-Json -InputObject $body_params -Compress
|
||||
Write-Output $json_body
|
||||
}
|
||||
}
|
||||
|
||||
76
Tools/postbuild.ps1
Normal file
76
Tools/postbuild.ps1
Normal file
@@ -0,0 +1,76 @@
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$SolutionDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetFileName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ConfigurationName,
|
||||
|
||||
[string]
|
||||
$CertificatePath,
|
||||
|
||||
[string]
|
||||
$CertificatePassword,
|
||||
|
||||
[string[]]
|
||||
$ExcludeFromSigning
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\github_functions.ps1"
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "+============================================================+"
|
||||
Write-Output "| Beginning mRemoteNG Post Build |"
|
||||
Write-Output "+============================================================+"
|
||||
Format-Table -AutoSize -Wrap -InputObject @{
|
||||
"SolutionDir" = $SolutionDir
|
||||
"TargetDir" = $TargetDir
|
||||
"TargetFileName" = $TargetFileName
|
||||
"ConfigurationName" = $ConfigurationName
|
||||
"CertificatePath" = $CertificatePath
|
||||
"ExcludeFromSigning" = $ExcludeFromSigning
|
||||
}
|
||||
|
||||
|
||||
if ( $ConfigurationName -match "Debug" -and ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) { return; } #skip when Debug local developer build
|
||||
if ( $env:APPVEYOR_PROJECT_NAME -match "(CI)" -and -not ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) { return; } #skip when AppVeyor (CI) build
|
||||
|
||||
$dstPath = "$($SolutionDir)Release"
|
||||
New-Item -Path $dstPath -ItemType Directory -Force
|
||||
|
||||
# $RunInstaller = $TargetDir -match "\\mRemoteNGInstaller\\Installer\\bin\\"
|
||||
# $RunPortable = ( ($Targetdir -match "\\mRemoteNG\\bin\\") -and -not ($TargetDir -match "\\mRemoteNGInstaller\\Installer\\bin\\") )
|
||||
|
||||
if ( ($ConfigurationName -match "Release") -and ($env:APPVEYOR_PROJECT_NAME -notmatch "(CI)") -and -not ([string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER)) -and -not ([string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY)) ) {
|
||||
|
||||
Write-Output "-Begin Release Portable"
|
||||
|
||||
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
|
||||
|
||||
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
|
||||
|
||||
& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
Write-Output "-End Release Portable"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Write-Output "End mRemoteNG Post Build"
|
||||
Write-Output ""
|
||||
|
||||
@@ -25,6 +25,9 @@ param (
|
||||
$ExcludeFromSigning
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\github_functions.ps1"
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "+===========================================================================================+"
|
||||
Write-Output "| Beginning mRemoteNG Installer Post Build |"
|
||||
Write-Output "+===========================================================================================+"
|
||||
@@ -37,7 +40,24 @@ Format-Table -AutoSize -Wrap -InputObject @{
|
||||
"ExcludeFromSigning" = $ExcludeFromSigning
|
||||
}
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
|
||||
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
|
||||
& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir
|
||||
if ( $IsAppVeyor -and ($ConfigurationName.ToUpper() -match "RELEASE") -and (($env:APPVEYOR_PROJECT_NAME).ToUpper() -notmatch "(CI)") ) {
|
||||
|
||||
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
|
||||
|
||||
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
|
||||
|
||||
& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir -BuildConfiguration $ConfigurationName.Trim()
|
||||
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_assemblyinfocs.ps1"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Write-Output "End mRemoteNG Installer Post Build"
|
||||
Write-Output ""
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$SolutionDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetFileName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ConfigurationName,
|
||||
|
||||
[string]
|
||||
$CertificatePath,
|
||||
|
||||
[string]
|
||||
$CertificatePassword,
|
||||
|
||||
[string[]]
|
||||
$ExcludeFromSigning
|
||||
)
|
||||
|
||||
Write-Output "+===========================================================================================+"
|
||||
Write-Output "| Beginning mRemoteNG Post Build |"
|
||||
Write-Output "+===========================================================================================+"
|
||||
Format-Table -AutoSize -Wrap -InputObject @{
|
||||
"SolutionDir" = $SolutionDir
|
||||
"TargetDir" = $TargetDir
|
||||
"TargetFileName" = $TargetFileName
|
||||
"ConfigurationName" = $ConfigurationName
|
||||
"CertificatePath" = $CertificatePath
|
||||
"ExcludeFromSigning" = $ExcludeFromSigning
|
||||
}
|
||||
|
||||
# Move dlls resurses into folder
|
||||
#Remove-Item -Path "$TargetDir\libs" -Recurse -ErrorAction Ignore
|
||||
#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "libs"
|
||||
#Move-Item -Path "$TargetDir\*.dll" -Destination "$TargetDir\libs" -force
|
||||
|
||||
|
||||
###
|
||||
|
||||
# Move lang resurses into folder
|
||||
#Remove-Item -Path "$TargetDir\languages" -Recurse -ErrorAction Ignore
|
||||
#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "languages"
|
||||
#"cs-CZ,de,el,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW,fi-FI".Split(",") | ForEach {
|
||||
# Move-Item -Path "$TargetDir\$_" -Destination "$TargetDir\languages" -force
|
||||
# }
|
||||
###
|
||||
|
||||
& "$PSScriptRoot\set_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
|
||||
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
|
||||
& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
91
Tools/postbuild_portable.ps1
Normal file
91
Tools/postbuild_portable.ps1
Normal file
@@ -0,0 +1,91 @@
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$SolutionDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetFileName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ConfigurationName,
|
||||
|
||||
[string]
|
||||
$CertificatePath,
|
||||
|
||||
[string]
|
||||
$CertificatePassword,
|
||||
|
||||
[string[]]
|
||||
$ExcludeFromSigning
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\github_functions.ps1"
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "+===========================================================================================+"
|
||||
Write-Output "| Beginning mRemoteNG Portable Post Build |"
|
||||
Write-Output "+===========================================================================================+"
|
||||
Format-Table -AutoSize -Wrap -InputObject @{
|
||||
"SolutionDir" = $SolutionDir
|
||||
"TargetDir" = $TargetDir
|
||||
"TargetFileName" = $TargetFileName
|
||||
"ConfigurationName" = $ConfigurationName
|
||||
"CertificatePath" = $CertificatePath
|
||||
"ExcludeFromSigning" = $ExcludeFromSigning
|
||||
}
|
||||
|
||||
# Move dlls resurses into folder
|
||||
#Remove-Item -Path "$TargetDir\libs" -Recurse -ErrorAction Ignore
|
||||
#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "libs"
|
||||
#Move-Item -Path "$TargetDir\*.dll" -Destination "$TargetDir\libs" -force
|
||||
|
||||
|
||||
###
|
||||
|
||||
# Move lang resurses into folder
|
||||
#Remove-Item -Path "$TargetDir\languages" -Recurse -ErrorAction Ignore
|
||||
#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "languages"
|
||||
#"cs-CZ,de,el,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW,fi-FI".Split(",") | ForEach {
|
||||
# Move-Item -Path "$TargetDir\$_" -Destination "$TargetDir\languages" -force
|
||||
# }
|
||||
###
|
||||
|
||||
# Currently targeting x64, shouldn't need to manually set LargeAddressAware...
|
||||
#& "$PSScriptRoot\set_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
#& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
|
||||
if (!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) {
|
||||
$postbuild_installer_executed = Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\AppVeyor_mRemoteNG' -Name postbuild_installer_executed
|
||||
} else {
|
||||
$postbuild_installer_executed = ""
|
||||
}
|
||||
|
||||
write-host "-SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName "
|
||||
|
||||
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
if ($postbuild_installer_executed -ne "true" -or $env:postbuild_installer_executed -ne "true") {
|
||||
|
||||
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
|
||||
|
||||
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
|
||||
}
|
||||
|
||||
& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
if ( ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY) ) {
|
||||
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
}
|
||||
|
||||
Write-Output "End mRemoteNG Portable Post Build"
|
||||
Write-Output ""
|
||||
@@ -1,13 +1,61 @@
|
||||
param (
|
||||
[string]
|
||||
$SolutionDir
|
||||
$SolutionDir,
|
||||
[string]
|
||||
$BuildConfiguration
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\x64\Release\mRemoteNG.exe"
|
||||
$version = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile
|
||||
$src = $SolutionDir + "mRemoteNGInstaller\Installer\bin\Release\en-US\mRemoteNG-Installer.msi"
|
||||
$dst = $SolutionDir + "Release\mRemoteNG-Installer-" + $version + ".msi"
|
||||
Write-Output ""
|
||||
Write-Output " /===== Begin rename_and_copy_installer =====/"
|
||||
|
||||
$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\x64\$BuildConfiguration\mRemoteNG.exe"
|
||||
#$fileversion = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile
|
||||
#$prodversion = ((Get-Item -Path $targetVersionedFile).VersionInfo | Select-Object -Property ProductVersion)."ProductVersion"
|
||||
$fileversion = ((Get-Item -Path $targetVersionedFile).VersionInfo | Select-Object -Property FileVersion)."FileVersion"
|
||||
|
||||
Write-Output "fileversion: $fileversion"
|
||||
$msiversion = $fileversion
|
||||
|
||||
# determine update channel
|
||||
if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") {
|
||||
Write-Output " UpdateChannel = Nightly"
|
||||
$msiversion = "$msiversion-NB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Preview)") {
|
||||
Write-Output " UpdateChannel = Preview"
|
||||
$msiversion = "$msiversion-PB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Stable)") {
|
||||
Write-Output " UpdateChannel = Stable"
|
||||
} else {
|
||||
}
|
||||
|
||||
$dstPath = "$($SolutionDir)Release"
|
||||
New-Item -Path $dstPath -ItemType Directory -Force
|
||||
$srcMsi = $SolutionDir + "mRemoteNGInstaller\Installer\bin\x64\$BuildConfiguration\en-US\mRemoteNG-Installer.msi"
|
||||
$dstMsi = $dstPath + "\mRemoteNG-Installer-" + $msiversion + ".msi"
|
||||
#$srcSymbols = $SolutionDir + "mRemoteNGInstaller\Installer\bin\x64\$BuildConfiguration\en-US\mRemoteNG-Installer-Symbols*.zip"
|
||||
#$dstSymbols = $SolutionDir + "Release\mRemoteNG-Installer-Symbols-" + $msiversion + ".zip"
|
||||
|
||||
Write-Output " Copy Installer file:"
|
||||
Write-Output " From: $srcMsi"
|
||||
Write-Output " To: $dstMsi"
|
||||
Write-Output ""
|
||||
# Copy file
|
||||
Copy-Item $src -Destination $dst -Force
|
||||
try
|
||||
{
|
||||
Copy-Item $srcMsi -Destination $dstMsi -Force -ErrorAction Stop
|
||||
#Copy-Item $srcSymbols -Destination $dstSymbols -Force -ErrorAction Stop
|
||||
Write-Host " [Success!]" -ForegroundColor green
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host " [Failure!]" -ForegroundColor red
|
||||
Write-Output $Error[0]
|
||||
$PSCmdlet.ThrowTerminatingError()
|
||||
}
|
||||
|
||||
|
||||
Write-Output ""
|
||||
Write-Output " /===== End rename_and_copy_installer.ps1 =====/"
|
||||
Write-Output ""
|
||||
|
||||
@@ -24,65 +24,80 @@ param (
|
||||
$SolutionDir
|
||||
)
|
||||
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll"
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
# validate release versions and if the certificate value was passed
|
||||
if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
try {
|
||||
# validate release versions and if the certificate value was passed
|
||||
if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
|
||||
if(-Not ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) {
|
||||
$CertificatePath = Join-Path -Path $SolutionDir -ChildPath $CertificatePath
|
||||
if($IsAppVeyor) {
|
||||
$CertificatePath = Join-Path -Path $SolutionDir -ChildPath $CertificatePath
|
||||
Write-Output "Decrypt Cert"
|
||||
& appveyor-tools\secure-file -decrypt "$($Env:cert_path).enc" -secret "$Env:cert_decrypt_pwd"
|
||||
if(-Not (Test-Path $Env:cert_path)) {
|
||||
Write-Output "decrypt cert does not exist..."
|
||||
Throw "Could not decrypt cert"
|
||||
}
|
||||
Write-Output "Restoring NuGets"
|
||||
}
|
||||
|
||||
# make sure the cert is actually available
|
||||
if ($CertificatePath -eq "" -or !(Test-Path -Path $CertificatePath -PathType Leaf))
|
||||
{
|
||||
Write-Output "Certificate is not present - we won't sign files."
|
||||
return
|
||||
}
|
||||
|
||||
if ($CertificatePassword -eq "") {
|
||||
Write-Output "No certificate password was provided - we won't sign files."
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
$certKeyStore = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword, $certKeyStore) -ErrorAction Stop
|
||||
} catch {
|
||||
Write-Output "Error loading certificate file - we won't sign files."
|
||||
Write-Output $Error[0]
|
||||
return
|
||||
}
|
||||
|
||||
# Sign MSI if we are building a release version and the certificate is available
|
||||
Write-Output "Signing Binaries"
|
||||
Write-Output "Getting files from path: $TargetDir"
|
||||
$signableFiles = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -notcontains $_.Name}
|
||||
|
||||
$excluded_files = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -contains $_.Name}
|
||||
$excluded_files | ForEach-Object `
|
||||
-Begin { Write-Output "The following files were excluded from signing due to being on the exclusion list:" } `
|
||||
-Process { Write-Output "-- $($_.FullName)" }
|
||||
|
||||
Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
|
||||
|
||||
foreach ($file in $signableFiles) {
|
||||
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
|
||||
}
|
||||
|
||||
|
||||
# Release certificate
|
||||
if ($null -ne $cert) {
|
||||
$cert.Dispose()
|
||||
}
|
||||
} else {
|
||||
Write-Output "This is not a release build or CertificatePath wasn't provided - we won't sign files."
|
||||
Write-Output "Config: $($ConfigurationName)`tCertPath: $($CertificatePath)"
|
||||
}
|
||||
|
||||
# make sure the cert is actually available
|
||||
if ($CertificatePath -eq "" -or !(Test-Path -Path $CertificatePath -PathType Leaf))
|
||||
{
|
||||
Write-Output "Certificate is not present - we won't sign files."
|
||||
return
|
||||
}
|
||||
|
||||
if ($CertificatePassword -eq "") {
|
||||
Write-Output "No certificate password was provided - we won't sign files."
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
$certKeyStore = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword, $certKeyStore) -ErrorAction Stop
|
||||
} catch {
|
||||
Write-Output "Error loading certificate file - we won't sign files."
|
||||
Write-Output $Error[0]
|
||||
return
|
||||
}
|
||||
|
||||
# Sign MSI if we are building a release version and the certificate is available
|
||||
Write-Output "Signing Binaries"
|
||||
Write-Output "Getting files from path: $TargetDir"
|
||||
$signableFiles = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -notcontains $_.Name}
|
||||
|
||||
$excluded_files = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -contains $_.Name}
|
||||
$excluded_files | ForEach-Object `
|
||||
-Begin { Write-Output "The following files were excluded from signing due to being on the exclusion list:" } `
|
||||
-Process { Write-Output "-- $($_.FullName)" }
|
||||
|
||||
Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
|
||||
|
||||
foreach ($file in $signableFiles) {
|
||||
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
|
||||
}
|
||||
|
||||
|
||||
# Release certificate
|
||||
if ($cert -ne $null) {
|
||||
$cert.Dispose()
|
||||
}
|
||||
} else {
|
||||
Write-Output "This is not a release build or CertificatePath wasn't provided - we won't sign files."
|
||||
Write-Output "Config: $($ConfigurationName)`tCertPath: $($CertificatePath)"
|
||||
|
||||
}
|
||||
catch {
|
||||
Write-Output $Error[0]
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
@@ -28,4 +28,6 @@ Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
|
||||
foreach ($file in $signableFiles) {
|
||||
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
|
||||
@@ -7,12 +7,12 @@ param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ConfigurationName
|
||||
)
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
# Remove unnecessary files from Release versions
|
||||
if ($ConfigurationName -match "Release")
|
||||
{
|
||||
if ($ConfigurationName -match "Release") {
|
||||
$test = Join-Path -Path $TargetDir -ChildPath "app.publish"
|
||||
if (Test-Path $test -PathType Container)
|
||||
{
|
||||
@@ -29,19 +29,18 @@ if ($ConfigurationName -match "Release")
|
||||
) -Exclude @(
|
||||
"mRemoteNG.VisualElementsManifest.xml"
|
||||
)
|
||||
|
||||
if ($filesToDelete)
|
||||
{
|
||||
Write-Output "Unnecessary files are detected and will be removed"
|
||||
Remove-Item -Path $filesToDelete.FullName
|
||||
Write-Output $filesToDelete.FullName
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
Write-Output " No unnecessary files are detected"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Write-Output "We will not remove anything - this is not a release build."
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
53
Tools/update_and_upload_assemblyinfocs.ps1
Normal file
53
Tools/update_and_upload_assemblyinfocs.ps1
Normal file
@@ -0,0 +1,53 @@
|
||||
#Requires -Version 4.0
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$MainRepository = $Env:APPVEYOR_REPO_NAME.Split("/\")[1]
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
Write-Output "MainRepository: $MainRepository"
|
||||
|
||||
if ($IsAppVeyor) {
|
||||
|
||||
# determine update channel
|
||||
if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") {
|
||||
Write-Output "UpdateChannel = Nightly"
|
||||
$UpdateChannel = "Nightly"
|
||||
$ModifiedTagName = "$PreTagName-$TagName-NB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Preview)") {
|
||||
Write-Output "UpdateChannel = Preview"
|
||||
$UpdateChannel = "Preview"
|
||||
$ModifiedTagName = "v$TagName-PB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Stable)") {
|
||||
Write-Output "UpdateChannel = Stable"
|
||||
$UpdateChannel = "Stable"
|
||||
$ModifiedTagName = "v" + $TagName.Split("-")[0]
|
||||
} else {
|
||||
$UpdateChannel = ""
|
||||
}
|
||||
|
||||
if ($UpdateChannel -ne "" -and $MainRepository -ne "" ) {
|
||||
|
||||
# commit AssemblyInfo.cs change
|
||||
Write-Output "publish AssemblyInfo.cs"
|
||||
|
||||
$buildFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\" -Resolve -ErrorAction Ignore
|
||||
|
||||
if (Test-Path -Path "$buildFolder\mRemoteNG\Properties\AssemblyInfo.cs") {
|
||||
|
||||
$assemblyinfocs_content = [System.String]::Join("`r`n", (Get-Content "$buildFolder\mRemoteNG\Properties\AssemblyInfo.cs"))
|
||||
|
||||
Set-GitHubContent -OwnerName $MainRepository -RepositoryName $MainRepository -Path "mRemoteNG\Properties\AssemblyInfo.cs" -CommitMessage "AssemblyInfo.cs updated for $UpdateChannel $ModifiedTagName" -Content $assemblyinfocs_content -BranchName main
|
||||
|
||||
Write-Output "publish completed"
|
||||
|
||||
}
|
||||
} else {
|
||||
Write-Output "Source folder not found"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
178
Tools/update_and_upload_website_release_json_file.ps1
Normal file
178
Tools/update_and_upload_website_release_json_file.ps1
Normal file
@@ -0,0 +1,178 @@
|
||||
#Requires -Version 4.0
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$WebsiteTargetOwner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$WebsiteTargetRepository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$false)]
|
||||
$PreTagName = "",
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ProjectName
|
||||
)
|
||||
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$MainRepository = $Env:APPVEYOR_REPO_NAME.Split("/\")[1]
|
||||
|
||||
# determine update channel
|
||||
if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") {
|
||||
Write-Output "UpdateChannel = Nightly"
|
||||
$UpdateChannel = "Nightly"
|
||||
$ModifiedTagName = "$PreTagName-$TagName-NB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Preview)") {
|
||||
Write-Output "UpdateChannel = Preview"
|
||||
$UpdateChannel = "Preview"
|
||||
$ModifiedTagName = "v$TagName-PB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Stable)") {
|
||||
Write-Output "UpdateChannel = Stable"
|
||||
$UpdateChannel = "Stable"
|
||||
$ModifiedTagName = "v" + $TagName.Split("-")[0]
|
||||
} else {
|
||||
$UpdateChannel = ""
|
||||
}
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
if ($IsAppVeyor) {
|
||||
|
||||
#$buildFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\mRemoteNG\bin\x64\Release" -Resolve -ErrorAction Ignore
|
||||
$ReleaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve
|
||||
|
||||
if ($UpdateChannel -ne "" -and $ReleaseFolder -ne "" -and $MainRepository -ne "" -and $WebsiteTargetOwner -ne "" -and $WebsiteTargetRepository -ne "" ) {
|
||||
|
||||
$published_at = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||
|
||||
# get releases.json from github
|
||||
$releases_json = Get-GitHubContent -OwnerName $WebsiteTargetOwner -RepositoryName $WebsiteTargetRepository -Path _data\releases.json
|
||||
ConvertFrom-Base64($releases_json.content) | Out-File -FilePath "$ReleaseFolder\releases.json"
|
||||
$websiteJsonReleaseFile = Get-ChildItem -Path "$ReleaseFolder\releases.json"
|
||||
|
||||
# installer
|
||||
$msiFile = Get-ChildItem -Path "$ReleaseFolder\*.msi" | Sort-Object LastWriteTime | Select-Object -last 1
|
||||
if (![string]::IsNullOrEmpty($msiFile)) {
|
||||
Write-Output "UpdateChannel: $UpdateChannel"
|
||||
Write-Output "msiFile: $msiFile"
|
||||
$checksum = (Get-FileHash $msiFile -Algorithm SHA512).Hash
|
||||
$file_size = (Get-ChildItem $msiFile).Length
|
||||
$a = Get-Content $websiteJsonReleaseFile | ConvertFrom-Json
|
||||
switch ($UpdateChannel) {
|
||||
"Nightly" {
|
||||
$GithubTag = "$((Get-Date).ToUniversalTime().ToString("yyyyMMdd"))-$TagName-NB"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)"
|
||||
$a.nightlybuild.name = "v$TagName-NB"
|
||||
$a.nightlybuild.published_at = $published_at
|
||||
$a.nightlybuild.html_url = $html_url
|
||||
$a.nightlybuild.assets.installer.browser_download_url = $browser_download_url
|
||||
$a.nightlybuild.assets.installer.checksum = $checksum
|
||||
$a.nightlybuild.assets.installer.size = $file_size
|
||||
break
|
||||
}
|
||||
"Preview" {
|
||||
$GithubTag = "$TagName-PB"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)"
|
||||
$a.prerelease.name = "v$TagName-PB"
|
||||
$a.prerelease.published_at = $published_at
|
||||
$a.prerelease.html_url = $html_url
|
||||
$a.prerelease.assets.installer.browser_download_url = $browser_download_url
|
||||
$a.prerelease.assets.installer.checksum = $checksum
|
||||
$a.prerelease.assets.installer.size = $file_size
|
||||
break
|
||||
}
|
||||
"Stable" {
|
||||
$GithubTag = "$TagName"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)"
|
||||
$a.stable.name = "v$TagName"
|
||||
$a.stable.published_at = $published_at
|
||||
$a.stable.html_url = $html_url
|
||||
$a.stable.assets.installer.browser_download_url = $browser_download_url
|
||||
$a.stable.assets.installer.checksum = $checksum
|
||||
$a.stable.assets.installer.size = $file_size
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# portable
|
||||
$zipFile = Get-ChildItem -Path "$ReleaseFolder\*.zip" -Exclude "*-symbols-*.zip" | Sort-Object LastWriteTime | Select-Object -last 1
|
||||
if (![string]::IsNullOrEmpty($zipFile)) {
|
||||
Write-Output "UpdateChannel: $UpdateChannel"
|
||||
Write-Output "zipFile: $zipFile"
|
||||
$checksum = (Get-FileHash $zipFile -Algorithm SHA512).Hash
|
||||
$file_size = (Get-ChildItem $zipFile).Length
|
||||
$a = Get-Content $websiteJsonReleaseFile | ConvertFrom-Json
|
||||
switch ($UpdateChannel) {
|
||||
"Nightly" {
|
||||
$GithubTag = "$((Get-Date).ToUniversalTime().ToString("yyyyMMdd"))-$TagName-NB"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)"
|
||||
$a.nightlybuild.name = "v$TagName-NB"
|
||||
$a.nightlybuild.published_at = $published_at
|
||||
$a.nightlybuild.html_url = $html_url
|
||||
$a.nightlybuild.assets.portable.browser_download_url = $browser_download_url
|
||||
$a.nightlybuild.assets.portable.checksum = $checksum
|
||||
$a.nightlybuild.assets.portable.size = $file_size
|
||||
break
|
||||
}
|
||||
"Preview" {
|
||||
$GithubTag = "$TagName-PB"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)"
|
||||
$a.prerelease.name = "v$TagName-PB"
|
||||
$a.prerelease.published_at = $published_at
|
||||
$a.prerelease.html_url = $html_url
|
||||
$a.prerelease.assets.portable.browser_download_url = $browser_download_url
|
||||
$a.prerelease.assets.portable.checksum = $checksum
|
||||
$a.prerelease.assets.portable.size = $file_size
|
||||
break
|
||||
}
|
||||
"Stable" {
|
||||
$GithubTag = "$TagName"
|
||||
$html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag"
|
||||
$browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)"
|
||||
$a.stable.name = "v$TagName"
|
||||
$a.stable.published_at = $published_at
|
||||
$a.stable.html_url = $html_url
|
||||
$a.stable.assets.portable.browser_download_url = $browser_download_url
|
||||
$a.stable.assets.portable.checksum = $checksum
|
||||
$a.stable.assets.portable.size = $file_size
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$a | ConvertTo-Json -Depth 10 | Set-Content $websiteJsonReleaseFile
|
||||
|
||||
# commit releases.json change
|
||||
if ($env:WEBSITE_UPDATE_ENABLED.ToLower() -eq "true") {
|
||||
Write-Output "publish releases.json"
|
||||
if (Test-Path -Path "$ReleaseFolder\releases.json") {
|
||||
$releases_json_string = Get-Content "$ReleaseFolder\releases.json" | Out-String
|
||||
Set-GitHubContent -OwnerName $WebsiteTargetOwner -RepositoryName $WebsiteTargetRepository -Path _data\releases.json -CommitMessage "Updated for $UpdateChannel $ModifiedTagName" -Content $releases_json_string -BranchName main
|
||||
Write-Output "publish completed"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Output "ReleaseFolder not found"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
@@ -5,7 +5,13 @@ param (
|
||||
$FullPath
|
||||
)
|
||||
|
||||
$validMSCertThumbprints = @("3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC", "108E2BA23632620C427C570B6D9DB51AC31387FE", "98ED99A67886D020C564923B7DF25E9AC019DF26", "5EAD300DC7E4D637948ECB0ED829A072BD152E17")
|
||||
$validMSCertThumbprints = @(
|
||||
"3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC",
|
||||
"108E2BA23632620C427C570B6D9DB51AC31387FE",
|
||||
"98ED99A67886D020C564923B7DF25E9AC019DF26",
|
||||
"5EAD300DC7E4D637948ECB0ED829A072BD152E17",
|
||||
"97221B97098F37A135DCC212E2B41E452BCE51F2"
|
||||
)
|
||||
$exeSignature = Get-AuthenticodeSignature -FilePath $FullPath
|
||||
$baseErrorMsg = "Could not validate the certificate of $FullPath. "
|
||||
|
||||
@@ -14,4 +20,4 @@ if ($exeSignature.Status -ne "Valid") {
|
||||
}
|
||||
elseif ($validMSCertThumbprints -notcontains $exeSignature.SignerCertificate.Thumbprint) {
|
||||
Write-Error -Message ($baseErrorMsg+"The certificate thumbprint ($($exeSignature.SignerCertificate.Thumbprint)) is not trusted.") -ErrorAction Stop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ param (
|
||||
$TargetFileName
|
||||
)
|
||||
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$path_dumpBin = Join-Path -Path $PSScriptRoot -ChildPath "exes\dumpbin.exe"
|
||||
$path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
|
||||
@@ -18,7 +19,7 @@ $path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
|
||||
# Dump exe header
|
||||
$output = & "$path_dumpBin" /NOLOGO /HEADERS "$path_outputExe" | Select-String large
|
||||
|
||||
if ($output -eq $null)
|
||||
if ($null -eq $output)
|
||||
{
|
||||
Write-Warning "Could not validate LargeAddressAware"
|
||||
}
|
||||
@@ -27,4 +28,5 @@ else
|
||||
Write-Output $output.ToString().TrimStart(" ")
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
@@ -18,13 +18,15 @@ param (
|
||||
$SolutionDir
|
||||
)
|
||||
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
Write-Output ""
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
# validate release versions and if the certificate value was passed
|
||||
if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
|
||||
if(-Not ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) {
|
||||
if($IsAppVeyor) {
|
||||
$CertificatePath = Join-Path -Path $SolutionDir -ChildPath $CertificatePath
|
||||
}
|
||||
|
||||
@@ -37,9 +39,10 @@ if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
|
||||
Write-Output "Verifying signature of binaries"
|
||||
Write-Output "Getting files from path: $TargetDir"
|
||||
$signableFiles = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"}
|
||||
$signableFiles = Get-ChildItem -Path $TargetDir -Recurse | Where-Object {$_.Extension -match "dll|exe|msi"}
|
||||
Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
$badSignatureFound = $false
|
||||
|
||||
foreach ($file in $signableFiles) {
|
||||
$signature = Get-AuthenticodeSignature -FilePath $file.FullName
|
||||
if ($signature.Status -ne "Valid") {
|
||||
@@ -47,6 +50,7 @@ if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
$badSignatureFound = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($badSignatureFound) {
|
||||
Write-Output "One or more files were improperly signed."
|
||||
} else {
|
||||
@@ -57,4 +61,5 @@ if ($ConfigurationName -match "Release" -And ($CertificatePath)) {
|
||||
Write-Output "Config: $($ConfigurationName)`tCertPath: $($CertificatePath)"
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
@@ -13,71 +13,81 @@
|
||||
)
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
Write-Output "===== Begin $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
$IsAppVeyor = !([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))
|
||||
|
||||
$ConfigurationName = $ConfigurationName.Trim()
|
||||
Write-Output "Config Name (trimmed): '$($ConfigurationName)'"
|
||||
$exe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
|
||||
$Version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exe).FileVersion
|
||||
Write-Output "Version is $($version)"
|
||||
#$version = ((Get-Item -Path $exe).VersionInfo | Select-Object -Property ProductVersion)."ProductVersion"
|
||||
$version = $(Get-Item -Path $exe).VersionInfo.FileVersion
|
||||
Write-Output "FileVersion: $version"
|
||||
|
||||
|
||||
# determine update channel
|
||||
if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") {
|
||||
Write-Output "UpdateChannel = Nightly"
|
||||
$ModifiedVersion = "$version-NB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Preview)") {
|
||||
Write-Output "UpdateChannel = Preview"
|
||||
$ModifiedVersion = "$version-PB"
|
||||
} elseif ($env:APPVEYOR_PROJECT_NAME -match "(Stable)") {
|
||||
Write-Output "UpdateChannel = Stable"
|
||||
$ModifiedVersion = $version
|
||||
} else {
|
||||
}
|
||||
|
||||
# Fix for AppVeyor
|
||||
if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) {
|
||||
if(!(test-path "Release")) {
|
||||
if($IsAppVeyor) {
|
||||
if(!(Test-Path "Release")) {
|
||||
New-Item -ItemType Directory -Force -Path "Release" | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
# Package debug symbols zip file
|
||||
if ($ConfigurationName -match "Release") {
|
||||
Write-Output "Packaging debug symbols"
|
||||
|
||||
if ($ConfigurationName -match "Portable") {
|
||||
$zipFilePrefix = "mRemoteNG-Portable-symbols"
|
||||
} else {
|
||||
$zipFilePrefix = "mRemoteNG-symbols"
|
||||
Write-Output "Packaging debug symbols"
|
||||
$zipFilePrefix = "mRemoteNG-symbols"
|
||||
$pdbFiles = Get-ChildItem -Path $SolutionDir -Filter *.pdb -Recurse
|
||||
$tempPdbPath = (New-TemporaryDirectory)[0]
|
||||
foreach ($pdbFile in $pdbFiles) {
|
||||
if (($pdbFile.FullName).Contains("\$ConfigurationName\")) {
|
||||
Copy-Item $pdbFile.FullName -Destination $tempPdbPath -Force
|
||||
}
|
||||
|
||||
$debugFile = Join-Path -Path $TargetDir -ChildPath "mRemoteNG.pdb"
|
||||
|
||||
# AppVeyor build
|
||||
if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) {
|
||||
$outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\$zipFilePrefix-$($version).zip"
|
||||
7z a $outputZipPath $debugFile
|
||||
}
|
||||
# Local build
|
||||
else {
|
||||
if (!(Test-Path -Path $debugFile -PathType Leaf))
|
||||
{
|
||||
$outputZipPath = "$($SolutionDir)Release\$zipFilePrefix-$($version).zip"
|
||||
Compress-Archive $debugFile $outputZipPath -Force
|
||||
} else {
|
||||
write-host "File do not exist:" $debugFile", nothing to compress"
|
||||
}
|
||||
}
|
||||
|
||||
Remove-Item $debugFile
|
||||
}
|
||||
|
||||
if ($IsAppVeyor) {
|
||||
# AppVeyor build
|
||||
$outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\$zipFilePrefix-$($ModifiedVersion).zip"
|
||||
Write-Output "outputZipPath: $outputZipPath"
|
||||
7z a $outputZipPath "$tempPdbPath\*.pdb"
|
||||
}
|
||||
# else {
|
||||
# # Local build
|
||||
# $outputZipPath = "$($SolutionDir)Release\$zipFilePrefix-$($ModifiedVersion).zip"
|
||||
# Write-Output "outputZipPath: $outputZipPath"
|
||||
# Compress-Archive -Path $tempPdbPath -DestinationPath $outputZipPath -Force
|
||||
# }
|
||||
|
||||
|
||||
# Package portable release zip file
|
||||
if ($ConfigurationName -eq "Release Portable") {
|
||||
Write-Output "Packaging portable ZIP file"
|
||||
|
||||
# AppVeyor build
|
||||
if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) {
|
||||
$outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\mRemoteNG-Portable-$($version).zip"
|
||||
7z a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath $TargetDir\*
|
||||
}
|
||||
# Local build
|
||||
else {
|
||||
if ($Source)
|
||||
{
|
||||
$outputZipPath="$($SolutionDir)\Release\mRemoteNG-Portable-$($version).zip"
|
||||
Compress-Archive $Source $outputZipPath -Force
|
||||
} else {
|
||||
write-host "File do not exist:" $Source", nothing to compress"
|
||||
}
|
||||
Write-Output "Packaging portable ZIP file"
|
||||
# AppVeyor build
|
||||
if ($IsAppVeyor) {
|
||||
$outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\mRemoteNG-Portable-$($ModifiedVersion).zip"
|
||||
7z a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath $TargetDir\*
|
||||
Write-Output "Portable ZIP: $outputZipPath"
|
||||
}
|
||||
# Local build
|
||||
else {
|
||||
if ($Source)
|
||||
{
|
||||
$outputZipPath="$($SolutionDir)\Release\mRemoteNG-Portable-$($ModifiedVersion).zip"
|
||||
Compress-Archive $Source $outputZipPath -Force
|
||||
} else {
|
||||
Write-Output "Files do not exist:" $Source", nothing to compress"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
|
||||
Write-Output "End $($PSCmdlet.MyInvocation.MyCommand)"
|
||||
Write-Output ""
|
||||
|
||||
6
mRemoteNG.lutconfig
Normal file
6
mRemoteNG.lutconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
<LUTConfig Version="1.0">
|
||||
<Repository />
|
||||
<ParallelBuilds>true</ParallelBuilds>
|
||||
<ParallelTestRuns>true</ParallelTestRuns>
|
||||
<TestCaseTimeout>180000</TestCaseTimeout>
|
||||
</LUTConfig>
|
||||
@@ -13,7 +13,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "mRemoteNGI
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "mRemoteNGInstaller\Installer\Installer.wixproj", "{F0168B9F-6815-40DF-BA53-46CEE7683B68}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6} = {4934A491-40BC-4E5B-9166-EA1169A220F6}
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04} = {5423D985-CB48-4344-B47F-E8C6D60C8B04}
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD} = {A56A2029-79B8-492A-ABE5-D2BFE05801BD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mRemoteNGSpecs", "mRemoteNGSpecs\mRemoteNGSpecs.csproj", "{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}"
|
||||
@@ -22,55 +24,39 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExternalConnectors", "Exter
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Portable|x64 = Debug Portable|x64
|
||||
Debug|x64 = Debug|x64
|
||||
Release Installer|x64 = Release Installer|x64
|
||||
Release Portable|x64 = Release Portable|x64
|
||||
Release Installer and Portable|x64 = Release Installer and Portable|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.Build.0 = Debug Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.Build.0 = Debug|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.Build.0 = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.Build.0 = Release Portable|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer and Portable|x64.Build.0 = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.ActiveCfg = Release|x64
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.Build.0 = Release|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x64.Build.0 = Release Portable|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x64.Build.0 = Debug|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.ActiveCfg = Release|x64
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.Build.0 = Release|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.Build.0 = Release|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x64.Build.0 = Debug|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer and Portable|x64.Build.0 = Release|x64
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|x64.ActiveCfg = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.Build.0 = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x64.Build.0 = Debug|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer and Portable|x64.Build.0 = Release|x64
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.ActiveCfg = Release|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x64.ActiveCfg = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.Build.0 = Debug Portable|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.Build.0 = Debug|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x64.ActiveCfg = Release Installer|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.ActiveCfg = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.Build.0 = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.ActiveCfg = Release Portable|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.Build.0 = Release Portable|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer and Portable|x64.ActiveCfg = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer and Portable|x64.Build.0 = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.ActiveCfg = Release|x64
|
||||
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
|
||||
11
mRemoteNG/App.config
Normal file
11
mRemoteNG/App.config
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="LanguageFolder" value="Language"/>
|
||||
</appSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="Languages"/>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -8,9 +8,11 @@ using mRemoteNG.Properties;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class CompatibilityChecker
|
||||
{
|
||||
public static void CheckCompatibility(MessageCollector messageCollector)
|
||||
@@ -33,18 +35,13 @@ namespace mRemoteNG.App
|
||||
|
||||
if (!FipsPolicyEnabledForServer2003() && !FipsPolicyEnabledForServer2008AndNewer()) return;
|
||||
|
||||
var errorText = string.Format(Language.ErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName);
|
||||
string errorText = string.Format(Language.ErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName);
|
||||
messageCollector.AddMessage(MessageClass.ErrorMsg, errorText, true);
|
||||
|
||||
//About to pop up a message, let's not block it...
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
FrmSplashScreenNew.GetInstance().Close();
|
||||
|
||||
var ShouldIStayOrShouldIGo = CTaskDialog.MessageBox(Application.ProductName,
|
||||
Language.CompatibilityProblemDetected, errorText, "",
|
||||
"",
|
||||
Language.CheckboxDoNotShowThisMessageAgain,
|
||||
ETaskDialogButtons.OkCancel, ESysIcons.Warning,
|
||||
ESysIcons.Warning);
|
||||
DialogResult ShouldIStayOrShouldIGo = CTaskDialog.MessageBox(Application.ProductName, Language.CompatibilityProblemDetected, errorText, "", "", Language.CheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.OkCancel, ESysIcons.Warning, ESysIcons.Warning);
|
||||
if (CTaskDialog.VerificationChecked && ShouldIStayOrShouldIGo == DialogResult.OK)
|
||||
{
|
||||
messageCollector.AddMessage(MessageClass.ErrorMsg, "User requests that FIPS check be overridden", true);
|
||||
@@ -59,7 +56,7 @@ namespace mRemoteNG.App
|
||||
|
||||
private static bool FipsPolicyEnabledForServer2003()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa");
|
||||
RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa");
|
||||
if (!(regKey?.GetValue("FIPSAlgorithmPolicy") is int fipsPolicy))
|
||||
return false;
|
||||
return fipsPolicy != 0;
|
||||
@@ -67,7 +64,7 @@ namespace mRemoteNG.App
|
||||
|
||||
private static bool FipsPolicyEnabledForServer2008AndNewer()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy");
|
||||
RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy");
|
||||
if (!(regKey?.GetValue("Enabled") is int fipsPolicy))
|
||||
return false;
|
||||
return fipsPolicy != 0;
|
||||
@@ -80,7 +77,7 @@ namespace mRemoteNG.App
|
||||
if (!Settings.Default.CompatibilityWarnLenovoAutoScrollUtility)
|
||||
return;
|
||||
|
||||
var proccesses = new Process[] { };
|
||||
Process[] proccesses = new Process[] { };
|
||||
try
|
||||
{
|
||||
proccesses = Process.GetProcessesByName("virtscrl");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
@@ -17,15 +18,16 @@ using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Export
|
||||
{
|
||||
public static void ExportToFile(ConnectionInfo selectedNode, ConnectionTreeModel connectionTreeModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var saveFilter = new SaveFilter();
|
||||
SaveFilter saveFilter = new();
|
||||
|
||||
using (var exportForm = new FrmExport())
|
||||
using (FrmExport exportForm = new())
|
||||
{
|
||||
if (selectedNode?.GetTreeNodeType() == TreeNodeType.Container)
|
||||
exportForm.SelectedFolder = selectedNode as ContainerInfo;
|
||||
@@ -79,9 +81,9 @@ namespace mRemoteNG.App
|
||||
switch (saveFormat)
|
||||
{
|
||||
case SaveFormat.mRXML:
|
||||
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
|
||||
var rootNode = exportTarget.GetRootParent() as RootNodeInfo;
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
ICryptographyProvider cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
|
||||
RootNodeInfo rootNode = exportTarget.GetRootParent() as RootNodeInfo;
|
||||
XmlConnectionNodeSerializer28 connectionNodeSerializer = new(
|
||||
cryptographyProvider,
|
||||
rootNode?.PasswordString
|
||||
.ConvertToSecureString() ??
|
||||
@@ -100,8 +102,8 @@ namespace mRemoteNG.App
|
||||
throw new ArgumentOutOfRangeException(nameof(saveFormat), saveFormat, null);
|
||||
}
|
||||
|
||||
var serializedData = serializer.Serialize(exportTarget);
|
||||
var fileDataProvider = new FileDataProvider(fileName);
|
||||
string serializedData = serializer.Serialize(exportTarget);
|
||||
FileDataProvider fileDataProvider = new(fileName);
|
||||
fileDataProvider.Save(serializedData);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -8,22 +8,24 @@ using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
public static class Import
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Import
|
||||
{
|
||||
public static void ImportFromFile(ContainerInfo importDestinationContainer)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var openFileDialog = new OpenFileDialog())
|
||||
using (OpenFileDialog openFileDialog = new())
|
||||
{
|
||||
openFileDialog.CheckFileExists = true;
|
||||
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
openFileDialog.Multiselect = true;
|
||||
|
||||
var fileTypes = new List<string>();
|
||||
List<string> fileTypes = new();
|
||||
fileTypes.AddRange(new[] {Language.FilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv"});
|
||||
fileTypes.AddRange(new[] {Language.FiltermRemoteXML, "*.xml"});
|
||||
fileTypes.AddRange(new[] {Language.FiltermRemoteCSV, "*.csv"});
|
||||
@@ -31,6 +33,7 @@ namespace mRemoteNG.App
|
||||
fileTypes.AddRange(new[] {Language.FilterRdgFiles, "*.rdg"});
|
||||
fileTypes.AddRange(new[] {Language.FilterPuttyConnectionManager, "*.dat"});
|
||||
fileTypes.AddRange(new[] {Language.FilterAll, "*.*"});
|
||||
fileTypes.AddRange(new[] { Language.FilterSecureCRT, "*.crt" });
|
||||
|
||||
openFileDialog.Filter = string.Join("|", fileTypes.ToArray());
|
||||
|
||||
@@ -38,8 +41,8 @@ namespace mRemoteNG.App
|
||||
return;
|
||||
|
||||
HeadlessFileImport(
|
||||
openFileDialog.FileNames,
|
||||
importDestinationContainer,
|
||||
openFileDialog.FileNames,
|
||||
importDestinationContainer,
|
||||
Runtime.ConnectionsService,
|
||||
fileName => MessageBox.Show(string.Format(Language.ImportFileFailedContent, fileName), Language.AskUpdatesMainInstruction,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1));
|
||||
@@ -51,19 +54,50 @@ namespace mRemoteNG.App
|
||||
}
|
||||
}
|
||||
|
||||
public static void ImportFromRemoteDesktopManagerCsv(ContainerInfo importDestinationContainer)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Runtime.ConnectionsService.BatchedSavingContext())
|
||||
{
|
||||
using (OpenFileDialog openFileDialog = new())
|
||||
{
|
||||
openFileDialog.CheckFileExists = true;
|
||||
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
|
||||
openFileDialog.Multiselect = false;
|
||||
|
||||
List<string> fileTypes = new();
|
||||
fileTypes.AddRange(new[] {Language.FiltermRemoteRemoteDesktopManagerCSV, "*.csv"});
|
||||
|
||||
openFileDialog.Filter = string.Join("|", fileTypes.ToArray());
|
||||
|
||||
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
RemoteDesktopManagerImporter importer = new();
|
||||
importer.Import(openFileDialog.FileName, importDestinationContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromRemoteDesktopManagerCsv() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HeadlessFileImport(
|
||||
IEnumerable<string> filePaths,
|
||||
ContainerInfo importDestinationContainer,
|
||||
IEnumerable<string> filePaths,
|
||||
ContainerInfo importDestinationContainer,
|
||||
ConnectionsService connectionsService,
|
||||
Action<string> exceptionAction = null)
|
||||
{
|
||||
using (connectionsService.BatchedSavingContext())
|
||||
{
|
||||
foreach (var fileName in filePaths)
|
||||
foreach (string fileName in filePaths)
|
||||
{
|
||||
try
|
||||
{
|
||||
var importer = BuildConnectionImporterFromFileExtension(fileName);
|
||||
IConnectionImporter<string> importer = BuildConnectionImporterFromFileExtension(fileName);
|
||||
importer.Import(fileName, importDestinationContainer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -100,7 +134,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
using (Runtime.ConnectionsService.BatchedSavingContext())
|
||||
{
|
||||
var importer = new PortScanImporter(protocol);
|
||||
PortScanImporter importer = new(protocol);
|
||||
importer.Import(hosts, importDestinationContainer);
|
||||
}
|
||||
}
|
||||
@@ -110,10 +144,25 @@ namespace mRemoteNG.App
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ImportFromPutty(ContainerInfo selectedNodeAsContainer)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Runtime.ConnectionsService.BatchedSavingContext())
|
||||
{
|
||||
RegistryImporter.Import("Software\\SimonTatham\\PuTTY\\Sessions", selectedNodeAsContainer);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromPutty() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static IConnectionImporter<string> BuildConnectionImporterFromFileExtension(string fileName)
|
||||
{
|
||||
// TODO: Use the file contents to determine the file type instead of trusting the extension
|
||||
var extension = Path.GetExtension(fileName) ?? "";
|
||||
string extension = Path.GetExtension(fileName) ?? "";
|
||||
switch (extension.ToLowerInvariant())
|
||||
{
|
||||
case ".xml":
|
||||
@@ -126,6 +175,8 @@ namespace mRemoteNG.App
|
||||
return new RemoteDesktopConnectionManagerImporter();
|
||||
case ".dat":
|
||||
return new PuttyConnectionManagerImporter();
|
||||
case ".crt":
|
||||
return new SecureCRTImporter();
|
||||
default:
|
||||
throw new FileFormatException("Unrecognized file format.");
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
public static class ConnectionsFileInfo
|
||||
{
|
||||
public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath;
|
||||
public static readonly string DefaultConnectionsFile = "confCons.xml";
|
||||
public static readonly string DefaultConnectionsFileNew = "confConsNew.xml";
|
||||
public static readonly Version ConnectionFileVersion = new Version(2, 9);
|
||||
}
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class ConnectionsFileInfo
|
||||
{
|
||||
public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath;
|
||||
public static readonly string DefaultConnectionsFile = "confCons.xml";
|
||||
public static readonly string DefaultConnectionsFileNew = "confConsNew.xml";
|
||||
public static readonly Version ConnectionFileVersion = new(3, 0);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace mRemoteNG.App.Info
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class CredentialsFileInfo
|
||||
{
|
||||
public static readonly string CredentialsPath = SettingsFileInfo.SettingsPath;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using static System.Environment;
|
||||
@@ -9,37 +10,33 @@ using static System.Environment;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class GeneralAppInfo
|
||||
{
|
||||
public const string UrlHome = "https://www.mremoteng.org";
|
||||
public const string UrlHome = "https://mremoteng.org";
|
||||
public const string UrlDonate = "https://mremoteng.org/contribute";
|
||||
public const string UrlForum = "https://www.reddit.com/r/mRemoteNG";
|
||||
public const string UrlBugs = "https://bugs.mremoteng.org";
|
||||
public const string UrlDocumentation = "https://mremoteng.readthedocs.io/en/latest/";
|
||||
public static string ApplicationVersion = Application.ProductVersion;
|
||||
public static readonly string ApplicationVersion = Application.ProductVersion;
|
||||
public static readonly string ProductName = Application.ProductName;
|
||||
|
||||
public static readonly string Copyright =
|
||||
((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
|
||||
typeof(AssemblyCopyrightAttribute), false))
|
||||
.Copyright;
|
||||
|
||||
public static readonly string Copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false))?.Copyright;
|
||||
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||
|
||||
//public static string ReportingFilePath = "";
|
||||
public static readonly string PuttyPath = HomePath + "\\PuTTYNG.exe";
|
||||
private static readonly string puttyPath = HomePath + "\\PuTTYNG.exe";
|
||||
|
||||
public static string UserAgent
|
||||
{
|
||||
get
|
||||
{
|
||||
var details = new List<string>
|
||||
{
|
||||
List<string> details =
|
||||
[
|
||||
"compatible",
|
||||
OSVersion.Platform == PlatformID.Win32NT
|
||||
? $"Windows NT {OSVersion.Version.Major}.{OSVersion.Version.Minor}"
|
||||
: OSVersion.VersionString
|
||||
};
|
||||
];
|
||||
if (Is64BitProcess)
|
||||
{
|
||||
details.Add("WOW64");
|
||||
@@ -47,15 +44,17 @@ namespace mRemoteNG.App.Info
|
||||
|
||||
details.Add(Thread.CurrentThread.CurrentUICulture.Name);
|
||||
details.Add($".NET CLR {Environment.Version}");
|
||||
var detailsString = string.Join("; ", details.ToArray());
|
||||
string detailsString = string.Join("; ", [.. details]);
|
||||
|
||||
return $"Mozilla/5.0 ({detailsString}) {ProductName}/{ApplicationVersion}";
|
||||
}
|
||||
}
|
||||
|
||||
public static string PuttyPath => puttyPath;
|
||||
|
||||
public static Version GetApplicationVersion()
|
||||
{
|
||||
System.Version.TryParse(ApplicationVersion, out var v);
|
||||
_ = System.Version.TryParse(ApplicationVersion, out Version v);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Connection;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class SettingsFileInfo
|
||||
{
|
||||
private static readonly string ExePath =
|
||||
Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location);
|
||||
private static readonly string ExePath = Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location);
|
||||
|
||||
public static string SettingsPath =>
|
||||
Runtime.IsPortableEdition
|
||||
? ExePath
|
||||
: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName;
|
||||
public static string SettingsPath => Runtime.IsPortableEdition ? ExePath : Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName;
|
||||
|
||||
public static string LayoutFileName { get; } = "pnlLayout.xml";
|
||||
public static string ExtAppsFilesName { get; } = "extApps.xml";
|
||||
public static string ThemesFileName { get; } = "Themes.xml";
|
||||
public static string LocalConnectionProperties { get; } = "LocalConnectionProperties.xml";
|
||||
|
||||
public static string ThemeFolder { get; } =
|
||||
SettingsPath != null ? Path.Combine(SettingsPath, "Themes") : String.Empty;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Properties;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class UpdateChannelInfo
|
||||
{
|
||||
public const string STABLE = "Stable";
|
||||
@@ -22,7 +24,7 @@ namespace mRemoteNG.App.Info
|
||||
|
||||
public static Uri GetUpdateChannelInfo()
|
||||
{
|
||||
var channel = IsValidChannel(Settings.Default.UpdateChannel) ? Settings.Default.UpdateChannel : STABLE;
|
||||
string channel = IsValidChannel(Properties.OptionsUpdatesPage.Default.UpdateChannel) ? Properties.OptionsUpdatesPage.Default.UpdateChannel : STABLE;
|
||||
return GetUpdateTxtUri(channel);
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ namespace mRemoteNG.App.Info
|
||||
|
||||
private static Uri GetUpdateTxtUri(string channel)
|
||||
{
|
||||
return new Uri(new Uri(Settings.Default.UpdateAddress),
|
||||
return new Uri(new Uri(Properties.OptionsUpdatesPage.Default.UpdateAddress),
|
||||
new Uri(GetChannelFileName(channel), UriKind.Relative));
|
||||
}
|
||||
|
||||
|
||||
87
mRemoteNG/App/Info/WindowsRegistryInfo.cs
Normal file
87
mRemoteNG/App/Info/WindowsRegistryInfo.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using Microsoft.Win32;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class WindowsRegistryInfo
|
||||
{
|
||||
#region General Parameters
|
||||
|
||||
public const RegistryHive Hive = RegistryHive.LocalMachine;
|
||||
public const string RootKey = "SOFTWARE\\mRemoteNG";
|
||||
private const string OptionsSubKey = "Options";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Key Locations
|
||||
|
||||
// StartupExit
|
||||
// Registry subkey for general application startup and exit settings
|
||||
// Registry subkey for startup and exit options page settings
|
||||
public const string StartupExit = RootKey + "\\StartupExit";
|
||||
public const string StartupExitOptions = StartupExit + "\\" + OptionsSubKey;
|
||||
|
||||
// Appearance
|
||||
// Registry subkey for general application appearance settings
|
||||
// Registry subkey for appearance options page settings
|
||||
public const string Appearance = RootKey + "\\Appearance";
|
||||
public const string AppearanceOptions = Appearance + "\\" + OptionsSubKey;
|
||||
|
||||
// Connections
|
||||
// Registry subkey for general application connection settings
|
||||
// Registry subkey for connections options page settings
|
||||
public const string Connection = RootKey + "\\Connections";
|
||||
public const string ConnectionOptions = Connection + "\\" + OptionsSubKey;
|
||||
|
||||
// Tabs & Panels
|
||||
// Registry subkey for general application tabs and panels settings
|
||||
// Registry subkey for tabs and panels options page settings
|
||||
public const string TabsAndPanels = RootKey + "\\TabsAndPanels";
|
||||
public const string TabsAndPanelsOptions = TabsAndPanels + "\\" + OptionsSubKey;
|
||||
|
||||
// Notifications
|
||||
// Registry subkey for general application notifications settings
|
||||
// Registry subkey for notifications options page settings
|
||||
public const string Notification = RootKey + "\\Notifications";
|
||||
public const string NotificationOptions = Notification + "\\" + OptionsSubKey;
|
||||
|
||||
// Credential
|
||||
// Registry subkey for general application credentials settings
|
||||
// Registry subkey for credentials options page settings
|
||||
public const string Credential = RootKey + "\\Credentials";
|
||||
public const string CredentialOptions = Credential + "\\" + OptionsSubKey;
|
||||
|
||||
// SQL Server
|
||||
// Registry subkey for general application SQL server settings
|
||||
// Registry subkey for SQL server options page settings
|
||||
public const string SQLServer = RootKey + "\\SQLServer";
|
||||
public const string SQLServerOptions = SQLServer + "\\" + OptionsSubKey;
|
||||
|
||||
// Updates
|
||||
// Registry subkey for general application update settings
|
||||
// Registry subkey for updates options page settings
|
||||
public const string Update = RootKey + "\\Updates";
|
||||
public const string UpdateOptions = Update + "\\" + OptionsSubKey;
|
||||
|
||||
// Security
|
||||
// Registry subkey for general application security settings
|
||||
// Registry subkey for security options page settings
|
||||
public const string Security = RootKey + "\\Security";
|
||||
public const string SecurityOptions = Security + "\\" + OptionsSubKey;
|
||||
|
||||
// Advanced
|
||||
// Registry subkey for general application advanced settings
|
||||
// Registry subkey for advanced options page settings
|
||||
public const string Advanced = RootKey + "\\Advanced";
|
||||
public const string AdvancedOptions = Advanced + "\\" + OptionsSubKey;
|
||||
|
||||
// Backup
|
||||
// Registry subkey for general application backup settings
|
||||
// Registry subkey for backup options page settings
|
||||
public const string Backup = RootKey + "\\Backup";
|
||||
public const string BackupOptions = Backup + "\\" + OptionsSubKey;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Connection;
|
||||
|
||||
|
||||
namespace mRemoteNG.App.Initialization
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ConnectionIconLoader
|
||||
{
|
||||
private readonly string _path;
|
||||
@@ -22,9 +24,9 @@ namespace mRemoteNG.App.Initialization
|
||||
if (Directory.Exists(_path) == false)
|
||||
return;
|
||||
|
||||
foreach (var f in Directory.GetFiles(_path, "*.ico", SearchOption.AllDirectories))
|
||||
foreach (string f in Directory.GetFiles(_path, "*.ico", SearchOption.AllDirectories))
|
||||
{
|
||||
var fInfo = new FileInfo(f);
|
||||
FileInfo fInfo = new(f);
|
||||
Array.Resize(ref ConnectionIcon.Icons, ConnectionIcon.Icons.Length + 1);
|
||||
ConnectionIcon.Icons.SetValue(fInfo.Name.Replace(".ico", ""), ConnectionIcon.Icons.Length - 1);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.Properties;
|
||||
|
||||
namespace mRemoteNG.App.Initialization
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class CredsAndConsSetup
|
||||
{
|
||||
public void LoadCredsAndCons()
|
||||
{
|
||||
new SaveConnectionsOnEdit(Runtime.ConnectionsService);
|
||||
|
||||
if (Settings.Default.FirstStart && !Settings.Default.LoadConsFromCustomLocation &&
|
||||
!File.Exists(Runtime.ConnectionsService.GetStartupConnectionFileName()))
|
||||
Runtime.ConnectionsService.NewConnectionsFile(Runtime.ConnectionsService
|
||||
.GetStartupConnectionFileName());
|
||||
if (Properties.App.Default.FirstStart && !Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation && !File.Exists(Runtime.ConnectionsService.GetStartupConnectionFileName()))
|
||||
Runtime.ConnectionsService.NewConnectionsFile(Runtime.ConnectionsService.GetStartupConnectionFileName());
|
||||
|
||||
Runtime.LoadConnections();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Messages.MessageFilteringOptions;
|
||||
using mRemoteNG.Messages.MessageWriters;
|
||||
@@ -7,17 +8,24 @@ using mRemoteNG.Messages.WriterDecorators;
|
||||
|
||||
namespace mRemoteNG.App.Initialization
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class MessageCollectorSetup
|
||||
{
|
||||
public static void SetupMessageCollector(MessageCollector messageCollector,
|
||||
IList<IMessageWriter> messageWriterList)
|
||||
public static void SetupMessageCollector(MessageCollector messageCollector, IList<IMessageWriter> messageWriterList)
|
||||
{
|
||||
messageCollector.CollectionChanged += (o, args) =>
|
||||
{
|
||||
var messages = args.NewItems.Cast<IMessage>().ToArray();
|
||||
foreach (var printer in messageWriterList)
|
||||
foreach (var message in messages)
|
||||
if (args.NewItems == null) return;
|
||||
|
||||
IMessage[] messages = args.NewItems.Cast<IMessage>().ToArray();
|
||||
|
||||
foreach (IMessageWriter printer in messageWriterList)
|
||||
{
|
||||
foreach (IMessage message in messages)
|
||||
{
|
||||
printer.Write(message);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,37 +47,30 @@ namespace mRemoteNG.App.Initialization
|
||||
private static IMessageWriter BuildTextLogMessageWriter()
|
||||
{
|
||||
return new MessageTypeFilterDecorator(
|
||||
new LogMessageTypeFilteringOptions(),
|
||||
new TextLogMessageWriter(Logger.Instance)
|
||||
);
|
||||
new LogMessageTypeFilteringOptions(),
|
||||
new TextLogMessageWriter(Logger.Instance)
|
||||
);
|
||||
}
|
||||
|
||||
private static IMessageWriter BuildNotificationPanelMessageWriter()
|
||||
{
|
||||
return new OnlyLogMessageFilter(
|
||||
new MessageTypeFilterDecorator(
|
||||
new
|
||||
NotificationPanelMessageFilteringOptions(),
|
||||
new MessageFocusDecorator(
|
||||
Windows.ErrorsForm,
|
||||
new
|
||||
NotificationPanelSwitchOnMessageFilteringOptions(),
|
||||
new
|
||||
NotificationPanelMessageWriter(Windows
|
||||
.ErrorsForm)
|
||||
)
|
||||
)
|
||||
);
|
||||
new MessageTypeFilterDecorator(
|
||||
new NotificationPanelMessageFilteringOptions(),
|
||||
new MessageFocusDecorator(Windows.ErrorsForm,
|
||||
new NotificationPanelSwitchOnMessageFilteringOptions(),
|
||||
new NotificationPanelMessageWriter(Windows.ErrorsForm))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private static IMessageWriter BuildPopupMessageWriter()
|
||||
{
|
||||
return new OnlyLogMessageFilter(
|
||||
new MessageTypeFilterDecorator(
|
||||
new PopupMessageFilteringOptions(),
|
||||
new PopupMessageWriter()
|
||||
)
|
||||
);
|
||||
new MessageTypeFilterDecorator(
|
||||
new PopupMessageFilteringOptions(),
|
||||
new PopupMessageWriter())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Management;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Messages;
|
||||
@@ -7,16 +8,14 @@ using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.App.Initialization
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class StartupDataLogger
|
||||
{
|
||||
private readonly MessageCollector _messageCollector;
|
||||
|
||||
public StartupDataLogger(MessageCollector messageCollector)
|
||||
{
|
||||
if (messageCollector == null)
|
||||
throw new ArgumentNullException(nameof(messageCollector));
|
||||
|
||||
_messageCollector = messageCollector;
|
||||
_messageCollector = messageCollector ?? throw new ArgumentNullException(nameof(messageCollector));
|
||||
}
|
||||
|
||||
public void LogStartupData()
|
||||
@@ -30,25 +29,25 @@ namespace mRemoteNG.App.Initialization
|
||||
|
||||
private void LogSystemData()
|
||||
{
|
||||
var osData = GetOperatingSystemData();
|
||||
var architecture = GetArchitectureData();
|
||||
var nonEmptyData = Array.FindAll(new[] {osData, architecture}, s => !string.IsNullOrEmpty(s));
|
||||
var data = string.Join(" ", nonEmptyData);
|
||||
string osData = GetOperatingSystemData();
|
||||
string architecture = GetArchitectureData();
|
||||
string[] nonEmptyData = Array.FindAll(new[] {osData, architecture}, s => !string.IsNullOrEmpty(s));
|
||||
string data = string.Join(" ", nonEmptyData);
|
||||
_messageCollector.AddMessage(MessageClass.InformationMsg, data, true);
|
||||
}
|
||||
|
||||
private string GetOperatingSystemData()
|
||||
{
|
||||
var osVersion = string.Empty;
|
||||
var servicePack = string.Empty;
|
||||
string osVersion = string.Empty;
|
||||
string servicePack = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem WHERE Primary=True")
|
||||
foreach (ManagementBaseObject o in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem WHERE Primary=True")
|
||||
.Get())
|
||||
{
|
||||
var managementObject = (ManagementObject)o;
|
||||
osVersion = Convert.ToString(managementObject.GetPropertyValue("Caption")).Trim();
|
||||
ManagementObject managementObject = (ManagementObject)o;
|
||||
osVersion = Convert.ToString(managementObject.GetPropertyValue("Caption"))?.Trim();
|
||||
servicePack = GetOSServicePack(servicePack, managementObject);
|
||||
}
|
||||
}
|
||||
@@ -57,13 +56,13 @@ namespace mRemoteNG.App.Initialization
|
||||
_messageCollector.AddExceptionMessage("Error retrieving operating system information from WMI.", ex);
|
||||
}
|
||||
|
||||
var osData = string.Join(" ", osVersion, servicePack);
|
||||
string osData = string.Join(" ", osVersion, servicePack);
|
||||
return osData;
|
||||
}
|
||||
|
||||
private string GetOSServicePack(string servicePack, ManagementObject managementObject)
|
||||
{
|
||||
var servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion"));
|
||||
int servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion"));
|
||||
if (servicePackNumber != 0)
|
||||
{
|
||||
servicePack = $"Service Pack {servicePackNumber}";
|
||||
@@ -74,14 +73,13 @@ namespace mRemoteNG.App.Initialization
|
||||
|
||||
private string GetArchitectureData()
|
||||
{
|
||||
var architecture = string.Empty;
|
||||
string architecture = string.Empty;
|
||||
try
|
||||
{
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor WHERE DeviceID=\'CPU0\'")
|
||||
.Get())
|
||||
foreach (ManagementBaseObject o in new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor WHERE DeviceID=\'CPU0\'").Get())
|
||||
{
|
||||
var managementObject = (ManagementObject)o;
|
||||
var addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth"));
|
||||
ManagementObject managementObject = (ManagementObject)o;
|
||||
int addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth"));
|
||||
architecture = $"{addressWidth}-bit";
|
||||
}
|
||||
}
|
||||
@@ -95,7 +93,7 @@ namespace mRemoteNG.App.Initialization
|
||||
|
||||
private void LogApplicationData()
|
||||
{
|
||||
var data = $"{Application.ProductName} {Application.ProductVersion}";
|
||||
string data = $"{Application.ProductName} {Application.ProductVersion}";
|
||||
if (Runtime.IsPortableEdition)
|
||||
data += $" {Language.PortableEdition}";
|
||||
data += " starting.";
|
||||
@@ -104,20 +102,19 @@ namespace mRemoteNG.App.Initialization
|
||||
|
||||
private void LogCmdLineArgs()
|
||||
{
|
||||
var data = $"Command Line: {string.Join(" ", Environment.GetCommandLineArgs())}";
|
||||
string data = $"Command Line: {string.Join(" ", Environment.GetCommandLineArgs())}";
|
||||
_messageCollector.AddMessage(MessageClass.InformationMsg, data, true);
|
||||
}
|
||||
|
||||
private void LogClrData()
|
||||
{
|
||||
var data = $"Microsoft .NET CLR {Environment.Version}";
|
||||
string data = $"Microsoft .NET CLR {Environment.Version}";
|
||||
_messageCollector.AddMessage(MessageClass.InformationMsg, data, true);
|
||||
}
|
||||
|
||||
private void LogCultureData()
|
||||
{
|
||||
var data =
|
||||
$"System Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}";
|
||||
string data = $"System Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}";
|
||||
_messageCollector.AddMessage(MessageClass.InformationMsg, data, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using log4net.Appender;
|
||||
using log4net.Config;
|
||||
using mRemoteNG.Properties;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
using log4net.Repository;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class Logger
|
||||
{
|
||||
public static readonly Logger Instance = new Logger();
|
||||
public static readonly Logger Instance = new();
|
||||
|
||||
public ILog Log { get; private set; }
|
||||
|
||||
@@ -27,22 +26,27 @@ namespace mRemoteNG.App
|
||||
private void Initialize()
|
||||
{
|
||||
XmlConfigurator.Configure(LogManager.CreateRepository("mRemoteNG"));
|
||||
if (string.IsNullOrEmpty(Settings.Default.LogFilePath))
|
||||
Settings.Default.LogFilePath = BuildLogFilePath();
|
||||
|
||||
SetLogPath(Settings.Default.LogToApplicationDirectory ? DefaultLogPath : Settings.Default.LogFilePath);
|
||||
if (string.IsNullOrEmpty(Properties.OptionsNotificationsPage.Default.LogFilePath))
|
||||
{
|
||||
Properties.OptionsNotificationsPage.Default.LogFilePath = BuildLogFilePath();
|
||||
}
|
||||
|
||||
SetLogPath(Properties.OptionsNotificationsPage.Default.LogToApplicationDirectory ? DefaultLogPath : Properties.OptionsNotificationsPage.Default.LogFilePath);
|
||||
}
|
||||
|
||||
public void SetLogPath(string path)
|
||||
{
|
||||
var repository = LogManager.GetRepository("mRemoteNG");
|
||||
XmlConfigurator.Configure(repository, new FileInfo("log4net.config"));
|
||||
var appenders = repository.GetAppenders();
|
||||
ILoggerRepository repository = LogManager.GetRepository("mRemoteNG");
|
||||
|
||||
foreach (var appender in appenders)
|
||||
XmlConfigurator.Configure(repository, new FileInfo("log4net.config"));
|
||||
|
||||
IAppender[] appenders = repository.GetAppenders();
|
||||
|
||||
foreach (IAppender appender in appenders)
|
||||
{
|
||||
var fileAppender = (RollingFileAppender)appender;
|
||||
if (fileAppender == null || fileAppender.Name != "LogFileAppender") continue;
|
||||
RollingFileAppender fileAppender = (RollingFileAppender)appender;
|
||||
if (fileAppender is not { Name: "LogFileAppender" }) continue;
|
||||
fileAppender.File = path;
|
||||
fileAppender.ActivateOptions();
|
||||
}
|
||||
@@ -52,22 +56,26 @@ namespace mRemoteNG.App
|
||||
|
||||
private static string BuildLogFilePath()
|
||||
{
|
||||
var logFilePath = Runtime.IsPortableEdition ? GetLogPathPortableEdition() : GetLogPathNormalEdition();
|
||||
var logFileName = Path.ChangeExtension(Application.ProductName, ".log");
|
||||
string logFilePath = Runtime.IsPortableEdition ? GetLogPathPortableEdition() : GetLogPathNormalEdition();
|
||||
|
||||
string logFileName = Path.ChangeExtension(Application.ProductName, ".log");
|
||||
|
||||
if (logFileName == null) return "mRemoteNG.log";
|
||||
var logFile = Path.Combine(logFilePath, logFileName);
|
||||
|
||||
string logFile = Path.Combine(logFilePath, logFileName);
|
||||
|
||||
return logFile;
|
||||
}
|
||||
|
||||
private static string GetLogPathNormalEdition()
|
||||
{
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
Application.ProductName);
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName);
|
||||
}
|
||||
|
||||
private static string GetLogPathPortableEdition()
|
||||
{
|
||||
return Application.StartupPath;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Drawing;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Text;
|
||||
|
||||
#pragma warning disable 649
|
||||
@@ -9,6 +10,7 @@ using System.Text;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class NativeMethods
|
||||
{
|
||||
#region Functions
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Config.Settings;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class ProgramRoot
|
||||
{
|
||||
private static Mutex _mutex;
|
||||
private static FrmSplashScreenNew _frmSplashScreen = null;
|
||||
private static string customResourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Languages");
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
@@ -17,19 +24,79 @@ namespace mRemoteNG.App
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (Settings.Default.SingleInstance)
|
||||
Trace.WriteLine("!!!!!!=============== TEST ==================!!!!!!!!!!!!!");
|
||||
// Forcing to load System.Configuration.ConfigurationManager before any other assembly to be able to check settings
|
||||
try
|
||||
{
|
||||
string assemblyFile = "System.Configuration.ConfigurationManager" + ".dll";
|
||||
string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assemblies", assemblyFile);
|
||||
|
||||
|
||||
if (File.Exists(assemblyPath))
|
||||
{
|
||||
Assembly.LoadFrom(assemblyPath);
|
||||
}
|
||||
}
|
||||
catch (FileNotFoundException ex)
|
||||
{
|
||||
Trace.WriteLine("Error occured: " + ex.Message);
|
||||
}
|
||||
|
||||
//Subscribe to AssemblyResolve event
|
||||
AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve;
|
||||
|
||||
//Check if local settings DB exist or accessible
|
||||
CheckLockalDB();
|
||||
|
||||
Lazy<bool> singleInstanceOption = new Lazy<bool>(() => Properties.OptionsStartupExitPage.Default.SingleInstance);
|
||||
|
||||
if (singleInstanceOption.Value)
|
||||
{
|
||||
StartApplicationAsSingleInstance();
|
||||
}
|
||||
else
|
||||
{
|
||||
StartApplication();
|
||||
}
|
||||
}
|
||||
|
||||
private static void CheckLockalDB()
|
||||
{
|
||||
LocalSettingsDBManager settingsManager = new LocalSettingsDBManager(dbPath: "mRemoteNG.appSettings", useEncryption: false, schemaFilePath: "");
|
||||
}
|
||||
private static Assembly OnAssemblyResolve(object sender, ResolveEventArgs resolveArgs)
|
||||
{
|
||||
string assemblyName = new AssemblyName(resolveArgs.Name).Name.Replace(".resources", string.Empty);
|
||||
string assemblyFile = assemblyName + ".dll";
|
||||
string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assemblies", assemblyFile);
|
||||
|
||||
|
||||
if (File.Exists(assemblyPath))
|
||||
{
|
||||
return Assembly.LoadFrom(assemblyPath);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void StartApplication()
|
||||
{
|
||||
CatchAllUnhandledExceptions();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
var frmSplashScreen = FrmSplashScreen.getInstance();
|
||||
frmSplashScreen.Show();
|
||||
|
||||
_frmSplashScreen = FrmSplashScreenNew.GetInstance();
|
||||
|
||||
Screen targetScreen = Screen.PrimaryScreen;
|
||||
|
||||
Rectangle viewport = targetScreen.WorkingArea;
|
||||
_frmSplashScreen.Top = viewport.Top;
|
||||
_frmSplashScreen.Left = viewport.Left;
|
||||
// normally it should be screens[1] however due DPI apply 1 size "same" as default with 100%
|
||||
_frmSplashScreen.Left = viewport.Left + (targetScreen.Bounds.Size.Width - _frmSplashScreen.Width) / 2;
|
||||
_frmSplashScreen.Top = viewport.Top + (targetScreen.Bounds.Size.Height - _frmSplashScreen.Height) / 2;
|
||||
_frmSplashScreen.ShowInTaskbar = false;
|
||||
_frmSplashScreen.Show();
|
||||
|
||||
Application.Run(FrmMain.Default);
|
||||
}
|
||||
|
||||
@@ -41,7 +108,7 @@ namespace mRemoteNG.App
|
||||
private static void StartApplicationAsSingleInstance()
|
||||
{
|
||||
const string mutexID = "mRemoteNG_SingleInstanceMutex";
|
||||
_mutex = new Mutex(false, mutexID, out var newInstanceCreated);
|
||||
_mutex = new Mutex(false, mutexID, out bool newInstanceCreated);
|
||||
if (!newInstanceCreated)
|
||||
{
|
||||
SwitchToCurrentInstance();
|
||||
@@ -54,18 +121,18 @@ namespace mRemoteNG.App
|
||||
|
||||
private static void SwitchToCurrentInstance()
|
||||
{
|
||||
var singletonInstanceWindowHandle = GetRunningSingletonInstanceWindowHandle();
|
||||
IntPtr singletonInstanceWindowHandle = GetRunningSingletonInstanceWindowHandle();
|
||||
if (singletonInstanceWindowHandle == IntPtr.Zero) return;
|
||||
if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0)
|
||||
NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE);
|
||||
_ = NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE);
|
||||
NativeMethods.SetForegroundWindow(singletonInstanceWindowHandle);
|
||||
}
|
||||
|
||||
private static IntPtr GetRunningSingletonInstanceWindowHandle()
|
||||
{
|
||||
var windowHandle = IntPtr.Zero;
|
||||
var currentProcess = Process.GetCurrentProcess();
|
||||
foreach (var enumeratedProcess in Process.GetProcessesByName(currentProcess.ProcessName))
|
||||
IntPtr windowHandle = IntPtr.Zero;
|
||||
Process currentProcess = Process.GetCurrentProcess();
|
||||
foreach (Process enumeratedProcess in Process.GetProcessesByName(currentProcess.ProcessName))
|
||||
{
|
||||
if (enumeratedProcess.Id != currentProcess.Id &&
|
||||
enumeratedProcess.MainModule.FileName == currentProcess.MainModule.FileName &&
|
||||
@@ -78,30 +145,31 @@ namespace mRemoteNG.App
|
||||
|
||||
private static void CatchAllUnhandledExceptions()
|
||||
{
|
||||
Application.ThreadException += ApplicationOnThreadException;
|
||||
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
System.Windows.Forms.Application.ThreadException += ApplicationOnThreadException;
|
||||
System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
|
||||
}
|
||||
|
||||
private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
if (!FrmSplashScreen.getInstance().IsDisposed)
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
// if (PresentationSource.FromVisual(FrmSplashScreenNew))
|
||||
FrmSplashScreenNew.GetInstance().Close();
|
||||
|
||||
if (FrmMain.Default.IsDisposed) return;
|
||||
|
||||
var window = new FrmUnhandledException(e.Exception, false);
|
||||
|
||||
FrmUnhandledException window = new(e.Exception, false);
|
||||
window.ShowDialog(FrmMain.Default);
|
||||
|
||||
}
|
||||
|
||||
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (!FrmSplashScreen.getInstance().IsDisposed)
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
//TODO: Check if splash closed properly
|
||||
//if (!FrmSplashScreenNew.GetInstance().IsDisposed)
|
||||
// FrmSplashScreenNew.GetInstance().Close();
|
||||
|
||||
var window = new FrmUnhandledException(e.ExceptionObject as Exception, e.IsTerminating);
|
||||
FrmUnhandledException window = new(e.ExceptionObject as Exception, e.IsTerminating);
|
||||
window.ShowDialog(FrmMain.Default);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,11 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Runtime
|
||||
{
|
||||
public static bool IsPortableEdition
|
||||
@@ -44,19 +46,19 @@ namespace mRemoteNG.App
|
||||
public static NotificationAreaIcon NotificationAreaIcon { get; set; }
|
||||
public static ExternalToolsService ExternalToolsService { get; } = new ExternalToolsService();
|
||||
|
||||
public static SecureString EncryptionKey { get; set; } =
|
||||
new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString();
|
||||
public static SecureString EncryptionKey { get; set; } = new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString();
|
||||
|
||||
public static ICredentialRepositoryList CredentialProviderCatalog { get; } = new CredentialRepositoryList();
|
||||
|
||||
public static ConnectionsService ConnectionsService { get; } =
|
||||
new ConnectionsService(PuttySessionsManager.Instance);
|
||||
public static ConnectionInitiator ConnectionInitiator { get; set; } = new ConnectionInitiator();
|
||||
|
||||
public static ConnectionsService ConnectionsService { get; } = new ConnectionsService(PuttySessionsManager.Instance);
|
||||
|
||||
#region Connections Loading/Saving
|
||||
|
||||
public static void LoadConnectionsAsync()
|
||||
{
|
||||
var t = new Thread(LoadConnectionsBGd);
|
||||
Thread t = new(LoadConnectionsBGd);
|
||||
t.SetApartmentState(ApartmentState.STA);
|
||||
t.Start();
|
||||
}
|
||||
@@ -75,7 +77,7 @@ namespace mRemoteNG.App
|
||||
/// </param>
|
||||
public static void LoadConnections(bool withDialog = false)
|
||||
{
|
||||
var connectionFileName = "";
|
||||
string connectionFileName = "";
|
||||
|
||||
try
|
||||
{
|
||||
@@ -84,24 +86,24 @@ namespace mRemoteNG.App
|
||||
|
||||
if (withDialog)
|
||||
{
|
||||
var loadDialog = DialogFactory.BuildLoadConnectionsDialog();
|
||||
OpenFileDialog loadDialog = DialogFactory.BuildLoadConnectionsDialog();
|
||||
if (loadDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
connectionFileName = loadDialog.FileName;
|
||||
Settings.Default.UseSQLServer = false;
|
||||
Settings.Default.Save();
|
||||
Properties.OptionsDBsPage.Default.UseSQLServer = false;
|
||||
Properties.OptionsDBsPage.Default.Save();
|
||||
}
|
||||
else if (!Settings.Default.UseSQLServer)
|
||||
else if (!Properties.OptionsDBsPage.Default.UseSQLServer)
|
||||
{
|
||||
connectionFileName = ConnectionsService.GetStartupConnectionFileName();
|
||||
}
|
||||
|
||||
ConnectionsService.LoadConnections(Settings.Default.UseSQLServer, false, connectionFileName);
|
||||
ConnectionsService.LoadConnections(Properties.OptionsDBsPage.Default.UseSQLServer, false, connectionFileName);
|
||||
|
||||
if (Settings.Default.UseSQLServer)
|
||||
if (Properties.OptionsDBsPage.Default.UseSQLServer)
|
||||
{
|
||||
ConnectionsService.LastSqlUpdate = DateTime.Now;
|
||||
ConnectionsService.LastSqlUpdate = DateTime.Now.ToUniversalTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -113,26 +115,20 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
FrmSplashScreenNew.GetInstance().Close();
|
||||
|
||||
if (Settings.Default.UseSQLServer)
|
||||
if (Properties.OptionsDBsPage.Default.UseSQLServer)
|
||||
{
|
||||
MessageCollector.AddExceptionMessage(Language.LoadFromSqlFailed, ex);
|
||||
var commandButtons = string.Join("|", Language._TryAgain,
|
||||
Language.CommandOpenConnectionFile,
|
||||
string.Format(Language.CommandExitProgram,
|
||||
Application.ProductName));
|
||||
CTaskDialog.ShowCommandBox(Application.ProductName, Language.LoadFromSqlFailed,
|
||||
Language.LoadFromSqlFailedContent,
|
||||
MiscTools.GetExceptionMessageRecursive(ex), "", "",
|
||||
commandButtons, false, ESysIcons.Error, ESysIcons.Error);
|
||||
string commandButtons = string.Join("|", Language._TryAgain, Language.CommandOpenConnectionFile, string.Format(Language.CommandExitProgram, Application.ProductName));
|
||||
CTaskDialog.ShowCommandBox(Application.ProductName, Language.LoadFromSqlFailed, Language.LoadFromSqlFailedContent, MiscTools.GetExceptionMessageRecursive(ex), "", "", commandButtons, false, ESysIcons.Error, ESysIcons.Error);
|
||||
switch (CTaskDialog.CommandButtonResult)
|
||||
{
|
||||
case 0:
|
||||
LoadConnections(withDialog);
|
||||
return;
|
||||
case 1:
|
||||
Settings.Default.UseSQLServer = false;
|
||||
Properties.OptionsDBsPage.Default.UseSQLServer = false;
|
||||
LoadConnections(true);
|
||||
return;
|
||||
default:
|
||||
@@ -156,19 +152,12 @@ namespace mRemoteNG.App
|
||||
Language.Exit
|
||||
};
|
||||
|
||||
var answered = false;
|
||||
bool answered = false;
|
||||
while (!answered)
|
||||
{
|
||||
try
|
||||
{
|
||||
CTaskDialog.ShowTaskDialogBox(
|
||||
GeneralAppInfo.ProductName,
|
||||
Language.ConnectionFileNotFound,
|
||||
"", "", "", "", "",
|
||||
string.Join(" | ", commandButtons),
|
||||
ETaskDialogButtons.None,
|
||||
ESysIcons.Question,
|
||||
ESysIcons.Question);
|
||||
CTaskDialog.ShowTaskDialogBox(GeneralAppInfo.ProductName, Language.ConnectionFileNotFound, "", "", "", "", "", string.Join(" | ", commandButtons), ETaskDialogButtons.None, ESysIcons.Question, ESysIcons.Question);
|
||||
|
||||
switch (CTaskDialog.CommandButtonResult)
|
||||
{
|
||||
@@ -193,11 +182,7 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageCollector.AddExceptionMessage(
|
||||
string
|
||||
.Format(Language.ConnectionsFileCouldNotBeLoadedNew,
|
||||
connectionFileName), exc,
|
||||
MessageClass.InformationMsg);
|
||||
MessageCollector.AddExceptionMessage(string.Format(Language.ConnectionsFileCouldNotBeLoadedNew, connectionFileName), exc, MessageClass.InformationMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,12 +198,7 @@ namespace mRemoteNG.App
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(FrmMain.Default,
|
||||
string.Format(Language.ErrorStartupConnectionFileLoad, Environment.NewLine,
|
||||
Application.ProductName,
|
||||
ConnectionsService.GetStartupConnectionFileName(),
|
||||
MiscTools.GetExceptionMessageRecursive(ex)),
|
||||
@"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(FrmMain.Default, string.Format(Language.ErrorStartupConnectionFileLoad, Environment.NewLine, Application.ProductName, ConnectionsService.GetStartupConnectionFileName(), MiscTools.GetExceptionMessageRecursive(ex)), @"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
@@ -6,10 +7,11 @@ namespace mRemoteNG.App
|
||||
{
|
||||
public static class Screens
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static void SendFormToScreen(Screen screen)
|
||||
{
|
||||
var frmMain = FrmMain.Default;
|
||||
var wasMax = false;
|
||||
FrmMain frmMain = FrmMain.Default;
|
||||
bool wasMax = false;
|
||||
|
||||
if (frmMain.WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
|
||||
@@ -8,11 +8,13 @@ using mRemoteNG.Properties;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Shutdown
|
||||
{
|
||||
private static string _updateFilePath;
|
||||
@@ -65,15 +67,14 @@ namespace mRemoteNG.App
|
||||
DateTime updateDate;
|
||||
DateTime currentDate = DateTime.Now;
|
||||
|
||||
//OBSOLETE: Settings.Default.SaveConsOnExit is obsolete and should be removed in a future release
|
||||
if (Settings.Default.SaveConsOnExit || (Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnExit))
|
||||
if ((Properties.OptionsBackupPage.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnExit))
|
||||
{
|
||||
Runtime.ConnectionsService.SaveConnections();
|
||||
return;
|
||||
}
|
||||
lastUpdate = Runtime.ConnectionsService.UsingDatabase ? Runtime.ConnectionsService.LastSqlUpdate : Runtime.ConnectionsService.LastFileUpdate;
|
||||
|
||||
switch (Settings.Default.SaveConnectionsFrequency)
|
||||
switch (Properties.OptionsBackupPage.Default.SaveConnectionsFrequency)
|
||||
{
|
||||
case (int)ConnectionsBackupFrequencyEnum.Daily:
|
||||
updateDate = lastUpdate.AddDays(1);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading.Tasks;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.App.Initialization;
|
||||
using mRemoteNG.App.Update;
|
||||
using mRemoteNG.Config.Connections.Multiuser;
|
||||
using mRemoteNG.Config.Settings.Registry;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Properties;
|
||||
@@ -18,8 +19,10 @@ using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class Startup
|
||||
{
|
||||
private RegistryLoader _RegistryLoader;
|
||||
private AppUpdater _appUpdate;
|
||||
private readonly ConnectionIconLoader _connectionIconLoader;
|
||||
private readonly FrmMain _frmMain = FrmMain.Default;
|
||||
@@ -28,19 +31,15 @@ namespace mRemoteNG.App
|
||||
|
||||
private Startup()
|
||||
{
|
||||
_appUpdate = new AppUpdater();
|
||||
_RegistryLoader = RegistryLoader.Instance; //created instance
|
||||
_appUpdate = new AppUpdater();
|
||||
_connectionIconLoader = new ConnectionIconLoader(GeneralAppInfo.HomePath + "\\Icons\\");
|
||||
}
|
||||
|
||||
static Startup()
|
||||
{
|
||||
}
|
||||
|
||||
public void InitializeProgram(MessageCollector messageCollector)
|
||||
{
|
||||
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " +
|
||||
Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
|
||||
var startupLogger = new StartupDataLogger(messageCollector);
|
||||
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
|
||||
StartupDataLogger startupLogger = new(messageCollector);
|
||||
startupLogger.LogStartupData();
|
||||
CompatibilityChecker.CheckCompatibility(messageCollector);
|
||||
ParseCommandLineArgs(messageCollector);
|
||||
@@ -52,17 +51,16 @@ namespace mRemoteNG.App
|
||||
|
||||
private static void ParseCommandLineArgs(MessageCollector messageCollector)
|
||||
{
|
||||
var interpreter = new StartupArgumentsInterpreter(messageCollector);
|
||||
StartupArgumentsInterpreter interpreter = new(messageCollector);
|
||||
interpreter.ParseArguments(Environment.GetCommandLineArgs());
|
||||
}
|
||||
|
||||
public void CreateConnectionsProvider(MessageCollector messageCollector)
|
||||
{
|
||||
messageCollector.AddMessage(MessageClass.DebugMsg, "Determining if we need a database syncronizer");
|
||||
if (!Settings.Default.UseSQLServer) return;
|
||||
if (!Properties.OptionsDBsPage.Default.UseSQLServer) return;
|
||||
messageCollector.AddMessage(MessageClass.DebugMsg, "Creating database syncronizer");
|
||||
Runtime.ConnectionsService.RemoteConnectionsSyncronizer =
|
||||
new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker());
|
||||
Runtime.ConnectionsService.RemoteConnectionsSyncronizer = new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker());
|
||||
Runtime.ConnectionsService.RemoteConnectionsSyncronizer.Enable();
|
||||
}
|
||||
|
||||
@@ -77,13 +75,8 @@ namespace mRemoteNG.App
|
||||
return;
|
||||
}
|
||||
|
||||
var nextUpdateCheck =
|
||||
Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add(
|
||||
TimeSpan
|
||||
.FromDays(Convert.ToDouble(Settings
|
||||
.Default
|
||||
.CheckForUpdatesFrequencyDays))));
|
||||
if (!Settings.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck)
|
||||
DateTime nextUpdateCheck = Convert.ToDateTime(Properties.OptionsUpdatesPage.Default.CheckForUpdatesLastCheck.Add(TimeSpan.FromDays(Convert.ToDouble(Properties.OptionsUpdatesPage.Default.CheckForUpdatesFrequencyDays))));
|
||||
if (!Properties.OptionsUpdatesPage.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Properties;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
[Serializable]
|
||||
public sealed class SupportedCultures : Dictionary<string, string>
|
||||
{
|
||||
@@ -22,11 +24,11 @@ namespace mRemoteNG.App
|
||||
|
||||
private SupportedCultures()
|
||||
{
|
||||
foreach (var CultureName in Settings.Default.SupportedUICultures.Split(','))
|
||||
foreach (string CultureName in Properties.AppUI.Default.SupportedUICultures.Split(','))
|
||||
{
|
||||
try
|
||||
{
|
||||
var CultureInfo = new CultureInfo(CultureName.Trim());
|
||||
CultureInfo CultureInfo = new(CultureName.Trim());
|
||||
Add(CultureInfo.Name, CultureInfo.TextInfo.ToTitleCase(CultureInfo.NativeName));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -55,13 +57,13 @@ namespace mRemoteNG.App
|
||||
|
||||
public static string get_CultureName(string CultureNativeName)
|
||||
{
|
||||
var Names = new string[SingletonInstance.Count + 1];
|
||||
var NativeNames = new string[SingletonInstance.Count + 1];
|
||||
string[] Names = new string[SingletonInstance.Count + 1];
|
||||
string[] NativeNames = new string[SingletonInstance.Count + 1];
|
||||
|
||||
SingletonInstance.Keys.CopyTo(Names, 0);
|
||||
SingletonInstance.Values.CopyTo(NativeNames, 0);
|
||||
|
||||
for (var Index = 0; Index <= SingletonInstance.Count; Index++)
|
||||
for (int Index = 0; Index <= SingletonInstance.Count; Index++)
|
||||
{
|
||||
if (NativeNames[Index] == CultureNativeName)
|
||||
{
|
||||
@@ -81,8 +83,8 @@ namespace mRemoteNG.App
|
||||
{
|
||||
get
|
||||
{
|
||||
var ValueList = new List<string>();
|
||||
foreach (var Value in SingletonInstance.Values)
|
||||
List<string> ValueList = new();
|
||||
foreach (string Value in SingletonInstance.Values)
|
||||
{
|
||||
ValueList.Add(Value);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using mRemoteNG.Security.SymmetricEncryption;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
using mRemoteNG.Properties;
|
||||
using System.Runtime.Versioning;
|
||||
#if !PORTABLE
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
@@ -19,6 +20,7 @@ using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.App.Update
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class AppUpdater
|
||||
{
|
||||
private const int _bufferLength = 8192;
|
||||
@@ -58,23 +60,18 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
private void SetDefaultProxySettings()
|
||||
{
|
||||
var shouldWeUseProxy = Settings.Default.UpdateUseProxy;
|
||||
var proxyAddress = Settings.Default.UpdateProxyAddress;
|
||||
var port = Settings.Default.UpdateProxyPort;
|
||||
var useAuthentication = Settings.Default.UpdateProxyUseAuthentication;
|
||||
var username = Settings.Default.UpdateProxyAuthUser;
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var password = cryptographyProvider.Decrypt(Settings.Default.UpdateProxyAuthPass, Runtime.EncryptionKey);
|
||||
bool shouldWeUseProxy = Properties.OptionsUpdatesPage.Default.UpdateUseProxy;
|
||||
string proxyAddress = Properties.OptionsUpdatesPage.Default.UpdateProxyAddress;
|
||||
int port = Properties.OptionsUpdatesPage.Default.UpdateProxyPort;
|
||||
bool useAuthentication = Properties.OptionsUpdatesPage.Default.UpdateProxyUseAuthentication;
|
||||
string username = Properties.OptionsUpdatesPage.Default.UpdateProxyAuthUser;
|
||||
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
||||
string password = cryptographyProvider.Decrypt(Properties.OptionsUpdatesPage.Default.UpdateProxyAuthPass, Runtime.EncryptionKey);
|
||||
|
||||
SetProxySettings(shouldWeUseProxy, proxyAddress, port, useAuthentication, username, password);
|
||||
}
|
||||
|
||||
public void SetProxySettings(bool useProxy,
|
||||
string address,
|
||||
int port,
|
||||
bool useAuthentication,
|
||||
string username,
|
||||
string password)
|
||||
public void SetProxySettings(bool useProxy, string address, int port, bool useAuthentication, string username, string password)
|
||||
{
|
||||
if (useProxy && !string.IsNullOrEmpty(address))
|
||||
{
|
||||
@@ -135,37 +132,37 @@ namespace mRemoteNG.App.Update
|
||||
try
|
||||
{
|
||||
_getUpdateInfoCancelToken = new CancellationTokenSource();
|
||||
using var response = await _httpClient.GetAsync(CurrentUpdateInfo.DownloadAddress, HttpCompletionOption.ResponseHeadersRead, _getUpdateInfoCancelToken.Token);
|
||||
var buffer = new byte[_bufferLength];
|
||||
var totalBytes = response.Content.Headers.ContentLength ?? 0;
|
||||
var readBytes = 0L;
|
||||
using HttpResponseMessage response = await _httpClient.GetAsync(CurrentUpdateInfo.DownloadAddress, HttpCompletionOption.ResponseHeadersRead, _getUpdateInfoCancelToken.Token);
|
||||
byte[] buffer = new byte[_bufferLength];
|
||||
long totalBytes = response.Content.Headers.ContentLength ?? 0;
|
||||
long readBytes = 0L;
|
||||
|
||||
await using (var httpStream = await response.Content.ReadAsStreamAsync(_getUpdateInfoCancelToken.Token))
|
||||
await using (Stream httpStream = await response.Content.ReadAsStreamAsync(_getUpdateInfoCancelToken.Token))
|
||||
{
|
||||
await using var fileStream = new FileStream(CurrentUpdateInfo.UpdateFilePath, FileMode.Create,
|
||||
await using FileStream fileStream = new(CurrentUpdateInfo.UpdateFilePath, FileMode.Create,
|
||||
FileAccess.Write, FileShare.None, _bufferLength, true);
|
||||
|
||||
while (readBytes <= totalBytes || !_getUpdateInfoCancelToken.IsCancellationRequested)
|
||||
{
|
||||
var bytesRead =
|
||||
await httpStream.ReadAsync(buffer, 0, _bufferLength, _getUpdateInfoCancelToken.Token);
|
||||
int bytesRead =
|
||||
await httpStream.ReadAsync(buffer.AsMemory(0, _bufferLength), _getUpdateInfoCancelToken.Token);
|
||||
if (bytesRead == 0)
|
||||
{
|
||||
progress.Report(100);
|
||||
break;
|
||||
}
|
||||
|
||||
await fileStream.WriteAsync(buffer, 0, bytesRead, _getUpdateInfoCancelToken.Token);
|
||||
await fileStream.WriteAsync(buffer.AsMemory(0, bytesRead), _getUpdateInfoCancelToken.Token);
|
||||
|
||||
readBytes += bytesRead;
|
||||
|
||||
var percentComplete = (int)(readBytes * 100 / totalBytes);
|
||||
int percentComplete = (int)(readBytes * 100 / totalBytes);
|
||||
progress.Report(percentComplete);
|
||||
}
|
||||
}
|
||||
|
||||
#if !PORTABLE
|
||||
var updateAuthenticode = new Authenticode(CurrentUpdateInfo.UpdateFilePath)
|
||||
Authenticode updateAuthenticode = new(CurrentUpdateInfo.UpdateFilePath)
|
||||
{
|
||||
RequireThumbprintMatch = true,
|
||||
ThumbprintToMatch = CurrentUpdateInfo.CertificateThumbprint
|
||||
@@ -182,10 +179,10 @@ namespace mRemoteNG.App.Update
|
||||
}
|
||||
#endif
|
||||
|
||||
using var checksum = SHA512.Create();
|
||||
await using var stream = File.OpenRead(CurrentUpdateInfo.UpdateFilePath);
|
||||
var hash = await checksum.ComputeHashAsync(stream);
|
||||
var hashString = BitConverter.ToString(hash).Replace("-", "").ToUpperInvariant();
|
||||
using SHA512 checksum = SHA512.Create();
|
||||
await using FileStream stream = File.OpenRead(CurrentUpdateInfo.UpdateFilePath);
|
||||
byte[] hash = await checksum.ComputeHashAsync(stream);
|
||||
string hashString = BitConverter.ToString(hash).Replace("-", "").ToUpperInvariant();
|
||||
if (!hashString.Equals(CurrentUpdateInfo.Checksum))
|
||||
throw new Exception("SHA512 Hashes didn't match!");
|
||||
} finally{
|
||||
@@ -205,7 +202,7 @@ namespace mRemoteNG.App.Update
|
||||
_httpClient.Dispose();
|
||||
}
|
||||
|
||||
var httpClientHandler = new HttpClientHandler();
|
||||
HttpClientHandler httpClientHandler = new();
|
||||
if (_webProxy != null)
|
||||
{
|
||||
httpClientHandler.UseProxy = true;
|
||||
@@ -227,13 +224,13 @@ namespace mRemoteNG.App.Update
|
||||
try
|
||||
{
|
||||
_getUpdateInfoCancelToken = new CancellationTokenSource();
|
||||
var updateInfo = await _httpClient.GetStringAsync(UpdateChannelInfo.GetUpdateChannelInfo(), _getUpdateInfoCancelToken.Token);
|
||||
string updateInfo = await _httpClient.GetStringAsync(UpdateChannelInfo.GetUpdateChannelInfo(), _getUpdateInfoCancelToken.Token);
|
||||
CurrentUpdateInfo = UpdateInfo.FromString(updateInfo);
|
||||
Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
|
||||
Properties.OptionsUpdatesPage.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
|
||||
|
||||
if (!Settings.Default.UpdatePending)
|
||||
if (!Properties.OptionsUpdatesPage.Default.UpdatePending)
|
||||
{
|
||||
Settings.Default.UpdatePending = IsUpdateAvailable();
|
||||
Properties.OptionsUpdatesPage.Default.UpdatePending = IsUpdateAvailable();
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -34,19 +34,19 @@ namespace mRemoteNG.App.Update
|
||||
// no separators means no valid update data...
|
||||
if (content.Trim().IndexOfAny(keyValueSeparators) == -1) return;
|
||||
|
||||
using (var sr = new StringReader(content))
|
||||
using (StringReader sr = new(content))
|
||||
{
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
var trimmedLine = line.Trim();
|
||||
string trimmedLine = line.Trim();
|
||||
if (trimmedLine.Length == 0)
|
||||
continue;
|
||||
|
||||
if (trimmedLine.Substring(0, 1).IndexOfAny(commentCharacters) != -1)
|
||||
continue;
|
||||
|
||||
var parts = trimmedLine.Split(keyValueSeparators, 2);
|
||||
string[] parts = trimmedLine.Split(keyValueSeparators, 2);
|
||||
if (parts.Length != 2)
|
||||
continue;
|
||||
|
||||
@@ -68,13 +68,13 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
public Version GetVersion(string key = "Version")
|
||||
{
|
||||
var value = GetString(key);
|
||||
string value = GetString(key);
|
||||
return string.IsNullOrEmpty(value) ? null : new Version(value);
|
||||
}
|
||||
|
||||
public Uri GetUri(string key)
|
||||
{
|
||||
var value = GetString(key);
|
||||
string value = GetString(key);
|
||||
return string.IsNullOrEmpty(value) ? null : new Uri(value);
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
public string GetFileName()
|
||||
{
|
||||
var value = GetString("dURL");
|
||||
var sv = value.Split('/');
|
||||
string value = GetString("dURL");
|
||||
string[] sv = value.Split('/');
|
||||
return sv[sv.Length - 1];
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
public static UpdateInfo FromString(string input)
|
||||
{
|
||||
var newInfo = new UpdateInfo();
|
||||
UpdateInfo newInfo = new();
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
newInfo.IsValid = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var updateFile = new UpdateFile(input);
|
||||
UpdateFile updateFile = new(input);
|
||||
newInfo.Version = updateFile.GetVersion();
|
||||
newInfo.DownloadAddress = updateFile.GetUri("dURL");
|
||||
newInfo.ChangeLogAddress = updateFile.GetUri("clURL");
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
using System;
|
||||
#region Usings
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using mRemoteNG.UI;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Window;
|
||||
#endregion
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class Windows
|
||||
{
|
||||
private static ActiveDirectoryImportWindow _adimportForm;
|
||||
@@ -29,7 +34,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
try
|
||||
{
|
||||
var dockPanel = FrmMain.Default.pnlDock;
|
||||
WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel = FrmMain.Default.pnlDock;
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (windowType)
|
||||
{
|
||||
@@ -39,11 +44,8 @@ namespace mRemoteNG.App
|
||||
_adimportForm.Show(dockPanel);
|
||||
break;
|
||||
case WindowType.Options:
|
||||
using (var optionsForm = new FrmOptions())
|
||||
{
|
||||
optionsForm.ShowDialog(dockPanel);
|
||||
}
|
||||
|
||||
FrmMain.OptionsForm.SetActivatedPage(Language.StartupExit);
|
||||
FrmMain.OptionsForm.Visible = true;
|
||||
break;
|
||||
case WindowType.SSHTransfer:
|
||||
if (SshtransferForm == null || SshtransferForm.IsDisposed)
|
||||
|
||||
9
mRemoteNG/Config/ACLPermissions.cs
Normal file
9
mRemoteNG/Config/ACLPermissions.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace mRemoteNG.Config.ACL
|
||||
{
|
||||
public enum ACLPermissions
|
||||
{
|
||||
Hidden = 0,
|
||||
ReadOnly = 1,
|
||||
WriteAllow = 2
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv;
|
||||
@@ -7,6 +8,7 @@ using mRemoteNG.Tree;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class CsvConnectionsSaver : ISaver<ConnectionTreeModel>
|
||||
{
|
||||
private readonly string _connectionFileName;
|
||||
@@ -25,10 +27,10 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "")
|
||||
{
|
||||
var csvConnectionsSerializer =
|
||||
new CsvConnectionsSerializerMremotengFormat(_saveFilter, Runtime.CredentialProviderCatalog);
|
||||
var dataProvider = new FileDataProvider(_connectionFileName);
|
||||
var csvContent = csvConnectionsSerializer.Serialize(connectionTreeModel);
|
||||
CsvConnectionsSerializerMremotengFormat csvConnectionsSerializer =
|
||||
new(_saveFilter, Runtime.CredentialProviderCatalog);
|
||||
FileDataProvider dataProvider = new(_connectionFileName);
|
||||
string csvContent = csvConnectionsSerializer.Serialize(connectionTreeModel);
|
||||
dataProvider.Save(csvContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using mRemoteNG.App;
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Timers;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.Config.Connections.Multiuser
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RemoteConnectionsSyncronizer : IConnectionsUpdateChecker
|
||||
{
|
||||
private readonly System.Timers.Timer _updateTimer;
|
||||
@@ -27,8 +29,7 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
{
|
||||
_updateChecker.UpdateCheckStarted += OnUpdateCheckStarted;
|
||||
_updateChecker.UpdateCheckFinished += OnUpdateCheckFinished;
|
||||
_updateChecker.ConnectionsUpdateAvailable +=
|
||||
(sender, args) => ConnectionsUpdateAvailable?.Invoke(sender, args);
|
||||
_updateChecker.ConnectionsUpdateAvailable += (sender, args) => ConnectionsUpdateAvailable?.Invoke(sender, args);
|
||||
_updateTimer.Elapsed += (sender, args) => _updateChecker.IsUpdateAvailableAsync();
|
||||
ConnectionsUpdateAvailable += Load;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Config.Connections.Multiuser
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker
|
||||
{
|
||||
private readonly IDatabaseConnector _dbConnector;
|
||||
@@ -27,7 +29,7 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
{
|
||||
RaiseUpdateCheckStartedEvent();
|
||||
ConnectToSqlDb();
|
||||
var updateIsAvailable = DatabaseIsMoreUpToDateThanUs();
|
||||
bool updateIsAvailable = DatabaseIsMoreUpToDateThanUs();
|
||||
if (updateIsAvailable)
|
||||
RaiseConnectionsUpdateAvailableEvent();
|
||||
RaiseUpdateCheckFinishedEvent(updateIsAvailable);
|
||||
@@ -36,7 +38,7 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
|
||||
public void IsUpdateAvailableAsync()
|
||||
{
|
||||
var thread = new Thread(() => IsUpdateAvailable());
|
||||
Thread thread = new(() => IsUpdateAvailable());
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
}
|
||||
@@ -49,46 +51,44 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg,
|
||||
"Unable to connect to Sql DB to check for updates." +
|
||||
Environment.NewLine + e.Message, true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"Unable to connect to SQL DB to check for updates.{Environment.NewLine}{e.Message}", true);
|
||||
}
|
||||
}
|
||||
|
||||
private bool DatabaseIsMoreUpToDateThanUs()
|
||||
{
|
||||
var lastUpdateInDb = GetLastUpdateTimeFromDbResponse();
|
||||
var amTheLastoneUpdated = CheckIfIAmTheLastOneUpdated(lastUpdateInDb);
|
||||
DateTime lastUpdateInDb = GetLastUpdateTimeFromDbResponse();
|
||||
bool amTheLastoneUpdated = CheckIfIAmTheLastOneUpdated(lastUpdateInDb);
|
||||
return (lastUpdateInDb > LastUpdateTime && !amTheLastoneUpdated);
|
||||
}
|
||||
|
||||
private bool CheckIfIAmTheLastOneUpdated(DateTime lastUpdateInDb)
|
||||
{
|
||||
DateTime lastSqlUpdateWithoutMilliseconds =
|
||||
new DateTime(LastUpdateTime.Ticks - (LastUpdateTime.Ticks % TimeSpan.TicksPerSecond),
|
||||
LastUpdateTime.Kind);
|
||||
DateTime lastSqlUpdateWithoutMilliseconds = new(LastUpdateTime.Ticks - (LastUpdateTime.Ticks % TimeSpan.TicksPerSecond), LastUpdateTime.Kind);
|
||||
return lastUpdateInDb == lastSqlUpdateWithoutMilliseconds;
|
||||
}
|
||||
|
||||
private DateTime GetLastUpdateTimeFromDbResponse()
|
||||
{
|
||||
var lastUpdateInDb = default(DateTime);
|
||||
DateTime lastUpdateInDb = default(DateTime);
|
||||
|
||||
try
|
||||
{
|
||||
var sqlReader = _dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
DbDataReader sqlReader = _dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
sqlReader.Read();
|
||||
if (sqlReader.HasRows)
|
||||
{
|
||||
lastUpdateInDb = Convert.ToDateTime(sqlReader["LastUpdate"]);
|
||||
}
|
||||
sqlReader.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg,
|
||||
"Error executing Sql query to get updates from the DB." +
|
||||
Environment.NewLine + ex.Message, true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "Error executing SQL query to get updates from the DB." + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
|
||||
_lastDatabaseUpdateTime = lastUpdateInDb;
|
||||
|
||||
return lastUpdateInDb;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
|
||||
private void RaiseUpdateCheckFinishedEvent(bool updateAvailable)
|
||||
{
|
||||
var args = new ConnectionsUpdateCheckFinishedEventArgs {UpdateAvailable = updateAvailable};
|
||||
ConnectionsUpdateCheckFinishedEventArgs args = new() { UpdateAvailable = updateAvailable};
|
||||
UpdateCheckFinished?.Invoke(this, args);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace mRemoteNG.Config.Connections.Multiuser
|
||||
private void RaiseConnectionsUpdateAvailableEvent()
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Remote connection update is available");
|
||||
var args = new ConnectionsUpdateAvailableEventArgs(_dbConnector, _lastDatabaseUpdateTime);
|
||||
ConnectionsUpdateAvailableEventArgs args = new(_dbConnector, _lastDatabaseUpdateTime);
|
||||
ConnectionsUpdateAvailable?.Invoke(this, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ using System.ComponentModel;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.Properties;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SaveConnectionsOnEdit
|
||||
{
|
||||
private readonly ConnectionsService _connectionsService;
|
||||
@@ -20,29 +22,24 @@ namespace mRemoteNG.Config.Connections
|
||||
connectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded;
|
||||
}
|
||||
|
||||
private void ConnectionsServiceOnConnectionsLoaded(object sender,
|
||||
ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
|
||||
private void ConnectionsServiceOnConnectionsLoaded(object sender, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
|
||||
{
|
||||
connectionsLoadedEventArgs.NewConnectionTreeModel.CollectionChanged +=
|
||||
ConnectionTreeModelOnCollectionChanged;
|
||||
connectionsLoadedEventArgs.NewConnectionTreeModel.CollectionChanged += ConnectionTreeModelOnCollectionChanged;
|
||||
connectionsLoadedEventArgs.NewConnectionTreeModel.PropertyChanged += ConnectionTreeModelOnPropertyChanged;
|
||||
|
||||
foreach (var oldTree in connectionsLoadedEventArgs.PreviousConnectionTreeModel)
|
||||
foreach (Tree.ConnectionTreeModel oldTree in connectionsLoadedEventArgs.PreviousConnectionTreeModel)
|
||||
{
|
||||
oldTree.CollectionChanged -= ConnectionTreeModelOnCollectionChanged;
|
||||
oldTree.PropertyChanged -= ConnectionTreeModelOnPropertyChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void ConnectionTreeModelOnPropertyChanged(object sender,
|
||||
PropertyChangedEventArgs propertyChangedEventArgs)
|
||||
private void ConnectionTreeModelOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
|
||||
{
|
||||
SaveConnectionOnEdit(propertyChangedEventArgs.PropertyName);
|
||||
}
|
||||
|
||||
private void ConnectionTreeModelOnCollectionChanged(object sender,
|
||||
NotifyCollectionChangedEventArgs
|
||||
notifyCollectionChangedEventArgs)
|
||||
private void ConnectionTreeModelOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
|
||||
{
|
||||
SaveConnectionOnEdit();
|
||||
}
|
||||
@@ -50,7 +47,7 @@ namespace mRemoteNG.Config.Connections
|
||||
private void SaveConnectionOnEdit(string propertyName = "")
|
||||
{
|
||||
//OBSOLETE: mRemoteNG.Settings.Default.SaveConnectionsAfterEveryEdit is obsolete and should be removed in a future release
|
||||
if (mRemoteNG.Properties.Settings.Default.SaveConnectionsAfterEveryEdit || (mRemoteNG.Properties.Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnEdit))
|
||||
if (Properties.OptionsBackupPage.Default.SaveConnectionsAfterEveryEdit || (Properties.OptionsBackupPage.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnEdit))
|
||||
{
|
||||
if (FrmMain.Default.IsClosing)
|
||||
return;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Sql;
|
||||
using mRemoteNG.Config.Serializers.Versioning;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Security;
|
||||
@@ -17,66 +18,58 @@ using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SqlConnectionsLoader : IConnectionsLoader
|
||||
{
|
||||
private readonly IDeserializer<string, IEnumerable<LocalConnectionPropertiesModel>>
|
||||
_localConnectionPropertiesDeserializer;
|
||||
private readonly IDeserializer<string, IEnumerable<LocalConnectionPropertiesModel>> _localConnectionPropertiesDeserializer;
|
||||
|
||||
private readonly IDataProvider<string> _dataProvider;
|
||||
|
||||
public Func<Optional<SecureString>> AuthenticationRequestor { get; set; } =
|
||||
() => MiscTools.PasswordDialog("", false);
|
||||
private Func<Optional<SecureString>> AuthenticationRequestor { get; set; } = () => MiscTools.PasswordDialog("", false);
|
||||
|
||||
public SqlConnectionsLoader(
|
||||
IDeserializer<string, IEnumerable<LocalConnectionPropertiesModel>> localConnectionPropertiesDeserializer,
|
||||
IDataProvider<string> dataProvider)
|
||||
{
|
||||
_localConnectionPropertiesDeserializer =
|
||||
localConnectionPropertiesDeserializer.ThrowIfNull(nameof(localConnectionPropertiesDeserializer));
|
||||
_localConnectionPropertiesDeserializer = localConnectionPropertiesDeserializer.ThrowIfNull(nameof(localConnectionPropertiesDeserializer));
|
||||
_dataProvider = dataProvider.ThrowIfNull(nameof(dataProvider));
|
||||
}
|
||||
|
||||
public ConnectionTreeModel Load()
|
||||
{
|
||||
var connector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
|
||||
var dataProvider = new SqlDataProvider(connector);
|
||||
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
|
||||
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(connector);
|
||||
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
|
||||
|
||||
var metaData = metaDataRetriever.GetDatabaseMetaData(connector) ??
|
||||
HandleFirstRun(metaDataRetriever, connector);
|
||||
var decryptionKey = GetDecryptionKey(metaData);
|
||||
IDatabaseConnector connector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
|
||||
SqlDataProvider dataProvider = new(connector);
|
||||
SqlDatabaseMetaDataRetriever metaDataRetriever = new();
|
||||
SqlDatabaseVersionVerifier databaseVersionVerifier = new(connector);
|
||||
LegacyRijndaelCryptographyProvider cryptoProvider = new();
|
||||
SqlConnectionListMetaData metaData = metaDataRetriever.GetDatabaseMetaData(connector) ?? HandleFirstRun(metaDataRetriever, connector);
|
||||
Optional<SecureString> decryptionKey = GetDecryptionKey(metaData);
|
||||
|
||||
if (!decryptionKey.Any())
|
||||
throw new Exception("Could not load SQL connections");
|
||||
|
||||
databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion);
|
||||
var dataTable = dataProvider.Load();
|
||||
var deserializer = new DataTableDeserializer(cryptoProvider, decryptionKey.First());
|
||||
var connectionTree = deserializer.Deserialize(dataTable);
|
||||
System.Data.DataTable dataTable = dataProvider.Load();
|
||||
DataTableDeserializer deserializer = new(cryptoProvider, decryptionKey.First());
|
||||
ConnectionTreeModel connectionTree = deserializer.Deserialize(dataTable);
|
||||
ApplyLocalConnectionProperties(connectionTree.RootNodes.First(i => i is RootNodeInfo));
|
||||
return connectionTree;
|
||||
}
|
||||
|
||||
private Optional<SecureString> GetDecryptionKey(SqlConnectionListMetaData metaData)
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var cipherText = metaData.Protected;
|
||||
var authenticator = new PasswordAuthenticator(cryptographyProvider, cipherText, AuthenticationRequestor);
|
||||
var authenticated =
|
||||
authenticator.Authenticate(new RootNodeInfo(RootNodeType.Connection).DefaultPassword
|
||||
.ConvertToSecureString());
|
||||
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
||||
string cipherText = metaData.Protected;
|
||||
PasswordAuthenticator authenticator = new(cryptographyProvider, cipherText, AuthenticationRequestor);
|
||||
bool authenticated = authenticator.Authenticate(new RootNodeInfo(RootNodeType.Connection).DefaultPassword.ConvertToSecureString());
|
||||
|
||||
if (authenticated)
|
||||
return authenticator.LastAuthenticatedPassword;
|
||||
return Optional<SecureString>.Empty;
|
||||
return authenticated ? authenticator.LastAuthenticatedPassword : Optional<SecureString>.Empty;
|
||||
}
|
||||
|
||||
private void ApplyLocalConnectionProperties(ContainerInfo rootNode)
|
||||
{
|
||||
var localPropertiesXml = _dataProvider.Load();
|
||||
var localConnectionProperties = _localConnectionPropertiesDeserializer.Deserialize(localPropertiesXml);
|
||||
string localPropertiesXml = _dataProvider.Load();
|
||||
IEnumerable<LocalConnectionPropertiesModel> localConnectionProperties = _localConnectionPropertiesDeserializer.Deserialize(localPropertiesXml);
|
||||
|
||||
rootNode
|
||||
.GetRecursiveChildList()
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql;
|
||||
using mRemoteNG.Config.Serializers.Versioning;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
@@ -18,58 +17,53 @@ using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Sql;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
public class SqlConnectionsSaver : ISaver<ConnectionTreeModel>
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SqlConnectionsSaver : ISaver<ConnectionTreeModel>
|
||||
{
|
||||
private readonly SaveFilter _saveFilter;
|
||||
private readonly ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string> _localPropertiesSerializer;
|
||||
private readonly IDataProvider<string> _dataProvider;
|
||||
|
||||
public SqlConnectionsSaver(SaveFilter saveFilter,
|
||||
ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string>
|
||||
localPropertieSerializer,
|
||||
IDataProvider<string> localPropertiesDataProvider)
|
||||
public SqlConnectionsSaver(SaveFilter saveFilter, ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string> localPropertieSerializer, IDataProvider<string> localPropertiesDataProvider)
|
||||
{
|
||||
if (saveFilter == null)
|
||||
throw new ArgumentNullException(nameof(saveFilter));
|
||||
_saveFilter = saveFilter;
|
||||
_saveFilter = saveFilter ?? throw new ArgumentNullException(nameof(saveFilter));
|
||||
_localPropertiesSerializer = localPropertieSerializer.ThrowIfNull(nameof(localPropertieSerializer));
|
||||
_dataProvider = localPropertiesDataProvider.ThrowIfNull(nameof(localPropertiesDataProvider));
|
||||
}
|
||||
|
||||
public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "")
|
||||
{
|
||||
var rootTreeNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
|
||||
RootNodeInfo rootTreeNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
|
||||
|
||||
UpdateLocalConnectionProperties(rootTreeNode);
|
||||
|
||||
if (PropertyIsLocalOnly(propertyNameTrigger))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
|
||||
$"Property {propertyNameTrigger} is local only. Not saving to database.");
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, $"Property {propertyNameTrigger} is local only. Not saving to database.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (SqlUserIsReadOnly())
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
|
||||
"Trying to save connection tree but the SQL read only checkbox is checked, aborting!");
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to save connection tree but the SQL read only checkbox is checked, aborting!");
|
||||
return;
|
||||
}
|
||||
|
||||
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings())
|
||||
using (IDatabaseConnector dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings())
|
||||
{
|
||||
dbConnector.Connect();
|
||||
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(dbConnector);
|
||||
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
|
||||
var metaData = metaDataRetriever.GetDatabaseMetaData(dbConnector);
|
||||
SqlDatabaseVersionVerifier databaseVersionVerifier = new(dbConnector);
|
||||
SqlDatabaseMetaDataRetriever metaDataRetriever = new();
|
||||
SqlConnectionListMetaData metaData = metaDataRetriever.GetDatabaseMetaData(dbConnector);
|
||||
|
||||
if (!databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
|
||||
Language.ErrorConnectionListSaveFailed);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ErrorConnectionListSaveFailed);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +93,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
private void UpdateLocalConnectionProperties(ContainerInfo rootNode)
|
||||
{
|
||||
var a = rootNode.GetRecursiveChildList().Select(info => new LocalConnectionPropertiesModel
|
||||
IEnumerable<LocalConnectionPropertiesModel> a = rootNode.GetRecursiveChildList().Select(info => new LocalConnectionPropertiesModel
|
||||
{
|
||||
ConnectionId = info.ConstantID,
|
||||
Connected = info.OpenConnections.Count > 0,
|
||||
@@ -107,20 +101,21 @@ namespace mRemoteNG.Config.Connections
|
||||
Favorite = info.Favorite,
|
||||
});
|
||||
|
||||
var serializedProperties = _localPropertiesSerializer.Serialize(a);
|
||||
string serializedProperties = _localPropertiesSerializer.Serialize(a);
|
||||
_dataProvider.Save(serializedProperties);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved local connection properties");
|
||||
}
|
||||
|
||||
private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
// TODO: use transaction, but method not used at all?
|
||||
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
||||
string strProtected;
|
||||
if (rootTreeNode != null)
|
||||
{
|
||||
if (rootTreeNode.Password)
|
||||
{
|
||||
var password = rootTreeNode.PasswordString.ConvertToSecureString();
|
||||
System.Security.SecureString password = rootTreeNode.PasswordString.ConvertToSecureString();
|
||||
strProtected = cryptographyProvider.Encrypt("ThisIsProtected", password);
|
||||
}
|
||||
else
|
||||
@@ -133,7 +128,7 @@ namespace mRemoteNG.Config.Connections
|
||||
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
|
||||
}
|
||||
|
||||
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblRoot");
|
||||
System.Data.Common.DbCommand dbQuery = databaseConnector.DbCommand("TRUNCATE TABLE tblRoot");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
|
||||
if (rootTreeNode != null)
|
||||
@@ -142,43 +137,41 @@ namespace mRemoteNG.Config.Connections
|
||||
databaseConnector.DbCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')");
|
||||
ConnectionsFileInfo.ConnectionFileVersion + "')");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
|
||||
$"UpdateRootNodeTable: rootTreeNode was null. Could not insert!");
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, $"UpdateRootNodeTable: rootTreeNode was null. Could not insert!");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var dataProvider = new SqlDataProvider(databaseConnector);
|
||||
var currentDataTable = dataProvider.Load();
|
||||
SqlDataProvider dataProvider = new(databaseConnector);
|
||||
DataTable currentDataTable = dataProvider.Load();
|
||||
|
||||
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var serializer = new DataTableSerializer(_saveFilter, cryptoProvider,
|
||||
rootTreeNode.PasswordString.ConvertToSecureString());
|
||||
LegacyRijndaelCryptographyProvider cryptoProvider = new();
|
||||
DataTableSerializer serializer = new(_saveFilter, cryptoProvider, rootTreeNode.PasswordString.ConvertToSecureString());
|
||||
serializer.SetSourceDataTable(currentDataTable);
|
||||
var dataTable = serializer.Serialize(rootTreeNode);
|
||||
//var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons");
|
||||
//dbQuery.ExecuteNonQuery();
|
||||
|
||||
DataTable dataTable = serializer.Serialize(rootTreeNode);
|
||||
|
||||
dataProvider.Save(dataTable);
|
||||
}
|
||||
|
||||
private void UpdateUpdatesTable(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblUpdate");
|
||||
// TODO: use transaction
|
||||
System.Data.Common.DbCommand dbQuery = databaseConnector.DbCommand("TRUNCATE TABLE tblUpdate");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES('" + MiscTools.DBDate(DateTime.Now) + "')");
|
||||
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES('" + MiscTools.DBDate(DateTime.Now.ToUniversalTime()) + "')");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
private bool SqlUserIsReadOnly()
|
||||
{
|
||||
return Properties.Settings.Default.SQLReadOnly;
|
||||
return Properties.OptionsDBsPage.Default.SQLReadOnly;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,11 @@ using System;
|
||||
using System.IO;
|
||||
using System.Security;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class XmlConnectionsLoader : IConnectionsLoader
|
||||
{
|
||||
private readonly string _connectionFilePath;
|
||||
@@ -25,15 +27,15 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
public ConnectionTreeModel Load()
|
||||
{
|
||||
var dataProvider = new FileDataProvider(_connectionFilePath);
|
||||
var xmlString = dataProvider.Load();
|
||||
var deserializer = new XmlConnectionsDeserializer(PromptForPassword);
|
||||
FileDataProvider dataProvider = new(_connectionFilePath);
|
||||
string xmlString = dataProvider.Load();
|
||||
XmlConnectionsDeserializer deserializer = new(PromptForPassword);
|
||||
return deserializer.Deserialize(xmlString);
|
||||
}
|
||||
|
||||
private Optional<SecureString> PromptForPassword()
|
||||
{
|
||||
var password = MiscTools.PasswordDialog(Path.GetFileName(_connectionFilePath), false);
|
||||
Optional<SecureString> password = MiscTools.PasswordDialog(Path.GetFileName(_connectionFilePath), false);
|
||||
return password;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,12 @@ using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.Factories;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Properties;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class XmlConnectionsSaver : ISaver<ConnectionTreeModel>
|
||||
{
|
||||
private readonly string _connectionFileName;
|
||||
@@ -19,30 +22,23 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
if (string.IsNullOrEmpty(connectionFileName))
|
||||
throw new ArgumentException($"Argument '{nameof(connectionFileName)}' cannot be null or empty");
|
||||
if (saveFilter == null)
|
||||
throw new ArgumentNullException(nameof(saveFilter));
|
||||
|
||||
_connectionFileName = connectionFileName;
|
||||
_saveFilter = saveFilter;
|
||||
_saveFilter = saveFilter ?? throw new ArgumentNullException(nameof(saveFilter));
|
||||
}
|
||||
|
||||
public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
|
||||
var serializerFactory = new XmlConnectionSerializerFactory();
|
||||
|
||||
var xmlConnectionsSerializer = serializerFactory.Build(
|
||||
cryptographyProvider,
|
||||
connectionTreeModel,
|
||||
_saveFilter,
|
||||
Properties.Settings.Default.EncryptCompleteConnectionsFile);
|
||||
ICryptographyProvider cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
|
||||
XmlConnectionSerializerFactory serializerFactory = new();
|
||||
|
||||
var rootNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
|
||||
var xml = xmlConnectionsSerializer.Serialize(rootNode);
|
||||
Serializers.ISerializer<Connection.ConnectionInfo, string> xmlConnectionsSerializer = serializerFactory.Build(cryptographyProvider, connectionTreeModel, _saveFilter, Properties.OptionsSecurityPage.Default.EncryptCompleteConnectionsFile);
|
||||
|
||||
var fileDataProvider = new FileDataProviderWithRollingBackup(_connectionFileName);
|
||||
RootNodeInfo rootNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
|
||||
string xml = xmlConnectionsSerializer.Serialize(rootNode);
|
||||
|
||||
FileDataProviderWithRollingBackup fileDataProvider = new(_connectionFileName);
|
||||
fileDataProvider.Save(xml);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security;
|
||||
using System.Xml.Linq;
|
||||
using mRemoteNG.Credential;
|
||||
@@ -9,25 +10,26 @@ using mRemoteNG.Security.Factories;
|
||||
|
||||
namespace mRemoteNG.Config
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class CredentialHarvester
|
||||
{
|
||||
private readonly IEqualityComparer<ICredentialRecord> _credentialComparer = new CredentialDomainUserComparer();
|
||||
|
||||
// maps a connectioninfo (by its id) to the credential object that was harvested
|
||||
public Dictionary<Guid, ICredentialRecord> ConnectionToCredentialMap { get; } =
|
||||
new Dictionary<Guid, ICredentialRecord>();
|
||||
[];
|
||||
|
||||
public IEnumerable<ICredentialRecord> Harvest(XDocument xDocument, SecureString decryptionKey)
|
||||
{
|
||||
if (xDocument == null)
|
||||
throw new ArgumentNullException(nameof(xDocument));
|
||||
|
||||
var cryptoProvider = new CryptoProviderFactoryFromXml(xDocument.Root).Build();
|
||||
ICryptographyProvider cryptoProvider = new CryptoProviderFactoryFromXml(xDocument.Root).Build();
|
||||
|
||||
foreach (var element in xDocument.Descendants("Node"))
|
||||
foreach (XElement element in xDocument.Descendants("Node"))
|
||||
{
|
||||
if (!EntryHasSomeCredentialData(element)) continue;
|
||||
var newCredential = BuildCredential(element, cryptoProvider, decryptionKey);
|
||||
ICredentialRecord newCredential = BuildCredential(element, cryptoProvider, decryptionKey);
|
||||
|
||||
Guid connectionId;
|
||||
Guid.TryParse(element.Attribute("Id")?.Value, out connectionId);
|
||||
@@ -38,9 +40,7 @@ namespace mRemoteNG.Config
|
||||
|
||||
if (ConnectionToCredentialMap.Values.Contains(newCredential, _credentialComparer))
|
||||
{
|
||||
var existingCredential =
|
||||
ConnectionToCredentialMap.Values.First(record =>
|
||||
_credentialComparer.Equals(newCredential, record));
|
||||
ICredentialRecord existingCredential = ConnectionToCredentialMap.Values.First(record => _credentialComparer.Equals(newCredential, record));
|
||||
ConnectionToCredentialMap.Add(connectionId, existingCredential);
|
||||
}
|
||||
else
|
||||
@@ -50,17 +50,14 @@ namespace mRemoteNG.Config
|
||||
return ConnectionToCredentialMap.Values.Distinct(_credentialComparer);
|
||||
}
|
||||
|
||||
private ICredentialRecord BuildCredential(XElement element,
|
||||
ICryptographyProvider cryptographyProvider,
|
||||
SecureString decryptionKey)
|
||||
private ICredentialRecord BuildCredential(XElement element, ICryptographyProvider cryptographyProvider, SecureString decryptionKey)
|
||||
{
|
||||
var credential = new CredentialRecord
|
||||
CredentialRecord credential = new()
|
||||
{
|
||||
Title = $"{element.Attribute("Username")?.Value}\\{element.Attribute("Domain")?.Value}",
|
||||
Username = element.Attribute("Username")?.Value,
|
||||
Domain = element.Attribute("Domain")?.Value,
|
||||
Password = cryptographyProvider.Decrypt(element.Attribute("Password")?.Value, decryptionKey)
|
||||
.ConvertToSecureString()
|
||||
Password = cryptographyProvider.Decrypt(element.Attribute("Password")?.Value, decryptionKey).ConvertToSecureString()
|
||||
};
|
||||
return credential;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace mRemoteNG.Config
|
||||
|
||||
public IEnumerable<ICredentialRecord> Load(SecureString key)
|
||||
{
|
||||
var serializedCredentials = _dataProvider.Load();
|
||||
string serializedCredentials = _dataProvider.Load();
|
||||
return _deserializer.Deserialize(serializedCredentials, key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace mRemoteNG.Config
|
||||
private readonly IDataProvider<string> _dataProvider;
|
||||
private readonly ISecureSerializer<IEnumerable<ICredentialRecord>, string> _serializer;
|
||||
|
||||
public CredentialRecordSaver(IDataProvider<string> dataProvider,
|
||||
ISecureSerializer<IEnumerable<ICredentialRecord>, string> serializer)
|
||||
public CredentialRecordSaver(IDataProvider<string> dataProvider, ISecureSerializer<IEnumerable<ICredentialRecord>, string> serializer)
|
||||
{
|
||||
if (dataProvider == null)
|
||||
throw new ArgumentNullException(nameof(dataProvider));
|
||||
@@ -27,7 +26,7 @@ namespace mRemoteNG.Config
|
||||
|
||||
public void Save(IEnumerable<ICredentialRecord> credentialRecords, SecureString key)
|
||||
{
|
||||
var serializedCredentials = _serializer.Serialize(credentialRecords, key);
|
||||
string serializedCredentials = _serializer.Serialize(credentialRecords, key);
|
||||
_dataProvider.Save(serializedCredentials);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers.CredentialProviderSerializer;
|
||||
using mRemoteNG.Credential;
|
||||
@@ -11,8 +12,7 @@ namespace mRemoteNG.Config
|
||||
private readonly IDataProvider<string> _dataProvider;
|
||||
private readonly CredentialRepositoryListDeserializer _deserializer;
|
||||
|
||||
public CredentialRepositoryListLoader(IDataProvider<string> dataProvider,
|
||||
CredentialRepositoryListDeserializer deserializer)
|
||||
public CredentialRepositoryListLoader(IDataProvider<string> dataProvider, CredentialRepositoryListDeserializer deserializer)
|
||||
{
|
||||
if (dataProvider == null)
|
||||
throw new ArgumentNullException(nameof(dataProvider));
|
||||
@@ -23,9 +23,10 @@ namespace mRemoteNG.Config
|
||||
_deserializer = deserializer;
|
||||
}
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public IEnumerable<ICredentialRepository> Load()
|
||||
{
|
||||
var data = _dataProvider.Load();
|
||||
string data = _dataProvider.Load();
|
||||
return _deserializer.Deserialize(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace mRemoteNG.Config
|
||||
|
||||
public void Save(IEnumerable<ICredentialRepository> repositories, string propertyNameTrigger = "")
|
||||
{
|
||||
var serializer = new CredentialRepositoryListSerializer();
|
||||
var data = serializer.Serialize(repositories);
|
||||
CredentialRepositoryListSerializer serializer = new();
|
||||
string data = serializer.Serialize(repositories);
|
||||
_dataProvider.Save(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Resources.Language;
|
||||
@@ -8,6 +9,7 @@ namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
public class FileBackupCreator
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public void CreateBackupFile(string fileName)
|
||||
{
|
||||
try
|
||||
@@ -15,8 +17,8 @@ namespace mRemoteNG.Config.DataProviders
|
||||
if (WeDontNeedToBackup(fileName))
|
||||
return;
|
||||
|
||||
var backupFileName =
|
||||
string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, DateTime.Now);
|
||||
string backupFileName =
|
||||
string.Format(Properties.OptionsBackupPage.Default.BackupFileNameFormat, fileName, DateTime.Now);
|
||||
File.Copy(fileName, backupFileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -39,7 +41,7 @@ namespace mRemoteNG.Config.DataProviders
|
||||
|
||||
private bool FeatureIsTurnedOff()
|
||||
{
|
||||
return Properties.Settings.Default.BackupFileKeepCount == 0;
|
||||
return Properties.OptionsBackupPage.Default.BackupFileKeepCount == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,23 +7,23 @@ namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
public void PruneBackupFiles(string filePath, int maxBackupsToKeep)
|
||||
{
|
||||
var fileName = Path.GetFileName(filePath);
|
||||
var directoryName = Path.GetDirectoryName(filePath);
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
string directoryName = Path.GetDirectoryName(filePath);
|
||||
|
||||
if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(directoryName))
|
||||
return;
|
||||
|
||||
var searchPattern = string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, "*");
|
||||
var files = Directory.GetFiles(directoryName, searchPattern);
|
||||
string searchPattern = string.Format(Properties.OptionsBackupPage.Default.BackupFileNameFormat, fileName, "*");
|
||||
string[] files = Directory.GetFiles(directoryName, searchPattern);
|
||||
|
||||
if (files.Length <= maxBackupsToKeep)
|
||||
return;
|
||||
|
||||
var filesToDelete = files
|
||||
System.Collections.Generic.IEnumerable<string> filesToDelete = files
|
||||
.OrderByDescending(s => s)
|
||||
.Skip(maxBackupsToKeep);
|
||||
|
||||
foreach (var file in filesToDelete)
|
||||
foreach (string file in filesToDelete)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
|
||||
namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class FileDataProvider : IDataProvider<string>
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public FileDataProvider(string filePath)
|
||||
@@ -15,9 +18,14 @@ namespace mRemoteNG.Config.DataProviders
|
||||
|
||||
public virtual string Load()
|
||||
{
|
||||
var fileContents = "";
|
||||
string fileContents = "";
|
||||
try
|
||||
{
|
||||
if (!File.Exists(FilePath))
|
||||
{
|
||||
CreateMissingDirectories();
|
||||
File.WriteAllLines(FilePath, new []{ $@"<?xml version=""1.0"" encoding=""UTF-8""?>", $@"<LocalConnections/>" });
|
||||
}
|
||||
fileContents = File.ReadAllText(FilePath);
|
||||
}
|
||||
catch (FileNotFoundException ex)
|
||||
@@ -62,7 +70,7 @@ namespace mRemoteNG.Config.DataProviders
|
||||
|
||||
private void CreateMissingDirectories()
|
||||
{
|
||||
var dirname = Path.GetDirectoryName(FilePath);
|
||||
string dirname = Path.GetDirectoryName(FilePath);
|
||||
if (dirname == null) return;
|
||||
Directory.CreateDirectory(dirname);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace mRemoteNG.Config.DataProviders
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class FileDataProviderWithRollingBackup : FileDataProvider
|
||||
{
|
||||
private readonly FileBackupCreator _fileBackupCreator;
|
||||
|
||||
@@ -4,9 +4,11 @@ using mRemoteNG.Messages;
|
||||
using mRemoteNG.App;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class SqlDataProvider : IDataProvider<DataTable>
|
||||
{
|
||||
public IDatabaseConnector DatabaseConnector { get; }
|
||||
@@ -18,12 +20,12 @@ namespace mRemoteNG.Config.DataProviders
|
||||
|
||||
public DataTable Load()
|
||||
{
|
||||
var dataTable = new DataTable();
|
||||
var dbQuery = DatabaseConnector.DbCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
|
||||
DataTable dataTable = new();
|
||||
System.Data.Common.DbCommand dbQuery = DatabaseConnector.DbCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
|
||||
DatabaseConnector.AssociateItemToThisConnector(dbQuery);
|
||||
if (!DatabaseConnector.IsConnected)
|
||||
OpenConnection();
|
||||
var dbDataReader = dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
System.Data.Common.DbDataReader dbDataReader = dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
|
||||
if (dbDataReader.HasRows)
|
||||
dataTable.Load(dbDataReader);
|
||||
@@ -35,8 +37,7 @@ namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
if (DbUserIsReadOnly())
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
|
||||
"Trying to save connections but the SQL read only checkbox is checked, aborting!");
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to save connections but the SQL read only checkbox is checked, aborting!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,54 +46,39 @@ namespace mRemoteNG.Config.DataProviders
|
||||
if (DatabaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
|
||||
{
|
||||
SqlConnection sqlConnection = (SqlConnection)DatabaseConnector.DbConnection();
|
||||
using (SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
|
||||
using SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable);
|
||||
using SqlCommand sqlCommand = new();
|
||||
sqlCommand.Connection = sqlConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using SqlDataAdapter dataAdapter = new();
|
||||
dataAdapter.SelectCommand = sqlCommand;
|
||||
|
||||
SqlCommandBuilder builder = new(dataAdapter)
|
||||
{
|
||||
using (SqlCommand sqlCommand = new SqlCommand())
|
||||
{
|
||||
sqlCommand.Connection = sqlConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using (SqlDataAdapter dataAdpater = new SqlDataAdapter())
|
||||
{
|
||||
dataAdpater.SelectCommand = sqlCommand;
|
||||
|
||||
SqlCommandBuilder builder = new SqlCommandBuilder(dataAdpater);
|
||||
// Avoid optimistic concurrency, check if it is necessary.
|
||||
builder.ConflictOption = ConflictOption.OverwriteChanges;
|
||||
|
||||
dataAdpater.UpdateCommand = builder.GetUpdateCommand();
|
||||
|
||||
dataAdpater.DeleteCommand = builder.GetDeleteCommand();
|
||||
dataAdpater.InsertCommand = builder.GetInsertCommand();
|
||||
|
||||
dataAdpater.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
// Avoid optimistic concurrency, check if it is necessary.
|
||||
ConflictOption = ConflictOption.OverwriteChanges
|
||||
};
|
||||
|
||||
dataAdapter.UpdateCommand = builder.GetUpdateCommand();
|
||||
dataAdapter.DeleteCommand = builder.GetDeleteCommand();
|
||||
dataAdapter.InsertCommand = builder.GetInsertCommand();
|
||||
dataAdapter.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
else if (DatabaseConnector.GetType() == typeof(MySqlDatabaseConnector))
|
||||
{
|
||||
var dbConnection = (MySqlConnection) DatabaseConnector.DbConnection();
|
||||
using (MySqlTransaction transaction = dbConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
|
||||
{
|
||||
using (MySqlCommand sqlCommand = new MySqlCommand())
|
||||
{
|
||||
sqlCommand.Connection = dbConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using (MySqlDataAdapter dataAdapter = new MySqlDataAdapter(sqlCommand))
|
||||
{
|
||||
dataAdapter.UpdateBatchSize = 1000;
|
||||
using (MySqlCommandBuilder cb = new MySqlCommandBuilder(dataAdapter))
|
||||
{
|
||||
dataAdapter.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MySqlConnection dbConnection = (MySqlConnection) DatabaseConnector.DbConnection();
|
||||
using MySqlTransaction transaction = dbConnection.BeginTransaction(System.Data.IsolationLevel.Serializable);
|
||||
using MySqlCommand sqlCommand = new();
|
||||
sqlCommand.Connection = dbConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using MySqlDataAdapter dataAdapter = new(sqlCommand);
|
||||
dataAdapter.UpdateBatchSize = 1000;
|
||||
using MySqlCommandBuilder cb = new(dataAdapter);
|
||||
dataAdapter.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +94,7 @@ namespace mRemoteNG.Config.DataProviders
|
||||
|
||||
private bool DbUserIsReadOnly()
|
||||
{
|
||||
return Properties.Settings.Default.SQLReadOnly;
|
||||
return Properties.OptionsDBsPage.Default.SQLReadOnly;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
/// <summary>
|
||||
/// A helper class for testing database connectivity
|
||||
/// </summary>
|
||||
@@ -15,7 +17,7 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
string username,
|
||||
string password)
|
||||
{
|
||||
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnector(type, server, database, username, password))
|
||||
using (IDatabaseConnector dbConnector = DatabaseConnectorFactory.DatabaseConnector(type, server, database, username, password))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public class DatabaseConnectorFactory
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static class DatabaseConnectorFactory
|
||||
{
|
||||
public static IDatabaseConnector DatabaseConnectorFromSettings()
|
||||
{
|
||||
var sqlType = Properties.Settings.Default.SQLServerType;
|
||||
var sqlHost = Properties.Settings.Default.SQLHost;
|
||||
var sqlCatalog = Properties.Settings.Default.SQLDatabaseName;
|
||||
var sqlUsername = Properties.Settings.Default.SQLUser;
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var sqlPassword = cryptographyProvider.Decrypt(Properties.Settings.Default.SQLPass, Runtime.EncryptionKey);
|
||||
// TODO: add custom port handling?
|
||||
string sqlType = Properties.OptionsDBsPage.Default.SQLServerType;
|
||||
string sqlHost = Properties.OptionsDBsPage.Default.SQLHost;
|
||||
string sqlCatalog = Properties.OptionsDBsPage.Default.SQLDatabaseName;
|
||||
string sqlUsername = Properties.OptionsDBsPage.Default.SQLUser;
|
||||
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
||||
string sqlPassword = cryptographyProvider.Decrypt(Properties.OptionsDBsPage.Default.SQLPass, Runtime.EncryptionKey);
|
||||
|
||||
return DatabaseConnector(sqlType, sqlHost, sqlCatalog, sqlUsername, sqlPassword);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
private void BuildDbConnectionStringWithCustomCredentials()
|
||||
{
|
||||
string[] hostParts = _dbHost.Split(new char[] { ':' }, 2);
|
||||
var _dbPort = (hostParts.Length == 2) ? hostParts[1] : "1433";
|
||||
string _dbPort = (hostParts.Length == 2) ? hostParts[1] : "1433";
|
||||
|
||||
_dbConnectionString = new SqlConnectionStringBuilder
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
|
||||
public MySqlDatabaseConnector(string host, string database, string username, string password)
|
||||
{
|
||||
// TODO: add custom port handling?
|
||||
string[] hostParts = host.Split(new char[]{':'}, 2);
|
||||
_dbHost = hostParts[0];
|
||||
_dbPort = (hostParts.Length == 2)?hostParts[1]:"3306";
|
||||
@@ -48,9 +49,9 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
|
||||
private void BuildSqlConnectionString()
|
||||
{
|
||||
_dbConnectionString = $"server={_dbHost};user={_dbUsername};database={_dbName};port={_dbPort};password={_dbPassword}";
|
||||
_dbConnectionString = $"server={_dbHost};user={_dbUsername};database={_dbName};port={_dbPort};password={_dbPassword};";
|
||||
}
|
||||
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
_dbConnection.Open();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.Serializers.MiscSerializers;
|
||||
using mRemoteNG.Container;
|
||||
@@ -7,6 +8,7 @@ using mRemoteNG.Tools;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class ActiveDirectoryImporter : IConnectionImporter<string>
|
||||
{
|
||||
public void Import(string ldapPath, ContainerInfo destinationContainer)
|
||||
@@ -19,11 +21,11 @@ namespace mRemoteNG.Config.Import
|
||||
try
|
||||
{
|
||||
ldapPath.ThrowIfNullOrEmpty(nameof(ldapPath));
|
||||
var deserializer = new ActiveDirectoryDeserializer(ldapPath, importSubOu);
|
||||
var connectionTreeModel = deserializer.Deserialize();
|
||||
var importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
ActiveDirectoryDeserializer deserializer = new(ldapPath, importSubOu);
|
||||
Tree.ConnectionTreeModel connectionTreeModel = deserializer.Deserialize();
|
||||
ContainerInfo importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
if (importedRootNode == null) return;
|
||||
var childrenToAdd = importedRootNode.Children.ToArray();
|
||||
Connection.ConnectionInfo[] childrenToAdd = importedRootNode.Children.ToArray();
|
||||
destinationContainer.AddChildRange(childrenToAdd);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class MRemoteNGCsvImporter : IConnectionImporter<string>
|
||||
{
|
||||
public void Import(string filePath, ContainerInfo destinationContainer)
|
||||
@@ -22,12 +24,12 @@ namespace mRemoteNG.Config.Import
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
|
||||
$"Unable to import file. File does not exist. Path: {filePath}");
|
||||
|
||||
var dataProvider = new FileDataProvider(filePath);
|
||||
var xmlString = dataProvider.Load();
|
||||
var xmlConnectionsDeserializer = new CsvConnectionsDeserializerMremotengFormat();
|
||||
var connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString);
|
||||
FileDataProvider dataProvider = new(filePath);
|
||||
string xmlString = dataProvider.Load();
|
||||
CsvConnectionsDeserializerMremotengFormat xmlConnectionsDeserializer = new();
|
||||
Tree.ConnectionTreeModel connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString);
|
||||
|
||||
var rootImportContainer = new ContainerInfo {Name = Path.GetFileNameWithoutExtension(filePath)};
|
||||
ContainerInfo rootImportContainer = new() { Name = Path.GetFileNameWithoutExtension(filePath)};
|
||||
rootImportContainer.AddChildRange(connectionTreeModel.RootNodes.First().Children.ToArray());
|
||||
destinationContainer.AddChild(rootImportContainer);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml;
|
||||
@@ -9,6 +10,7 @@ using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public class MRemoteNGXmlImporter : IConnectionImporter<string>
|
||||
{
|
||||
@@ -24,12 +26,12 @@ namespace mRemoteNG.Config.Import
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
|
||||
$"Unable to import file. File does not exist. Path: {fileName}");
|
||||
|
||||
var dataProvider = new FileDataProvider(fileName);
|
||||
var xmlString = dataProvider.Load();
|
||||
var xmlConnectionsDeserializer = new XmlConnectionsDeserializer();
|
||||
var connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString, true);
|
||||
FileDataProvider dataProvider = new(fileName);
|
||||
string xmlString = dataProvider.Load();
|
||||
XmlConnectionsDeserializer xmlConnectionsDeserializer = new();
|
||||
Tree.ConnectionTreeModel connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString, true);
|
||||
|
||||
var rootImportContainer = new ContainerInfo {Name = Path.GetFileNameWithoutExtension(fileName)};
|
||||
ContainerInfo rootImportContainer = new() { Name = Path.GetFileNameWithoutExtension(fileName)};
|
||||
rootImportContainer.AddChildRange(connectionTreeModel.RootNodes.First().Children.ToArray());
|
||||
destinationContainer.AddChild(rootImportContainer);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Config.Serializers.MiscSerializers;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
@@ -8,6 +9,7 @@ using mRemoteNG.Tools;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class PortScanImporter : IConnectionImporter<IEnumerable<ScanHost>>
|
||||
{
|
||||
private readonly ProtocolType _targetProtocolType;
|
||||
@@ -19,12 +21,12 @@ namespace mRemoteNG.Config.Import
|
||||
|
||||
public void Import(IEnumerable<ScanHost> hosts, ContainerInfo destinationContainer)
|
||||
{
|
||||
var deserializer = new PortScanDeserializer(_targetProtocolType);
|
||||
var connectionTreeModel = deserializer.Deserialize(hosts);
|
||||
PortScanDeserializer deserializer = new(_targetProtocolType);
|
||||
Tree.ConnectionTreeModel connectionTreeModel = deserializer.Deserialize(hosts);
|
||||
|
||||
var importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
ContainerInfo importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
if (importedRootNode == null) return;
|
||||
var childrenToAdd = importedRootNode.Children.ToArray();
|
||||
Connection.ConnectionInfo[] childrenToAdd = importedRootNode.Children.ToArray();
|
||||
destinationContainer.AddChildRange(childrenToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers.MiscSerializers;
|
||||
using mRemoteNG.Container;
|
||||
@@ -6,19 +7,20 @@ using mRemoteNG.Container;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class PuttyConnectionManagerImporter : IConnectionImporter<string>
|
||||
{
|
||||
public void Import(string filePath, ContainerInfo destinationContainer)
|
||||
{
|
||||
var dataProvider = new FileDataProvider(filePath);
|
||||
var xmlContent = dataProvider.Load();
|
||||
FileDataProvider dataProvider = new(filePath);
|
||||
string xmlContent = dataProvider.Load();
|
||||
|
||||
var deserializer = new PuttyConnectionManagerDeserializer();
|
||||
var connectionTreeModel = deserializer.Deserialize(xmlContent);
|
||||
PuttyConnectionManagerDeserializer deserializer = new();
|
||||
Tree.ConnectionTreeModel connectionTreeModel = deserializer.Deserialize(xmlContent);
|
||||
|
||||
var importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
ContainerInfo importedRootNode = connectionTreeModel.RootNodes.First();
|
||||
if (importedRootNode == null) return;
|
||||
var childrenToAdd = importedRootNode.Children.ToArray();
|
||||
Connection.ConnectionInfo[] childrenToAdd = importedRootNode.Children.ToArray();
|
||||
destinationContainer.AddChildRange(childrenToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user