;Hh+GPGbYzut
zh8Mhtnx!^RYH8=Z*lQ;3REFIPS)~COt^}LH2oUFyvv5MxxFYE3#>eyQVv1&QvRRwi
zzaIY6R0B2w%*D}iA?U`KfB>+Z!1;)%zJr0{JG6e->K6L1!_WC_EL-<}5q+hDCP8XZ
z@M}iwUI;6786TUecPB90O#A9}MvJn607wQkHkCX>Kfdx~M(+49>5M841P
z+;9T1_Zertj>O@cKYAFxjU&u&7u;L}mEHO-yghvLaj$x}M6*AJzoQc%Z?OO4DivV!
zD{&+c_P2c>Lr>i=eRt;C_k7O2R(tJ5O8a^O!2##XaCyMD0!*$5M9^G0*}s;zayLVD
zLlgVCKK*n%pq9Uwcf3?@u9kznS
zjgXJ^!Y=+3vybP2=F)w%jsIG8@~N5S#fOsvjGp9D5#g7^Y}-e$jv2RuV=OaGf@)S(
zt45!_t))=_u5;FA00BC;|2A>ZUgUyz=8wz^+3g|wH9}Z&5IL(&X4gO4Ve3_^;+;t3
zJDs!JYh$lORpxh%;2xtQ|3~-^sCvc1^}Olr?^u-5Qr4nQs4rM4xk^+Ju9V8b84Tf|=?vYE5cj2E<>{ExJ^|a}
z#fJNPm5@OJ=yQRnSSnWqa%D190KH8Pk9%Q8SD>-G(q^nW`FvR5;?eq_j?&EhIyHs}
zWq?~#v$QDpVs83wWPL7rU~lj2xV{cY#?B1rj>TKVs=%xP+Bo^SIQ-Thj$T_UvMlZeNN5r&SE+@}Zy$^(hnVS~
zlQy;gC19-Pd;E59^(8TZ!7EP4pZH_?KDdSRzDU_KG3Sa;<=R-Ex_iCe6TCs-AQLwv
z+IqxR=$nl#5pEj``UWh?)Vca&Srtu<(MPEyk6Fz8=&Rtas8uje+rDrObBQd)#M^!Y
zr8~Euq9blPlXmDhRN(k}jyTbI9IJZ8B=oj(xMDO61p^=nZoP@h
z2SpUrLfh8u^EwrKww6`8Q~$cn{QjTRai}syDo=z19Ih>$*pY$$-=WU=ulpbR@v_S6
zz~$-Je&o9kQNxCGu9B4%df391cx?97wzJOpeR1x^+@2SXo(p>vW@1z7R$#td>Cy9l;=%2m_%x%rO%hx86I^vkDG)wG18
zV9zI1lDlD<*5qw)sh5p8_r;s-;IpjYMB5&*TXGi!c8ne(6?SYCZ!GnF4gHoqEVGc4
z|B|!FC)Dz?EVGLqDLgGF4HMQp`3}|mW#6YNWy(dbax~BSNS&dbnwn^o#}o-WH>2$1
z!HZ!JFq(O%Eh}Z7*S>*N6PF4-avp`X2M{0d>H(E^?rKR#c-a&|1LtRGH%#67(Qnr?
zr?2;tuC{j72ZG5|(h-dbKG*?bL@sI_S2c`XAs9JoX6u9rT@m3#t-4ssaj|+2m0A5z
zeHKd&u$JBb6nyUWltY@KcuQ4flvcpnIdE4$bx*G0EE>RAu`oG^oc@B6#Bje$y6@#Y
z-(08x4f1KZcK*0`UBC-@<=ew7QUl2y1-ACmj_9RPr@9IDpX>f7pIIvNgZCCEr}iZ4DQZh??$-$?_
z&j!a+M8nqkJZOSF+@-u^@NwRmpq(xrMcOf^8+)3FfqVn7lLPf}`}Ca!w($#$O={cz
zSB`IaZF6;ELdvUd*`~qlC;U6I6a|(sFDlc%@I1=wf%1)7F0yXIli!A+(5sa
z^5%Z~+D?*jp_;FHL=@xaFy6tQR_($6l*_K;9AH*?r@py(p{Gu`Veb)<7M?W4c9k3V
zW{RXsihYl~46t1p@m$dX$KT>8z*GcBB4O`=-wc+(ikeTJc0YoW$j;c%yUP9RwN58@
zqVT6cZ1E=HNBI42CZ;*QyEjRmLYxSug@09Y&x$t~9kS{oZluKnDKEnHNlkesl80f4mIc$4Hex8|;uy=hQ
z+tkGW0VeivJ=f5P7Y9y2V|qWYdzoxw9Z$%rUDEct70ip>P{2>vDWm#CpwMR{|U~nGx`m3&a;yL
zgyK6`;Cr&F;nN>s#}u=gzwX>|Cf9H4esNwHBeU{9rKp8pFa1W{ht=k$)oSN8G%>RS
zD&9_$l}!9ke2+=w!@yyfl=~sPaiNr2&!s~aMIAr>eDQxunIb0RGZ!lN8eCZNcEocm
zOhOo0mZQfkDsWd3@Q#>7(?-GNMdA%O<2Uy&JN)>|V6UTxC+%%HYkRaimMP*2#iZ9x
z3^=nEDjfZIiR0aIPW}z3&FdM_Tga8HLm^YHk}0L}a;_{vMfVcLgR2C}gbpbm43EEu
zQOmpQjI6MHk$3h;lSihlgUNxZSqih`tmQ9*_>0g8#`))|O6g6{tQ4P^fsG%@`RFHb
z1sQ8E*>oH`s(HJ#Pq5SV7Vpe82`4T3UnD~_&2YAaFBNo#o%?tu3rDL5q6+i_Om9{SVyu78@LU6>;SSGYZlR?10BCf
zI{*zSh@9dv+jm{i3atn0*p)&_k5*J~kSXIGCNjbCu`mwY0)V$6@L6c@-(Ye17eU-+
z)h#wEna{|3w#3xZ{3W?z?XU>vu3Ipu9NNFAWKb$=Ml0vQ^(F#`eaj```8+jk`Q6-zG?`kJPqwsKx?vJaPjuFyWR9
ztdh^r;3c;1f6immy^l=zZO%=HqvRHYn992zp!WULgsoG9&7^-dZ87y;E!BVbf$}@K
zuZ9Po^o}mY1aCw_z!saVVdTtY%*@OOrxZ)CF7;a}>^CwdEryIryMpn?i2J$(d-3s=
z>bt6U+gSD&CuHx3#yZCzn&@b)(c=RewReM1u(#0DLn
zx$a!B1-{n3YM3(l=%iAw^)_kohx2~9rH)gZGE>_|-9x}t#RHSt-GnZ`arV`0$(Q{3
zPo6qEc&V5q;>vrT1q8VzXTw47*!tX+{xKoo@ct2RE9GmANN@tYECrjInZT7u(2h$H
zbFxga_jdBTb3N8S)b*=fFsnCB*hY@_hz=a?$f!S;+=Xh2kGQQs#0S`!$+^ovv?ew8
zP!kN^zlgAt8={+RpLXv&>?V~GtG!K*8+;Dheyn)&NA&m}$Ox_?Q9*~VG~z_k6at;S
zRQv+!t-N*b!MCxVf!VoBqareXjr<83H}?E2-)5*%x$20*GbYq;uS;RZ)vJ!=p>t>5
zaFspUy^i+!A;fE?*-V^fn(dQ|rqmYBNWc6OrQMEN-Z_su4bkPN|L)z#ZYp!%qcHzN
zEng=0L}NZCD%xJ~t`zn)*>GR4(CCuja-q}FP+kZ*?Wx&}p+dmPK7rJ4J9rf8yQ4$~
zeO(n1wE35@(~BKuZ|JEHTu&k+-u=S{VaJ?KXLLo281<}@n<+NbtVjw8l5;_j+U1T4
zZOticxTl%MFBGi$;+f;Y+<$1)nGUC_BLbx078PNh`GVKjOnjo=&9z8pl2_*M>=d(_
zk5>pyQCv|H8j&RHcu_n4!cc6;Qhx++O~dZ9>OBslc6;uZ5&WH_Y_%L*`3Ci_M~|3{
ztDPHkbRpaJd}~^Y8Y4VOic|_ko#zi)tm1VL6qZfpibnWx_AQK??la&Cp9FQ8Qh$jp
z{sS`m{1{siI>eKGFn_|8hDUXC2j9j3iJ4nxewTXRl#LC+CLdov=UptAE8`%e1HH?AoUWo5GUv!H&M;v}Me?-w(nu_pQIn
zdsE9j0Xt^&`dvCSHclNP7Igz%`eA`BUj_U69-8_*h`IKq^fS}&nqyZGX<VAVwM?
zSkW+zMULS5tdW&LFT{YVLq+=0RDh-;zFInc5hE(NO^am@q^fAhpcL?--xnDKZq}yX
zH8tpu42QN&roy|&RF!eCJf6+~7ajR3{H`7Lo@!)|Ts$bH!)Z*6!mWV$&sf5R@!&nA
zVn~m2B7`$1JizLBaSLA?3s5f!SEN!16@7?uxb6<2R9vT2yr5L}rBu?PzbZMvWt7Tz
zEd<=>w-^n-^ex~IH4xee3yd0Jg;67MY9vlsT4H6E@aG)}ZPX}?8fA-7R^}LGg=NyL
zM`DyUCYm-HmogfcVuMpQIAx2=w8dqP8IIw`V41YBxQ4N|fi!Th-9c9iv8Cx~BW5(v
zA%rx<0%1{g1|#W5Xeth33QkZEE1FIpgh>Urt$9>%QQkyLh4mo=1f}Y5kbyKng2tNO
z8{BFSG|)%P;Z5yHpj{Cw*qAo(3G_C7*tUkS6#LLeM#4NB_<@yzpJ-q#`p9@15CDEf
zp^sR@4~m`&*3ERbp#k1?Cec)V5b!IFzDRl@RmTl6psDEE;1xs)=#8L*(U7TBonMiW
z&@P}&7a0Y9W`ck_-3Ew1RmT<4r>e$4_Vgt^`OV;{u!Q_1E8s*d(sL%k?@{Twli~Ns
z^gMU?ZJoZ_6Q|b@biSu4xNScoeLWEELtRM7RUsH#C=1ddBDHPFFF-#|F}
ztU)&TamKjxiZ0n)oZBINPnT@K4HY=1H-PM(3c|q8I_%OL4Zz)e=(%60;LbkydCFh}
t3`ukNWQB}_AK=Lx<`JbBi!(u*Bje!{CIHM7uzp(Ug|7JbLHN6%{{uL6RpS5v
literal 0
HcmV?d00001
diff --git a/BackendServices/CastleLibrary/XI5/obj/Release/net6.0/ref/XI5.dll b/BackendServices/CastleLibrary/XI5/obj/Release/net6.0/ref/XI5.dll
new file mode 100644
index 0000000000000000000000000000000000000000..a00937c16a43857f62e0d8e3cd788b23410de3f7
GIT binary patch
literal 6144
zcmeHLUu+yl8UJ?o?tHeB!*=Wt6q2rS5Ec!mbDgG5lQehs+3BV6pZdSZY&Mxo)6*NSQ*({FUNLOj@%6IM-KMRZww|9W>UF0o();)K9BaFtpCY=b#OTOFkK77J
zyG@_cdzB2)K1h;*^yrglv#2^MQJ-wpAZ`|L{IYBV+l)r5SJ;&QJ8hd~5z4PG5X~{M
zN^~3k_LQw4jO(!b4QGj
z8wli_BtS=sj_A{_=T;z-Ijn+UUjwL-l7-8(D=Y_wJhili%HtkHjg&0Ljj;F0dw2#u
zc<{#2rT5;=zmuR>d#8?Gy@yl1pW5AKfX`JFKATjEQz=XI#U3Jsh5twC8T=AW6faCD
zZ4Z3TY@A4E(&L%&u~Y0YP8RSzoKGWPCd$N#-oXoKr0Bb*UGv!DuQ>Dh_!?O((mz1+
z898!(v5;qFH{wHZBNLWWW*!AcnDX?IZKa#fvVSS#e4cUqL#S{s&$>aha7C$h`v6+D
z+25{Ab7dDq-%^<-O3<=$SWD0?iI1sF4=PFR0G&q62}(%GIb~T*(4Xkfz+si~4TW)C
z;#Vd9P2#9TS9=56ZFLDA{z>d}h*)w%;!jnkb;s@)#l=)
zf&Bv{PeC_G+HfD$!JVZZaEZh!ouQ?zH??!XuSmSCGVM$J88Q7MDSut!2aunn3{7Gp
zd+9t-0nTUPlDq-`>SNx687oMaTPbRCh?#E=NWOVVc#Xad
ze397ZSJLKHN(2Yi$1$N$2Q$^3>CS37i!w=BEpoKP(ghRxR2Kj`~hGJ
zPpt~+$ANvklDKXirq~v*al9;ce{SBhrM7S)N?+}fI1F%4^BesY$IEzcMA
zbYYG*467+tR;X(D20B-QKEmBFE22=9+?;KhcE~Jx!fne7p4Z&X1onY^)~E~0Be0SQ
zqCMb3)ApH#-0)isK{?M8^|IBP5x&78N@$7YkVNJBkIdCR|}xL>Oa76-wB*VYfPp_FPN3
zZ_vG-|fv
z`DVonMeRJ(;f5&&o7baYn;<1T4#JZoPi;0#7jzKy&K?MqMeNC@M|0(85eFw2#2L&(
z!S<=*VEYDa@si{E$l7rIf?XAxG~rZRG-29?+oGv@!*9vwm}t)(TGL61>57t!1Nw)U
zOvQCoNu`q4heU|9#J6croCPp{k_DNX3zp#QBj?)r^|x(h~iBT4G=@kr*0SRN`?`
zx(9N=UWr`;xo(Q71GyvdWD*0VP`i^l4fPk4{uwa6Jm`@)C{-JUdKBu>P(4b$5U4Re
zqLK>EIW9-}dQnmjKJ6NfS;wB*tcV6LQt6WGJnt#6Q>EQmg$|`>r%IEKD{_s-@%HMT
z-8h-fz(Hzo=NZhKUc)k4d_E+(hYpJ&g?bBK$u;YBeyn39w<%;08lP#j4{tF%Fv9R4
zWo8VQM*I==C={2B3?c&Z+d0C&k8kv_q{80|LP4}`-+2Sk3ew42)(mgrx>rGNLhgFj
z-uX0TgHQBm_j{LCWU_~XUj`y+2Df>v#a2WJGI-NH0cv@b=%rwrNRyXTzPT<@kye0H
zv;eArUs`6t7l6~juP*d%?C<{${Dg1KpgkwO1m6J>w^GXA0SdetxF=4NiSG#kpEj+L
zBlX8{+afAKYe4EjZ;%f=2V79D$Nqw06vX7i%7naj7f&~(O$Ilp;O_*LK@p9@zk(Z)
zgIjh(j?qF!1~_b8lx0MN9SvKy3nR=!>*2n{<2820)3HxR?3ZBgqDLq0G2F&7JC*&j
zJ!kGqTN^Q0kw^l+X{tiX-&}a`VSf>}HEGEiG^iybs^MnJzccBmk4nFDZ8^^l`wjD8
zF35DRf6jLv{Tz(hM6P}$n&`YF_SpS*ww+wVcygEv53$#=3KpW)u>*F`P^S;i)BW<1
UW*{4UAM2+-lJ$L~du#^&1FGEMPyhe`
literal 0
HcmV?d00001
diff --git a/BackendServices/CastleLibrary/XI5/obj/Release/net6.0/refint/XI5.dll b/BackendServices/CastleLibrary/XI5/obj/Release/net6.0/refint/XI5.dll
new file mode 100644
index 0000000000000000000000000000000000000000..a00937c16a43857f62e0d8e3cd788b23410de3f7
GIT binary patch
literal 6144
zcmeHLUu+yl8UJ?o?tHeB!*=Wt6q2rS5Ec!mbDgG5lQehs+3BV6pZdSZY&Mxo)6*NSQ*({FUNLOj@%6IM-KMRZww|9W>UF0o();)K9BaFtpCY=b#OTOFkK77J
zyG@_cdzB2)K1h;*^yrglv#2^MQJ-wpAZ`|L{IYBV+l)r5SJ;&QJ8hd~5z4PG5X~{M
zN^~3k_LQw4jO(!b4QGj
z8wli_BtS=sj_A{_=T;z-Ijn+UUjwL-l7-8(D=Y_wJhili%HtkHjg&0Ljj;F0dw2#u
zc<{#2rT5;=zmuR>d#8?Gy@yl1pW5AKfX`JFKATjEQz=XI#U3Jsh5twC8T=AW6faCD
zZ4Z3TY@A4E(&L%&u~Y0YP8RSzoKGWPCd$N#-oXoKr0Bb*UGv!DuQ>Dh_!?O((mz1+
z898!(v5;qFH{wHZBNLWWW*!AcnDX?IZKa#fvVSS#e4cUqL#S{s&$>aha7C$h`v6+D
z+25{Ab7dDq-%^<-O3<=$SWD0?iI1sF4=PFR0G&q62}(%GIb~T*(4Xkfz+si~4TW)C
z;#Vd9P2#9TS9=56ZFLDA{z>d}h*)w%;!jnkb;s@)#l=)
zf&Bv{PeC_G+HfD$!JVZZaEZh!ouQ?zH??!XuSmSCGVM$J88Q7MDSut!2aunn3{7Gp
zd+9t-0nTUPlDq-`>SNx687oMaTPbRCh?#E=NWOVVc#Xad
ze397ZSJLKHN(2Yi$1$N$2Q$^3>CS37i!w=BEpoKP(ghRxR2Kj`~hGJ
zPpt~+$ANvklDKXirq~v*al9;ce{SBhrM7S)N?+}fI1F%4^BesY$IEzcMA
zbYYG*467+tR;X(D20B-QKEmBFE22=9+?;KhcE~Jx!fne7p4Z&X1onY^)~E~0Be0SQ
zqCMb3)ApH#-0)isK{?M8^|IBP5x&78N@$7YkVNJBkIdCR|}xL>Oa76-wB*VYfPp_FPN3
zZ_vG-|fv
z`DVonMeRJ(;f5&&o7baYn;<1T4#JZoPi;0#7jzKy&K?MqMeNC@M|0(85eFw2#2L&(
z!S<=*VEYDa@si{E$l7rIf?XAxG~rZRG-29?+oGv@!*9vwm}t)(TGL61>57t!1Nw)U
zOvQCoNu`q4heU|9#J6croCPp{k_DNX3zp#QBj?)r^|x(h~iBT4G=@kr*0SRN`?`
zx(9N=UWr`;xo(Q71GyvdWD*0VP`i^l4fPk4{uwa6Jm`@)C{-JUdKBu>P(4b$5U4Re
zqLK>EIW9-}dQnmjKJ6NfS;wB*tcV6LQt6WGJnt#6Q>EQmg$|`>r%IEKD{_s-@%HMT
z-8h-fz(Hzo=NZhKUc)k4d_E+(hYpJ&g?bBK$u;YBeyn39w<%;08lP#j4{tF%Fv9R4
zWo8VQM*I==C={2B3?c&Z+d0C&k8kv_q{80|LP4}`-+2Sk3ew42)(mgrx>rGNLhgFj
z-uX0TgHQBm_j{LCWU_~XUj`y+2Df>v#a2WJGI-NH0cv@b=%rwrNRyXTzPT<@kye0H
zv;eArUs`6t7l6~juP*d%?C<{${Dg1KpgkwO1m6J>w^GXA0SdetxF=4NiSG#kpEj+L
zBlX8{+afAKYe4EjZ;%f=2V79D$Nqw06vX7i%7naj7f&~(O$Ilp;O_*LK@p9@zk(Z)
zgIjh(j?qF!1~_b8lx0MN9SvKy3nR=!>*2n{<2820)3HxR?3ZBgqDLq0G2F&7JC*&j
zJ!kGqTN^Q0kw^l+X{tiX-&}a`VSf>}HEGEiG^iybs^MnJzccBmk4nFDZ8^^l`wjD8
zF35DRf6jLv{Tz(hM6P}$n&`YF_SpS*ww+wVcygEv53$#=3KpW)u>*F`P^S;i)BW<1
UW*{4UAM2+-lJ$L~du#^&1FGEMPyhe`
literal 0
HcmV?d00001
diff --git a/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.dgspec.json b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.dgspec.json
new file mode 100644
index 000000000..9483b0f40
--- /dev/null
+++ b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.dgspec.json
@@ -0,0 +1,335 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj",
+ "projectName": "CastleLibrary",
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj",
+ "packagesPath": "C:\\Users\\Mack\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Mack\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\CustomLogger.csproj": {
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\CustomLogger.csproj"
+ },
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\EndianTools.csproj": {
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\EndianTools.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "dependencies": {
+ "Microsoft.NET.ILLink.Analyzers": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "Microsoft.NET.ILLink.Tasks": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ },
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\CustomLogger.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\CustomLogger.csproj",
+ "projectName": "CustomLogger",
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\CustomLogger.csproj",
+ "packagesPath": "C:\\Users\\Mack\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CustomLogger\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Mack\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "dependencies": {
+ "Figgle": {
+ "target": "Package",
+ "version": "[0.5.1, )"
+ },
+ "Microsoft.Extensions.Logging": {
+ "target": "Package",
+ "version": "[8.0.0, )"
+ },
+ "Microsoft.Extensions.Logging.Console": {
+ "target": "Package",
+ "version": "[8.0.0, )"
+ },
+ "Microsoft.NET.ILLink.Analyzers": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "Microsoft.NET.ILLink.Tasks": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "NReco.Logging.File": {
+ "target": "Package",
+ "version": "[1.2.1, )"
+ },
+ "System.Security.Principal.Windows": {
+ "target": "Package",
+ "version": "[5.0.0, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ },
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\EndianTools.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\EndianTools.csproj",
+ "projectName": "EndianTools",
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\EndianTools.csproj",
+ "packagesPath": "C:\\Users\\Mack\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\EndianTools\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Mack\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "dependencies": {
+ "Microsoft.NET.ILLink.Analyzers": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "Microsoft.NET.ILLink.Tasks": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ },
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj",
+ "projectName": "XI5",
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj",
+ "packagesPath": "C:\\Users\\Mack\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Mack\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj": {
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "dependencies": {
+ "Microsoft.NET.ILLink.Analyzers": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "Microsoft.NET.ILLink.Tasks": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.props b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.props
new file mode 100644
index 000000000..3274d1b22
--- /dev/null
+++ b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.props
@@ -0,0 +1,23 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Mack\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
+ PackageReference
+ 6.8.1
+
+
+
+
+
+
+
+
+
+
+ C:\Users\Mack\.nuget\packages\microsoft.net.illink.tasks\7.0.100-1.23211.1
+
+
\ No newline at end of file
diff --git a/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.targets b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.targets
new file mode 100644
index 000000000..5d2332546
--- /dev/null
+++ b/BackendServices/CastleLibrary/XI5/obj/XI5.csproj.nuget.g.targets
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BackendServices/CastleLibrary/XI5/obj/project.assets.json b/BackendServices/CastleLibrary/XI5/obj/project.assets.json
new file mode 100644
index 000000000..362217035
--- /dev/null
+++ b/BackendServices/CastleLibrary/XI5/obj/project.assets.json
@@ -0,0 +1,1230 @@
+{
+ "version": 3,
+ "targets": {
+ "net6.0": {
+ "Figgle/0.5.1": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Figgle.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Figgle.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "Microsoft.Extensions.Configuration/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Primitives": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Primitives": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Configuration.Binder/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.Binder.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Configuration.Binder.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/netstandard2.0/Microsoft.Extensions.Configuration.Binder.targets": {}
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": {
+ "type": "package",
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Logging/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection": "8.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Logging.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Logging.Abstractions/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/Microsoft.Extensions.Logging.Abstractions.targets": {}
+ }
+ },
+ "Microsoft.Extensions.Logging.Configuration/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration": "8.0.0",
+ "Microsoft.Extensions.Configuration.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Configuration.Binder": "8.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Logging": "8.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0",
+ "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Configuration.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Configuration.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Logging.Console/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Logging": "8.0.0",
+ "Microsoft.Extensions.Logging.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Logging.Configuration": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0",
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0",
+ "System.Text.Json": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Console.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Logging.Console.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Options/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Primitives": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Options.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Options.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/Microsoft.Extensions.Options.targets": {}
+ }
+ },
+ "Microsoft.Extensions.Options.ConfigurationExtensions/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Configuration.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Configuration.Binder": "8.0.0",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
+ "Microsoft.Extensions.Options": "8.0.0",
+ "Microsoft.Extensions.Primitives": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.Extensions.Primitives/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ },
+ "compile": {
+ "lib/net6.0/Microsoft.Extensions.Primitives.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/Microsoft.Extensions.Primitives.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ }
+ },
+ "Microsoft.NET.ILLink.Analyzers/7.0.100-1.23211.1": {
+ "type": "package",
+ "build": {
+ "build/Microsoft.NET.ILLink.Analyzers.props": {}
+ }
+ },
+ "Microsoft.NET.ILLink.Tasks/7.0.100-1.23211.1": {
+ "type": "package",
+ "build": {
+ "build/Microsoft.NET.ILLink.Tasks.props": {}
+ }
+ },
+ "NReco.Logging.File/1.2.1": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.Extensions.Logging": "6.0.0",
+ "Microsoft.Extensions.Logging.Configuration": "6.0.0",
+ "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0"
+ },
+ "compile": {
+ "lib/net6.0/NReco.Logging.File.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/NReco.Logging.File.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {
+ "type": "package",
+ "compile": {
+ "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/netcoreapp3.1/_._": {}
+ }
+ },
+ "System.Security.Principal.Windows/5.0.0": {
+ "type": "package",
+ "compile": {
+ "ref/netcoreapp3.0/System.Security.Principal.Windows.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/System.Security.Principal.Windows.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
+ "assetType": "runtime",
+ "rid": "unix"
+ },
+ "runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
+ "assetType": "runtime",
+ "rid": "win"
+ }
+ }
+ },
+ "System.Text.Encodings.Web/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0"
+ },
+ "compile": {
+ "lib/net6.0/System.Text.Encodings.Web.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/System.Text.Encodings.Web.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/_._": {}
+ },
+ "runtimeTargets": {
+ "runtimes/browser/lib/net6.0/System.Text.Encodings.Web.dll": {
+ "assetType": "runtime",
+ "rid": "browser"
+ }
+ }
+ },
+ "System.Text.Json/8.0.0": {
+ "type": "package",
+ "dependencies": {
+ "System.Runtime.CompilerServices.Unsafe": "6.0.0",
+ "System.Text.Encodings.Web": "8.0.0"
+ },
+ "compile": {
+ "lib/net6.0/System.Text.Json.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/net6.0/System.Text.Json.dll": {
+ "related": ".xml"
+ }
+ },
+ "build": {
+ "buildTransitive/net6.0/System.Text.Json.targets": {}
+ }
+ },
+ "CastleLibrary/1.0.0": {
+ "type": "project",
+ "framework": ".NETCoreApp,Version=v6.0",
+ "dependencies": {
+ "CustomLogger": "1.0.0",
+ "EndianTools": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/CastleLibrary.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/CastleLibrary.dll": {}
+ }
+ },
+ "CustomLogger/1.0.0": {
+ "type": "project",
+ "framework": ".NETCoreApp,Version=v6.0",
+ "dependencies": {
+ "Figgle": "0.5.1",
+ "Microsoft.Extensions.Logging": "8.0.0",
+ "Microsoft.Extensions.Logging.Console": "8.0.0",
+ "NReco.Logging.File": "1.2.1",
+ "System.Security.Principal.Windows": "5.0.0"
+ },
+ "compile": {
+ "bin/placeholder/CustomLogger.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/CustomLogger.dll": {}
+ }
+ },
+ "EndianTools/1.0.0": {
+ "type": "project",
+ "framework": ".NETCoreApp,Version=v6.0",
+ "compile": {
+ "bin/placeholder/EndianTools.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/EndianTools.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Figgle/0.5.1": {
+ "sha512": "F21k9oOGRgSb+1dCX0kFDYRBbShSMFvL49xjNmF/dsJwiN5M7zBaSWsYKpi/KZWXVIIxNzTbNTq9ZciucaHYMQ==",
+ "type": "package",
+ "path": "figgle/0.5.1",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "README.md",
+ "figgle.0.5.1.nupkg.sha512",
+ "figgle.nuspec",
+ "lib/netstandard2.0/Figgle.dll",
+ "lib/netstandard2.0/Figgle.xml",
+ "logo-square-256px.png"
+ ]
+ },
+ "Microsoft.Extensions.Configuration/8.0.0": {
+ "sha512": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==",
+ "type": "package",
+ "path": "microsoft.extensions.configuration/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Configuration.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.targets",
+ "lib/net462/Microsoft.Extensions.Configuration.dll",
+ "lib/net462/Microsoft.Extensions.Configuration.xml",
+ "lib/net6.0/Microsoft.Extensions.Configuration.dll",
+ "lib/net6.0/Microsoft.Extensions.Configuration.xml",
+ "lib/net7.0/Microsoft.Extensions.Configuration.dll",
+ "lib/net7.0/Microsoft.Extensions.Configuration.xml",
+ "lib/net8.0/Microsoft.Extensions.Configuration.dll",
+ "lib/net8.0/Microsoft.Extensions.Configuration.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.xml",
+ "microsoft.extensions.configuration.8.0.0.nupkg.sha512",
+ "microsoft.extensions.configuration.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Configuration.Abstractions/8.0.0": {
+ "sha512": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==",
+ "type": "package",
+ "path": "microsoft.extensions.configuration.abstractions/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Configuration.Abstractions.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Configuration.Abstractions.targets",
+ "lib/net462/Microsoft.Extensions.Configuration.Abstractions.dll",
+ "lib/net462/Microsoft.Extensions.Configuration.Abstractions.xml",
+ "lib/net6.0/Microsoft.Extensions.Configuration.Abstractions.dll",
+ "lib/net6.0/Microsoft.Extensions.Configuration.Abstractions.xml",
+ "lib/net7.0/Microsoft.Extensions.Configuration.Abstractions.dll",
+ "lib/net7.0/Microsoft.Extensions.Configuration.Abstractions.xml",
+ "lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll",
+ "lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.xml",
+ "microsoft.extensions.configuration.abstractions.8.0.0.nupkg.sha512",
+ "microsoft.extensions.configuration.abstractions.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Configuration.Binder/8.0.0": {
+ "sha512": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==",
+ "type": "package",
+ "path": "microsoft.extensions.configuration.binder/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "analyzers/dotnet/cs/Microsoft.Extensions.Configuration.Binder.SourceGeneration.dll",
+ "analyzers/dotnet/cs/cs/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/de/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/es/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/fr/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/it/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/ja/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/ko/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/pl/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/pt-BR/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/ru/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/tr/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/zh-Hans/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "analyzers/dotnet/cs/zh-Hant/Microsoft.Extensions.Configuration.Binder.SourceGeneration.resources.dll",
+ "buildTransitive/netstandard2.0/Microsoft.Extensions.Configuration.Binder.targets",
+ "lib/net462/Microsoft.Extensions.Configuration.Binder.dll",
+ "lib/net462/Microsoft.Extensions.Configuration.Binder.xml",
+ "lib/net6.0/Microsoft.Extensions.Configuration.Binder.dll",
+ "lib/net6.0/Microsoft.Extensions.Configuration.Binder.xml",
+ "lib/net7.0/Microsoft.Extensions.Configuration.Binder.dll",
+ "lib/net7.0/Microsoft.Extensions.Configuration.Binder.xml",
+ "lib/net8.0/Microsoft.Extensions.Configuration.Binder.dll",
+ "lib/net8.0/Microsoft.Extensions.Configuration.Binder.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Configuration.Binder.xml",
+ "microsoft.extensions.configuration.binder.8.0.0.nupkg.sha512",
+ "microsoft.extensions.configuration.binder.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.DependencyInjection/8.0.0": {
+ "sha512": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==",
+ "type": "package",
+ "path": "microsoft.extensions.dependencyinjection/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.DependencyInjection.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.targets",
+ "lib/net462/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/net462/Microsoft.Extensions.DependencyInjection.xml",
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.xml",
+ "lib/net7.0/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/net7.0/Microsoft.Extensions.DependencyInjection.xml",
+ "lib/net8.0/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/net8.0/Microsoft.Extensions.DependencyInjection.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.xml",
+ "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll",
+ "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.xml",
+ "microsoft.extensions.dependencyinjection.8.0.0.nupkg.sha512",
+ "microsoft.extensions.dependencyinjection.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": {
+ "sha512": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==",
+ "type": "package",
+ "path": "microsoft.extensions.dependencyinjection.abstractions/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.DependencyInjection.Abstractions.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.DependencyInjection.Abstractions.targets",
+ "lib/net462/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/net462/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "lib/net7.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/net7.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.Abstractions.dll",
+ "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.Abstractions.xml",
+ "microsoft.extensions.dependencyinjection.abstractions.8.0.0.nupkg.sha512",
+ "microsoft.extensions.dependencyinjection.abstractions.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Logging/8.0.0": {
+ "sha512": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==",
+ "type": "package",
+ "path": "microsoft.extensions.logging/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Logging.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Logging.targets",
+ "lib/net462/Microsoft.Extensions.Logging.dll",
+ "lib/net462/Microsoft.Extensions.Logging.xml",
+ "lib/net6.0/Microsoft.Extensions.Logging.dll",
+ "lib/net6.0/Microsoft.Extensions.Logging.xml",
+ "lib/net7.0/Microsoft.Extensions.Logging.dll",
+ "lib/net7.0/Microsoft.Extensions.Logging.xml",
+ "lib/net8.0/Microsoft.Extensions.Logging.dll",
+ "lib/net8.0/Microsoft.Extensions.Logging.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.xml",
+ "lib/netstandard2.1/Microsoft.Extensions.Logging.dll",
+ "lib/netstandard2.1/Microsoft.Extensions.Logging.xml",
+ "microsoft.extensions.logging.8.0.0.nupkg.sha512",
+ "microsoft.extensions.logging.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Logging.Abstractions/8.0.0": {
+ "sha512": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==",
+ "type": "package",
+ "path": "microsoft.extensions.logging.abstractions/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "analyzers/dotnet/roslyn3.11/cs/Microsoft.Extensions.Logging.Generators.dll",
+ "analyzers/dotnet/roslyn3.11/cs/cs/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/de/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/es/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/fr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/it/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ja/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ko/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pl/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pt-BR/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ru/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/tr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hans/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hant/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/Microsoft.Extensions.Logging.Generators.dll",
+ "analyzers/dotnet/roslyn4.0/cs/cs/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/de/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/es/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/fr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/it/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ja/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ko/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pl/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pt-BR/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ru/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/tr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hans/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hant/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/Microsoft.Extensions.Logging.Generators.dll",
+ "analyzers/dotnet/roslyn4.4/cs/cs/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/de/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/es/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/fr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/it/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ja/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ko/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pl/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pt-BR/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ru/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/tr/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hans/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hant/Microsoft.Extensions.Logging.Generators.resources.dll",
+ "buildTransitive/net461/Microsoft.Extensions.Logging.Abstractions.targets",
+ "buildTransitive/net462/Microsoft.Extensions.Logging.Abstractions.targets",
+ "buildTransitive/net6.0/Microsoft.Extensions.Logging.Abstractions.targets",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Logging.Abstractions.targets",
+ "buildTransitive/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.targets",
+ "lib/net462/Microsoft.Extensions.Logging.Abstractions.dll",
+ "lib/net462/Microsoft.Extensions.Logging.Abstractions.xml",
+ "lib/net6.0/Microsoft.Extensions.Logging.Abstractions.dll",
+ "lib/net6.0/Microsoft.Extensions.Logging.Abstractions.xml",
+ "lib/net7.0/Microsoft.Extensions.Logging.Abstractions.dll",
+ "lib/net7.0/Microsoft.Extensions.Logging.Abstractions.xml",
+ "lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll",
+ "lib/net8.0/Microsoft.Extensions.Logging.Abstractions.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.xml",
+ "microsoft.extensions.logging.abstractions.8.0.0.nupkg.sha512",
+ "microsoft.extensions.logging.abstractions.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Logging.Configuration/8.0.0": {
+ "sha512": "ixXXV0G/12g6MXK65TLngYN9V5hQQRuV+fZi882WIoVJT7h5JvoYoxTEwCgdqwLjSneqh1O+66gM8sMr9z/rsQ==",
+ "type": "package",
+ "path": "microsoft.extensions.logging.configuration/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Logging.Configuration.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Logging.Configuration.targets",
+ "lib/net462/Microsoft.Extensions.Logging.Configuration.dll",
+ "lib/net462/Microsoft.Extensions.Logging.Configuration.xml",
+ "lib/net6.0/Microsoft.Extensions.Logging.Configuration.dll",
+ "lib/net6.0/Microsoft.Extensions.Logging.Configuration.xml",
+ "lib/net7.0/Microsoft.Extensions.Logging.Configuration.dll",
+ "lib/net7.0/Microsoft.Extensions.Logging.Configuration.xml",
+ "lib/net8.0/Microsoft.Extensions.Logging.Configuration.dll",
+ "lib/net8.0/Microsoft.Extensions.Logging.Configuration.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Configuration.xml",
+ "microsoft.extensions.logging.configuration.8.0.0.nupkg.sha512",
+ "microsoft.extensions.logging.configuration.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Logging.Console/8.0.0": {
+ "sha512": "e+48o7DztoYog+PY430lPxrM4mm3PbA6qucvQtUDDwVo4MO+ejMw7YGc/o2rnxbxj4isPxdfKFzTxvXMwAz83A==",
+ "type": "package",
+ "path": "microsoft.extensions.logging.console/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Logging.Console.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Logging.Console.targets",
+ "lib/net462/Microsoft.Extensions.Logging.Console.dll",
+ "lib/net462/Microsoft.Extensions.Logging.Console.xml",
+ "lib/net6.0/Microsoft.Extensions.Logging.Console.dll",
+ "lib/net6.0/Microsoft.Extensions.Logging.Console.xml",
+ "lib/net7.0/Microsoft.Extensions.Logging.Console.dll",
+ "lib/net7.0/Microsoft.Extensions.Logging.Console.xml",
+ "lib/net8.0/Microsoft.Extensions.Logging.Console.dll",
+ "lib/net8.0/Microsoft.Extensions.Logging.Console.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Console.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Logging.Console.xml",
+ "microsoft.extensions.logging.console.8.0.0.nupkg.sha512",
+ "microsoft.extensions.logging.console.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Options/8.0.0": {
+ "sha512": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==",
+ "type": "package",
+ "path": "microsoft.extensions.options/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "analyzers/dotnet/roslyn4.4/cs/Microsoft.Extensions.Options.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn4.4/cs/cs/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/de/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/es/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/fr/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/it/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ja/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ko/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pl/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pt-BR/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ru/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/tr/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hans/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hant/Microsoft.Extensions.Options.SourceGeneration.resources.dll",
+ "buildTransitive/net461/Microsoft.Extensions.Options.targets",
+ "buildTransitive/net462/Microsoft.Extensions.Options.targets",
+ "buildTransitive/net6.0/Microsoft.Extensions.Options.targets",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Options.targets",
+ "buildTransitive/netstandard2.0/Microsoft.Extensions.Options.targets",
+ "lib/net462/Microsoft.Extensions.Options.dll",
+ "lib/net462/Microsoft.Extensions.Options.xml",
+ "lib/net6.0/Microsoft.Extensions.Options.dll",
+ "lib/net6.0/Microsoft.Extensions.Options.xml",
+ "lib/net7.0/Microsoft.Extensions.Options.dll",
+ "lib/net7.0/Microsoft.Extensions.Options.xml",
+ "lib/net8.0/Microsoft.Extensions.Options.dll",
+ "lib/net8.0/Microsoft.Extensions.Options.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Options.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Options.xml",
+ "lib/netstandard2.1/Microsoft.Extensions.Options.dll",
+ "lib/netstandard2.1/Microsoft.Extensions.Options.xml",
+ "microsoft.extensions.options.8.0.0.nupkg.sha512",
+ "microsoft.extensions.options.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Options.ConfigurationExtensions/8.0.0": {
+ "sha512": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==",
+ "type": "package",
+ "path": "microsoft.extensions.options.configurationextensions/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Options.ConfigurationExtensions.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Options.ConfigurationExtensions.targets",
+ "lib/net462/Microsoft.Extensions.Options.ConfigurationExtensions.dll",
+ "lib/net462/Microsoft.Extensions.Options.ConfigurationExtensions.xml",
+ "lib/net6.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll",
+ "lib/net6.0/Microsoft.Extensions.Options.ConfigurationExtensions.xml",
+ "lib/net7.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll",
+ "lib/net7.0/Microsoft.Extensions.Options.ConfigurationExtensions.xml",
+ "lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll",
+ "lib/net8.0/Microsoft.Extensions.Options.ConfigurationExtensions.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Options.ConfigurationExtensions.xml",
+ "microsoft.extensions.options.configurationextensions.8.0.0.nupkg.sha512",
+ "microsoft.extensions.options.configurationextensions.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.Extensions.Primitives/8.0.0": {
+ "sha512": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==",
+ "type": "package",
+ "path": "microsoft.extensions.primitives/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/Microsoft.Extensions.Primitives.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/Microsoft.Extensions.Primitives.targets",
+ "lib/net462/Microsoft.Extensions.Primitives.dll",
+ "lib/net462/Microsoft.Extensions.Primitives.xml",
+ "lib/net6.0/Microsoft.Extensions.Primitives.dll",
+ "lib/net6.0/Microsoft.Extensions.Primitives.xml",
+ "lib/net7.0/Microsoft.Extensions.Primitives.dll",
+ "lib/net7.0/Microsoft.Extensions.Primitives.xml",
+ "lib/net8.0/Microsoft.Extensions.Primitives.dll",
+ "lib/net8.0/Microsoft.Extensions.Primitives.xml",
+ "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll",
+ "lib/netstandard2.0/Microsoft.Extensions.Primitives.xml",
+ "microsoft.extensions.primitives.8.0.0.nupkg.sha512",
+ "microsoft.extensions.primitives.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "Microsoft.NET.ILLink.Analyzers/7.0.100-1.23211.1": {
+ "sha512": "0GvbEgDGcUQA9KuWcQU1WwYHXt1tBzNr1Nls/M57rM7NA/AndFwCaCEoJpJkmxRY7xLlPDBnmGp8h5+FNqUngg==",
+ "type": "package",
+ "path": "microsoft.net.illink.analyzers/7.0.100-1.23211.1",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "analyzers/dotnet/cs/ILLink.CodeFixProvider.dll",
+ "analyzers/dotnet/cs/ILLink.RoslynAnalyzer.dll",
+ "build/Microsoft.NET.ILLink.Analyzers.props",
+ "microsoft.net.illink.analyzers.7.0.100-1.23211.1.nupkg.sha512",
+ "microsoft.net.illink.analyzers.nuspec"
+ ]
+ },
+ "Microsoft.NET.ILLink.Tasks/7.0.100-1.23211.1": {
+ "sha512": "tvG8XZYLjT0o3WicCyKBZysVWo1jC9HdCFmNRmddx3WbAz0UCsd0qKZqpiEo99VLA8Re+FzWK51OcRldQPbt2Q==",
+ "type": "package",
+ "path": "microsoft.net.illink.tasks/7.0.100-1.23211.1",
+ "hasTools": true,
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "Sdk/Sdk.props",
+ "build/6.0_suppressions.xml",
+ "build/Microsoft.NET.ILLink.Tasks.props",
+ "build/Microsoft.NET.ILLink.targets",
+ "microsoft.net.illink.tasks.7.0.100-1.23211.1.nupkg.sha512",
+ "microsoft.net.illink.tasks.nuspec",
+ "tools/net472/ILLink.Tasks.dll",
+ "tools/net472/Mono.Cecil.dll",
+ "tools/net472/System.Buffers.dll",
+ "tools/net472/System.Collections.Immutable.dll",
+ "tools/net472/System.Memory.dll",
+ "tools/net472/System.Numerics.Vectors.dll",
+ "tools/net472/System.Reflection.Metadata.dll",
+ "tools/net472/System.Runtime.CompilerServices.Unsafe.dll",
+ "tools/net7.0/ILLink.Tasks.deps.json",
+ "tools/net7.0/ILLink.Tasks.dll",
+ "tools/net7.0/Mono.Cecil.Pdb.dll",
+ "tools/net7.0/Mono.Cecil.dll",
+ "tools/net7.0/illink.deps.json",
+ "tools/net7.0/illink.dll",
+ "tools/net7.0/illink.runtimeconfig.json"
+ ]
+ },
+ "NReco.Logging.File/1.2.1": {
+ "sha512": "DuGBOw5uIvrT/iH0pTBJaUxn6Y0kGGj83HMMwPgt+3B6HGUz3l+NjFgP6LgMdNLU72G4C8E6e7lB0qIoLz+/RQ==",
+ "type": "package",
+ "path": "nreco.logging.file/1.2.1",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "lib/net6.0/NReco.Logging.File.dll",
+ "lib/net6.0/NReco.Logging.File.xml",
+ "lib/net8.0/NReco.Logging.File.dll",
+ "lib/net8.0/NReco.Logging.File.xml",
+ "lib/netstandard2.0/NReco.Logging.File.dll",
+ "lib/netstandard2.0/NReco.Logging.File.xml",
+ "nreco.logging.file.1.2.1.nupkg.sha512",
+ "nreco.logging.file.nuspec"
+ ]
+ },
+ "System.Runtime.CompilerServices.Unsafe/6.0.0": {
+ "sha512": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
+ "type": "package",
+ "path": "system.runtime.compilerservices.unsafe/6.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.targets",
+ "buildTransitive/netcoreapp3.1/_._",
+ "lib/net461/System.Runtime.CompilerServices.Unsafe.dll",
+ "lib/net461/System.Runtime.CompilerServices.Unsafe.xml",
+ "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll",
+ "lib/net6.0/System.Runtime.CompilerServices.Unsafe.xml",
+ "lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.dll",
+ "lib/netcoreapp3.1/System.Runtime.CompilerServices.Unsafe.xml",
+ "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
+ "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
+ "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
+ "system.runtime.compilerservices.unsafe.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "System.Security.Principal.Windows/5.0.0": {
+ "sha512": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
+ "type": "package",
+ "path": "system.security.principal.windows/5.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "lib/net46/System.Security.Principal.Windows.dll",
+ "lib/net461/System.Security.Principal.Windows.dll",
+ "lib/net461/System.Security.Principal.Windows.xml",
+ "lib/netstandard1.3/System.Security.Principal.Windows.dll",
+ "lib/netstandard2.0/System.Security.Principal.Windows.dll",
+ "lib/netstandard2.0/System.Security.Principal.Windows.xml",
+ "lib/uap10.0.16299/_._",
+ "ref/net46/System.Security.Principal.Windows.dll",
+ "ref/net461/System.Security.Principal.Windows.dll",
+ "ref/net461/System.Security.Principal.Windows.xml",
+ "ref/netcoreapp3.0/System.Security.Principal.Windows.dll",
+ "ref/netcoreapp3.0/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/System.Security.Principal.Windows.dll",
+ "ref/netstandard1.3/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/de/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/es/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/fr/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/it/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/ja/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/ko/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/ru/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/zh-hans/System.Security.Principal.Windows.xml",
+ "ref/netstandard1.3/zh-hant/System.Security.Principal.Windows.xml",
+ "ref/netstandard2.0/System.Security.Principal.Windows.dll",
+ "ref/netstandard2.0/System.Security.Principal.Windows.xml",
+ "ref/uap10.0.16299/_._",
+ "runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
+ "runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
+ "runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
+ "runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
+ "runtimes/win/lib/net46/System.Security.Principal.Windows.dll",
+ "runtimes/win/lib/net461/System.Security.Principal.Windows.dll",
+ "runtimes/win/lib/net461/System.Security.Principal.Windows.xml",
+ "runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
+ "runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
+ "runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
+ "runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
+ "runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll",
+ "runtimes/win/lib/uap10.0.16299/_._",
+ "system.security.principal.windows.5.0.0.nupkg.sha512",
+ "system.security.principal.windows.nuspec",
+ "useSharedDesignerContext.txt",
+ "version.txt"
+ ]
+ },
+ "System.Text.Encodings.Web/8.0.0": {
+ "sha512": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==",
+ "type": "package",
+ "path": "system.text.encodings.web/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "THIRD-PARTY-NOTICES.TXT",
+ "buildTransitive/net461/System.Text.Encodings.Web.targets",
+ "buildTransitive/net462/_._",
+ "buildTransitive/net6.0/_._",
+ "buildTransitive/netcoreapp2.0/System.Text.Encodings.Web.targets",
+ "lib/net462/System.Text.Encodings.Web.dll",
+ "lib/net462/System.Text.Encodings.Web.xml",
+ "lib/net6.0/System.Text.Encodings.Web.dll",
+ "lib/net6.0/System.Text.Encodings.Web.xml",
+ "lib/net7.0/System.Text.Encodings.Web.dll",
+ "lib/net7.0/System.Text.Encodings.Web.xml",
+ "lib/net8.0/System.Text.Encodings.Web.dll",
+ "lib/net8.0/System.Text.Encodings.Web.xml",
+ "lib/netstandard2.0/System.Text.Encodings.Web.dll",
+ "lib/netstandard2.0/System.Text.Encodings.Web.xml",
+ "runtimes/browser/lib/net6.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net6.0/System.Text.Encodings.Web.xml",
+ "runtimes/browser/lib/net7.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net7.0/System.Text.Encodings.Web.xml",
+ "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll",
+ "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.xml",
+ "system.text.encodings.web.8.0.0.nupkg.sha512",
+ "system.text.encodings.web.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "System.Text.Json/8.0.0": {
+ "sha512": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==",
+ "type": "package",
+ "path": "system.text.json/8.0.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "Icon.png",
+ "LICENSE.TXT",
+ "PACKAGE.md",
+ "THIRD-PARTY-NOTICES.TXT",
+ "analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn3.11/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn3.11/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn4.0/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.0/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/System.Text.Json.SourceGeneration.dll",
+ "analyzers/dotnet/roslyn4.4/cs/cs/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/de/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/es/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/fr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/it/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ja/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ko/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pl/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/pt-BR/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/ru/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/tr/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hans/System.Text.Json.SourceGeneration.resources.dll",
+ "analyzers/dotnet/roslyn4.4/cs/zh-Hant/System.Text.Json.SourceGeneration.resources.dll",
+ "buildTransitive/net461/System.Text.Json.targets",
+ "buildTransitive/net462/System.Text.Json.targets",
+ "buildTransitive/net6.0/System.Text.Json.targets",
+ "buildTransitive/netcoreapp2.0/System.Text.Json.targets",
+ "buildTransitive/netstandard2.0/System.Text.Json.targets",
+ "lib/net462/System.Text.Json.dll",
+ "lib/net462/System.Text.Json.xml",
+ "lib/net6.0/System.Text.Json.dll",
+ "lib/net6.0/System.Text.Json.xml",
+ "lib/net7.0/System.Text.Json.dll",
+ "lib/net7.0/System.Text.Json.xml",
+ "lib/net8.0/System.Text.Json.dll",
+ "lib/net8.0/System.Text.Json.xml",
+ "lib/netstandard2.0/System.Text.Json.dll",
+ "lib/netstandard2.0/System.Text.Json.xml",
+ "system.text.json.8.0.0.nupkg.sha512",
+ "system.text.json.nuspec",
+ "useSharedDesignerContext.txt"
+ ]
+ },
+ "CastleLibrary/1.0.0": {
+ "type": "project",
+ "path": "../CastleLibrary/CastleLibrary.csproj",
+ "msbuildProject": "../CastleLibrary/CastleLibrary.csproj"
+ },
+ "CustomLogger/1.0.0": {
+ "type": "project",
+ "path": "../CustomLogger/CustomLogger.csproj",
+ "msbuildProject": "../CustomLogger/CustomLogger.csproj"
+ },
+ "EndianTools/1.0.0": {
+ "type": "project",
+ "path": "../EndianTools/EndianTools.csproj",
+ "msbuildProject": "../EndianTools/EndianTools.csproj"
+ }
+ },
+ "projectFileDependencyGroups": {
+ "net6.0": [
+ "CastleLibrary >= 1.0.0",
+ "Microsoft.NET.ILLink.Analyzers >= 7.0.100-1.23211.1",
+ "Microsoft.NET.ILLink.Tasks >= 7.0.100-1.23211.1"
+ ]
+ },
+ "packageFolders": {
+ "C:\\Users\\Mack\\.nuget\\packages\\": {},
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj",
+ "projectName": "XI5",
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj",
+ "packagesPath": "C:\\Users\\Mack\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Mack\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "net6.0"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "projectReferences": {
+ "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj": {
+ "projectPath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\CastleLibrary\\CastleLibrary.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net6.0": {
+ "targetAlias": "net6.0",
+ "dependencies": {
+ "Microsoft.NET.ILLink.Analyzers": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ },
+ "Microsoft.NET.ILLink.Tasks": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[7.0.100-1.23211.1, )",
+ "autoReferenced": true
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.102\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BackendServices/CastleLibrary/XI5/obj/project.nuget.cache b/BackendServices/CastleLibrary/XI5/obj/project.nuget.cache
new file mode 100644
index 000000000..c9a70c8d0
--- /dev/null
+++ b/BackendServices/CastleLibrary/XI5/obj/project.nuget.cache
@@ -0,0 +1,29 @@
+{
+ "version": 2,
+ "dgSpecHash": "49k8UCaSTGH6VC6GKMPkXtbJto18oMnarnPxyRYOs3Kyq4wKaWy+4wVwyeU/Iw9qbyNQ/HrJr5zn6NQQAdhIWQ==",
+ "success": true,
+ "projectFilePath": "C:\\Users\\Mack\\Desktop\\MultiServer3-NextGenHorizon-P2P-Fixed\\BackendServices\\XI5\\XI5.csproj",
+ "expectedPackageFiles": [
+ "C:\\Users\\Mack\\.nuget\\packages\\figgle\\0.5.1\\figgle.0.5.1.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.configuration\\8.0.0\\microsoft.extensions.configuration.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\8.0.0\\microsoft.extensions.configuration.abstractions.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.configuration.binder\\8.0.0\\microsoft.extensions.configuration.binder.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\8.0.0\\microsoft.extensions.dependencyinjection.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\8.0.0\\microsoft.extensions.dependencyinjection.abstractions.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.logging\\8.0.0\\microsoft.extensions.logging.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\8.0.0\\microsoft.extensions.logging.abstractions.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.logging.configuration\\8.0.0\\microsoft.extensions.logging.configuration.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.logging.console\\8.0.0\\microsoft.extensions.logging.console.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.options\\8.0.0\\microsoft.extensions.options.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\8.0.0\\microsoft.extensions.options.configurationextensions.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.extensions.primitives\\8.0.0\\microsoft.extensions.primitives.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.net.illink.analyzers\\7.0.100-1.23211.1\\microsoft.net.illink.analyzers.7.0.100-1.23211.1.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\microsoft.net.illink.tasks\\7.0.100-1.23211.1\\microsoft.net.illink.tasks.7.0.100-1.23211.1.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\nreco.logging.file\\1.2.1\\nreco.logging.file.1.2.1.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\system.text.encodings.web\\8.0.0\\system.text.encodings.web.8.0.0.nupkg.sha512",
+ "C:\\Users\\Mack\\.nuget\\packages\\system.text.json\\8.0.0\\system.text.json.8.0.0.nupkg.sha512"
+ ],
+ "logs": []
+}
\ No newline at end of file
From 9e48d415d81a433d4e26d091fae5bb7f7d7b574b Mon Sep 17 00:00:00 2001
From: score3229 <49077373+score3229@users.noreply.github.com>
Date: Mon, 26 May 2025 18:22:18 -0400
Subject: [PATCH 02/14] Add files via upload
---
Servers/SSFWServer/SSFWLogin.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Servers/SSFWServer/SSFWLogin.cs b/Servers/SSFWServer/SSFWLogin.cs
index e30010d0e..453fc4585 100644
--- a/Servers/SSFWServer/SSFWLogin.cs
+++ b/Servers/SSFWServer/SSFWLogin.cs
@@ -166,7 +166,7 @@ public SSFWLogin(string XHomeClientVersion, string generalsecret, string homeCli
extractedData[i] = 0x48;
}
- XI5Ticket ticket = new XI5Ticket(ticketBuffer);
+ XI5Ticket ticket = XI5Ticket.ReadFromBytes(ticketBuffer);
if (ByteUtils.FindBytePattern(ticketBuffer, new byte[] { 0x52, 0x50, 0x43, 0x4E }, 184) != -1)
{
@@ -233,7 +233,7 @@ public SSFWLogin(string XHomeClientVersion, string generalsecret, string homeCli
if (!string.IsNullOrEmpty(UserNames.Item1) && !SSFWServerConfiguration.SSFWCrossSave) // RPCN confirmed.
{
- SSFWUserSessionManager.RegisterUser(UserNames.Item1, SessionIDs.Item1!, ResultStrings.Item1!, ticket.OnlineId.Length);
+ SSFWUserSessionManager.RegisterUser(UserNames.Item1, SessionIDs.Item1!, ResultStrings.Item1!, ticket.Username.Length);
if (SSFWAccountManagement.AccountExists(UserNames.Item2, SessionIDs.Item2))
SSFWAccountManagement.CopyAccountProfile(UserNames.Item2, UserNames.Item1, SessionIDs.Item2, SessionIDs.Item1!, key);
@@ -244,7 +244,7 @@ public SSFWLogin(string XHomeClientVersion, string generalsecret, string homeCli
{
IsRPCN = false;
- SSFWUserSessionManager.RegisterUser(UserNames.Item2, SessionIDs.Item2, ResultStrings.Item2, ticket.OnlineId.Length);
+ SSFWUserSessionManager.RegisterUser(UserNames.Item2, SessionIDs.Item2, ResultStrings.Item2, ticket.Username.Length);
}
int logoncount = SSFWAccountManagement.ReadOrMigrateAccount(extractedData, IsRPCN ? UserNames.Item1 : UserNames.Item2, IsRPCN ? SessionIDs.Item1 : SessionIDs.Item2, key);
From 13230cef5f80166524fcffc76ae98e6f4f177f2e Mon Sep 17 00:00:00 2001
From: score3229 <49077373+score3229@users.noreply.github.com>
Date: Mon, 26 May 2025 18:23:12 -0400
Subject: [PATCH 03/14] Add files via upload
---
Servers/Horizon/SERVER/Medius/MAS.cs | 6659 +++++++++++++-------------
1 file changed, 3316 insertions(+), 3343 deletions(-)
diff --git a/Servers/Horizon/SERVER/Medius/MAS.cs b/Servers/Horizon/SERVER/Medius/MAS.cs
index 559e289f9..1a7a80986 100644
--- a/Servers/Horizon/SERVER/Medius/MAS.cs
+++ b/Servers/Horizon/SERVER/Medius/MAS.cs
@@ -1,3343 +1,3316 @@
-using CustomLogger;
-using DotNetty.Transport.Channels;
-using Horizon.RT.Common;
-using Horizon.RT.Cryptography;
-using Horizon.RT.Cryptography.RSA;
-using Horizon.RT.Models;
-using Horizon.LIBRARY.Common;
-using Horizon.SERVER.Config;
-using Horizon.SERVER.PluginArgs;
-using Horizon.PluginManager;
-using System.Net;
-using Horizon.LIBRARY.Database.Models;
-using Newtonsoft.Json.Linq;
-using System.Globalization;
-using System.Text;
-using Horizon.HTTPSERVICE;
-using System.Buffers;
-using NetworkLibrary.Extension;
-using XI5;
-using EndianTools;
-using Horizon.MUM.Models;
-using Horizon.SERVER.Extension.PlayStationHome;
-
-namespace Horizon.SERVER.Medius
-{
- public class MAS : BaseMediusComponent
- {
- public override int TCPPort => MediusClass.Settings.MASPort;
- public override int UDPPort => 00000;
-
- public static ServerSettings Settings = new();
-
- public MAS()
- {
-
- }
-
- public static void ReserveClient(ClientObject client)
- {
- MediusClass.Manager.AddClient(client);
- }
-
- protected override async Task ProcessMessage(BaseScertMessage message, IChannel clientChannel, ChannelData data)
- {
- // Get ScertClient data
- var scertClient = clientChannel.GetAttribute(LIBRARY.Pipeline.Constants.SCERT_CLIENT).Get();
- var enableEncryption = MediusClass.GetAppSettingsOrDefault(data.ApplicationId).EnableEncryption;
- if (scertClient.CipherService != null)
- scertClient.CipherService.EnableEncryption = enableEncryption;
-
- switch (message)
- {
- case RT_MSG_CLIENT_HELLO clientHello:
- {
- // send hello
- Queue(new RT_MSG_SERVER_HELLO() { RsaPublicKey = enableEncryption ? MediusClass.Settings.DefaultKey.N : Org.BouncyCastle.Math.BigInteger.Zero }, clientChannel);
- break;
- }
- case RT_MSG_CLIENT_CRYPTKEY_PUBLIC clientCryptKeyPublic:
- {
- if (clientCryptKeyPublic.PublicKey != null)
- {
- // generate new client session key
- scertClient.CipherService?.GenerateCipher(CipherContext.RSA_AUTH, clientCryptKeyPublic.PublicKey.Reverse().ToArray());
- scertClient.CipherService?.GenerateCipher(CipherContext.RC_CLIENT_SESSION);
-
- Queue(new RT_MSG_SERVER_CRYPTKEY_PEER() { SessionKey = scertClient.CipherService?.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
- }
- break;
- }
- case RT_MSG_CLIENT_CONNECT_TCP clientConnectTcp:
- {
- #region Check if AppId from Client matches Server
- if (!MediusClass.Manager.IsAppIdSupported(clientConnectTcp.AppId))
- {
- LoggerAccessor.LogError($"Client {clientChannel.RemoteAddress} attempting to authenticate with incompatible app id {clientConnectTcp.AppId}");
- await clientChannel.CloseAsync();
- return;
- }
- #endregion
-
- List pre108ServerComplete = new() { 10114, 10130, 10164, 10190, 10124, 10284, 10330, 10334, 10414, 10421, 10442, 10538, 10540, 10550, 10582, 10584, 10680, 10681, 10683, 10684, 10724 };
-
- ///
- /// Some do not post-108 so we have to account for those too!
- /// tmheadon 10694 does not for initial
- ///
- List post108ServerComplete = new() { 10694 };
-
- data.ApplicationId = clientConnectTcp.AppId;
- scertClient.ApplicationID = clientConnectTcp.AppId;
-
- Channel? targetChannel = MediusClass.Manager.GetChannelByChannelId(clientConnectTcp.TargetWorldId, data.ApplicationId);
-
- if (targetChannel == null)
- {
- Channel DefaultChannel = MediusClass.Manager.GetOrCreateDefaultLobbyChannel(data.ApplicationId, scertClient.MediusVersion ?? 0);
-
- if (DefaultChannel.Id == clientConnectTcp.TargetWorldId)
- targetChannel = DefaultChannel;
-
- if (targetChannel == null)
- {
- LoggerAccessor.LogError($"[MAS] - Client: {clientConnectTcp.AccessToken} tried to join, but targetted WorldId:{clientConnectTcp.TargetWorldId} doesn't exist!");
- await clientChannel.CloseAsync();
- break;
- }
- }
-
- // If booth are null, it means MAS client wants a new object.
- if (!string.IsNullOrEmpty(clientConnectTcp.AccessToken) && !string.IsNullOrEmpty(clientConnectTcp.SessionKey))
- {
- data.ClientObject = MediusClass.Manager.GetClientByAccessToken(clientConnectTcp.AccessToken, clientConnectTcp.AppId);
- if (data.ClientObject == null)
- data.ClientObject = MediusClass.Manager.GetClientBySessionKey(clientConnectTcp.SessionKey, clientConnectTcp.AppId);
-
- if (data.ClientObject != null)
- LoggerAccessor.LogInfo($"[MAS] - Client Connected {clientChannel.RemoteAddress}!");
- else
- {
- data.Ignore = true;
- LoggerAccessor.LogError($"[MAS] - ClientObject could not be granted for {clientChannel.RemoteAddress}: {clientConnectTcp}");
- break;
- }
-
- data.ClientObject.MediusVersion = scertClient.MediusVersion ?? 0;
- data.ClientObject.ApplicationId = clientConnectTcp.AppId;
- data.ClientObject.OnConnected();
- }
- else
- {
- LoggerAccessor.LogInfo($"[MAS] - Client Connected {clientChannel.RemoteAddress} with new ClientObject!");
-
- data.ClientObject = new(scertClient.MediusVersion ?? 0)
- {
- ApplicationId = clientConnectTcp.AppId
- };
- data.ClientObject.OnConnected();
-
- ReserveClient(data.ClientObject); // ONLY RESERVE CLIENTS HERE!
- }
-
- await data.ClientObject.JoinChannel(targetChannel);
-
- #region if PS3
- if (scertClient.IsPS3Client)
- {
- List ConnectAcceptTCPGames = new() { 20623, 20624, 21564, 21574, 21584, 21594, 22274, 22284, 22294, 22304, 20040, 20041, 20042, 20043, 20044 };
-
- //CAC & Warhawk
- if (ConnectAcceptTCPGames.Contains(scertClient.ApplicationID))
- {
- Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
- {
- PlayerId = 0,
- ScertId = GenerateNewScertClientId(),
- PlayerCount = 0x0001,
- IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
- }, clientChannel);
- }
- else
- Queue(new RT_MSG_SERVER_CONNECT_REQUIRE(), clientChannel);
- }
- #endregion
- else if (scertClient.MediusVersion > 108 && scertClient.ApplicationID != 11484)
- Queue(new RT_MSG_SERVER_CONNECT_REQUIRE(), clientChannel);
- else
- {
- //Older Medius titles do NOT use CRYPTKEY_GAME, newer ones have this.
- if (scertClient.CipherService != null && scertClient.CipherService.HasKey(CipherContext.RC_CLIENT_SESSION) && scertClient.MediusVersion >= 109)
- Queue(new RT_MSG_SERVER_CRYPTKEY_GAME() { GameKey = scertClient.CipherService.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
- Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
- {
- PlayerId = 0,
- ScertId = GenerateNewScertClientId(),
- PlayerCount = 0x0001,
- IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
- }, clientChannel);
-
- if (pre108ServerComplete.Contains(data.ApplicationId) || post108ServerComplete.Contains(data.ApplicationId))
- Queue(new RT_MSG_SERVER_CONNECT_COMPLETE() { ClientCountAtConnect = 0x0001 }, clientChannel);
- }
-
- if (MediusClass.Settings.HttpsSVOCheckPatcher)
- {
- switch (data.ApplicationId)
- {
- case 20371:
- CheatQuery(0x10085d80, 6, clientChannel); // PS Home 1.50 Beta
- break;
- case 20384:
- CheatQuery(0x008625b0, 6, clientChannel); // SingStar Vol3 Retail
- CheatQuery(0x00b96850, 6, clientChannel); // SingStar Starter Pack
- break;
- case 21354:
- CheatQuery(0x008625E0, 6, clientChannel); // SingStar Hits v1.00
- break;
- case 21574:
- CheatQuery(0x0070c068, 6, clientChannel); // Warhawk EU v1.50
- break;
- case 21564:
- CheatQuery(0x0070BFF8, 6, clientChannel); // Warhawk US v1.50
- break;
- case 22924:
- CheatQuery(0x00df0008, 6, clientChannel); // Starhawk v1.4 Retail
- break;
- }
- }
-
- if (data.ApplicationId == 20371 || data.ApplicationId == 20374)
- CheatQuery(0x00010000, 512000, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_SHA1_HASH, unchecked((int)0xDEADBEEF));
-
- PokePatch(clientChannel, data);
-
- break;
- }
-
- case RT_MSG_SERVER_CHEAT_QUERY clientCheatQuery:
- {
- byte[]? QueryData = clientCheatQuery.Data;
-
- if (QueryData != null)
- {
- LoggerAccessor.LogDebug($"[MAS] - QUERY CHECK - Client:{data.ClientObject?.IP} Has Data:{QueryData.ToHexString()} in offset: {clientCheatQuery.StartAddress}");
-
- if (MediusClass.Settings.HttpsSVOCheckPatcher && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 6
- && QueryData.EqualsTo(new byte[] { 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A }))
- PatchHttpsSVOCheck(clientCheatQuery.StartAddress + 4, clientChannel);
-
- if (data.ApplicationId == 20371 || data.ApplicationId == 20374)
- {
- if (data.ClientObject?.ClientHomeData != null)
- {
- switch (data.ClientObject.ClientHomeData.Type)
- {
- case "HDK With Offline":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- switch (clientCheatQuery.StartAddress)
- {
- case 0x005478dc:
- // 4096 character command line limit.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
- {
- PokeAddress(0x005478dc, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
- PokeAddress(0x00548378, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
- }
- break;
- case 0x1054e5c0:
- // Sets WorldCorePointer.
- if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
- data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
- break;
- case 0x0016cc6c:
- // Patches out the forceInvite command.
- if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
- PokeAddress(0x0016cc6c, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
- break;
- }
- break;
- default:
- break;
- }
- break;
- case "HDK Online Only":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- default:
- break;
- }
- break;
- case "HDK Online Only (Dbg Symbols)":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.82.09":
- switch (clientCheatQuery.StartAddress)
- {
- case 0x00531370:
- // 4096 character command line limit.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
- {
- PokeAddress(0x00531370, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
- PokeAddress(0x00531e08, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
- }
- break;
- case 0x1053e160:
- // Sets WorldCorePointer.
- if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
- data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
- break;
- case 0x0016b4d0:
- // Patches out the forceInvite command.
- if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
- PokeAddress(0x0016b4d0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
- break;
- }
- break;
- default:
- break;
- }
- break;
- case "Online Debug":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.83.12":
- switch (clientCheatQuery.StartAddress)
- {
- case 0x00548bc0:
- // 4096 character command line limit.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
- {
- PokeAddress(0x00548bc0, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
- PokeAddress(0x0054964c, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
- }
- break;
- case 0x1054e1c0:
- // Sets WorldCorePointer.
- if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
- data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
- break;
- case 0x001709e0:
- // Patches out the forceInvite command.
- if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
- PokeAddress(0x001709e0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
- break;
- }
- break;
- case "01.86.09":
- switch (clientCheatQuery.StartAddress)
- {
- case 0x00555cb4:
- // 4096 character command line limit.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
- {
- PokeAddress(0x00555cb4, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
- PokeAddress(0x00556740, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
- }
- break;
- case 0x1054e358:
- // Sets WorldCorePointer.
- if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
- data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
- break;
- case 0x0016dac0:
- // Patches out the forceInvite command.
- if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
- PokeAddress(0x0016dac0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
- break;
- }
- break;
- default:
- break;
- }
- break;
- case "Retail":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- switch (clientCheatQuery.StartAddress)
- {
- case 0x006f59b8:
- // Grant PS Plus for 1.86 retail.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x54, 0x63, 0xd9, 0x7e }))
- {
- byte[] liPatch = new byte[] { 0x38, 0x60, 0x00, 0x01 };
- PokeAddress(0x006f59b8, liPatch, clientChannel);
- PokeAddress(0x0073bdb0, liPatch, clientChannel);
- }
- break;
- case 0x002aa960:
- // Disable SSFW Reward check for 1.86 retail.
- if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x7c, 0x65, 0x1b, 0x78 }))
- PokeAddress(0x002aa960, new byte[] { 0x48, 0x40, 0xe2, 0x2c }, clientChannel);
- break;
- case 0x105c24c8:
- // Sets WorldCorePointer.
- if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
- data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
- break;
- }
- break;
- default:
- break;
- }
- break;
- }
- }
-
- switch (clientCheatQuery.SequenceId)
- {
- case int.MinValue:
- if (data.ClientObject != null)
- data.ClientObject.SSFWid = Encoding.ASCII.GetString(clientCheatQuery.Data);
- break;
- case -559038737:
- switch (clientCheatQuery.StartAddress)
- {
- case 65536:
- if (data.ClientObject != null)
- {
- if (data.ClientObject.ClientHomeData == null)
- data.ClientObject.ClientHomeData = MediusClass.HomeOffsetsList.Where(x => !string.IsNullOrEmpty(x.Sha1Hash) && x.Sha1Hash[..^8]
- .Equals(clientCheatQuery.Data.ToHexString(), StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
-
- if (data.ClientObject.ClientHomeData != null)
- {
- switch (data.ClientObject.ClientHomeData.Type)
- {
- case "HDK With Offline":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- CheatQuery(0x10244430, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
- break;
- default:
- break;
- }
- break;
- case "HDK Online Only":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- default:
- break;
- }
- break;
- case "HDK Online Only (Dbg Symbols)":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.82.09":
- CheatQuery(0x10234440, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
- break;
- default:
- break;
- }
- break;
- case "Online Debug":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.83.12":
- CheatQuery(0x10244439, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
- break;
- case "01.86.09":
- CheatQuery(0x10244428, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
- break;
- default:
- break;
- }
- break;
- case "Retail":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- CheatQuery(0x101555f0, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
- break;
- default:
- break;
- }
- break;
- }
- }
- else if (!MediusClass.Settings.PlaystationHomeAllowAnyEboot)
- {
- string anticheatMsg = $"[SECURITY] - HOME ANTI-CHEAT - DETECTED UNKNOWN EBOOT - User:{data.ClientObject.IP + ":" + data.ClientObject.AccountName} CID:{data.MachineId}";
-
- _ = data.ClientObject.CurrentChannel?.BroadcastSystemMessage(data.ClientObject.CurrentChannel.LocalClients.Where(x => x != data.ClientObject), anticheatMsg, byte.MaxValue);
-
- LoggerAccessor.LogError(anticheatMsg);
-
- await HorizonServerConfiguration.Database.BanIp(data.ClientObject.IP).ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result)
- {
- // Banned
- QueueBanMessage(data);
- }
- data.ClientObject.ForceDisconnect();
- _ = data.ClientObject.Logout();
- });
- }
- }
- break;
- }
- break;
- }
- }
- }
- break;
- }
-
- case RT_MSG_CLIENT_CONNECT_READY_REQUIRE clientConnectReadyRequire:
- {
- if (scertClient.CipherService != null && scertClient.CipherService.HasKey(CipherContext.RC_CLIENT_SESSION) && !scertClient.IsPS3Client)
- Queue(new RT_MSG_SERVER_CRYPTKEY_GAME() { GameKey = scertClient.CipherService.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
- Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
- {
- PlayerId = 0,
- ScertId = GenerateNewScertClientId(),
- PlayerCount = 0x0001,
- IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
- }, clientChannel);
- break;
- }
-
- case RT_MSG_CLIENT_CONNECT_READY_TCP clientConnectReadyTcp:
- {
- Queue(new RT_MSG_SERVER_CONNECT_COMPLETE() { ClientCountAtConnect = 0x0001 }, clientChannel);
-
- if (scertClient.MediusVersion > 108)
- Queue(new RT_MSG_SERVER_ECHO(), clientChannel);
- break;
- }
-
- #region Echos
- case RT_MSG_SERVER_ECHO serverEchoReply:
- {
-
- break;
- }
- case RT_MSG_CLIENT_ECHO clientEcho:
- {
- Queue(new RT_MSG_CLIENT_ECHO() { Value = clientEcho.Value }, clientChannel);
- break;
- }
- #endregion
-
- case RT_MSG_CLIENT_APP_TOSERVER clientAppToServer:
- {
- if (clientAppToServer.Message != null)
- await ProcessMediusMessage(clientAppToServer.Message, clientChannel, data);
- break;
- }
-
- #region Client Disconnect
- case RT_MSG_CLIENT_DISCONNECT _:
- {
- //Medius 1.08 (Used on WRC 4) haven't a state
- if (scertClient.MediusVersion > 108)
- data.State = ClientState.DISCONNECTED;
-
- await clientChannel.CloseAsync();
-
- LoggerAccessor.LogInfo($"[MAS] - Client disconnected by request with no specific reason\n");
- break;
- }
- case RT_MSG_CLIENT_DISCONNECT_WITH_REASON clientDisconnectWithReason:
- {
- if (clientDisconnectWithReason.Reason <= RT_MSG_CLIENT_DISCONNECT_REASON.RT_MSG_CLIENT_DISCONNECT_LENGTH_MISMATCH)
- LoggerAccessor.LogInfo($"[MAS] - Disconnected by request with reason of {clientDisconnectWithReason.Reason}\n");
- else
- LoggerAccessor.LogInfo($"[MAS] - Disconnected by request with (application specified) reason of {clientDisconnectWithReason.Reason}\n");
-
- data.State = ClientState.DISCONNECTED;
- await clientChannel.CloseAsync();
- break;
- }
- #endregion
-
- default:
- {
- LoggerAccessor.LogWarn($"UNHANDLED RT MESSAGE: {message}");
- break;
- }
- }
-
- return;
- }
-
- protected virtual async Task ProcessMediusMessage(BaseMediusMessage message, IChannel clientChannel, ChannelData data)
- {
- var scertClient = clientChannel.GetAttribute(LIBRARY.Pipeline.Constants.SCERT_CLIENT).Get();
- if (message == null)
- return;
-
- var appSettings = MediusClass.GetAppSettingsOrDefault(data.ApplicationId);
-
- switch (message)
- {
- #region MGCL - Dme
-
- case MediusServerSessionBeginRequest serverSessionBeginRequest:
- {
- List nonSecure = new() { 10010, 10031 };
-
- if (data.ClientObject != null)
- {
- // MGCL_SEND_FAILED, MGCL_UNSUCCESSFUL
- if (!data.ClientObject.IsConnected)
- {
- data.ClientObject.Queue(new MediusServerSessionBeginResponse()
- {
- MessageID = serverSessionBeginRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_UNSUCCESSFUL
- });
- }
- else
- {
- IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
-
- data.ClientObject.LocationId = serverSessionBeginRequest.LocationID;
- data.ClientObject.ServerType = serverSessionBeginRequest.ServerType;
- data.ClientObject.ServerVersion = serverSessionBeginRequest.ServerVersion;
- data.ClientObject.Port = serverSessionBeginRequest.Port;
- data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
- data.ClientObject.BeginServerSession();
-
- if (nonSecure.Contains(data.ClientObject.ApplicationId))
- {
- // TM:BO Reply unencrypted
- data.ClientObject.Queue(new MediusServerSessionBeginResponse()
- {
- MessageID = serverSessionBeginRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = new RSA_KEY(),
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerUDP
- }
- });
- }
- else
- {
- // Default Reply
- data.ClientObject.Queue(new MediusServerSessionBeginResponse()
- {
- MessageID = serverSessionBeginRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerUDP
- }
- });
- }
-
- data.ClientObject.KeepAliveUntilNextConnection();
- }
- }
- break;
- }
-
- case MediusServerSessionBeginRequest1 serverSessionBeginRequest1:
- {
- if (data.ClientObject != null)
- {
- IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
-
- data.ClientObject.LocationId = serverSessionBeginRequest1.LocationID;
- data.ClientObject.ServerType = serverSessionBeginRequest1.ServerType;
- data.ClientObject.Port = serverSessionBeginRequest1.Port;
- data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
- data.ClientObject.BeginServerSession();
-
- LoggerAccessor.LogInfo($"[MAS] - Registered MGCL client for appid {data.ClientObject.ApplicationId} with access token {data.ClientObject.AccessToken}");
-
- //Send NAT Service
- data.ClientObject.Queue(new MediusServerSessionBeginResponse()
- {
- MessageID = serverSessionBeginRequest1.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerUDP
- }
- });
- }
-
- break;
- }
-
- case MediusServerSessionBeginRequest2 serverSessionBeginRequest2:
- {
- if (data.ClientObject != null)
- {
- IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
-
- data.ClientObject.LocationId = serverSessionBeginRequest2.LocationID;
- data.ClientObject.ServerType = serverSessionBeginRequest2.ServerType;
- data.ClientObject.Port = serverSessionBeginRequest2.Port;
- data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
- data.ClientObject.BeginServerSession();
-
- //Send NAT Service
- data.ClientObject.Queue(new MediusServerSessionBeginResponse()
- {
- MessageID = serverSessionBeginRequest2.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerUDP
- }
- });
- }
-
- break;
- }
-
- case MediusServerAuthenticationRequest mgclAuthRequest:
- {
- List nonSecure = new() { 10010, 10031, 10190 };
-
- if (data.ClientObject != null)
- {
- data.ClientObject.MGCL_TRUST_LEVEL = mgclAuthRequest.TrustLevel;
- data.ClientObject.NetConnectionType = NetConnectionType.NetConnectionTypeClientServerTCP;
-
- if (mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryExternal)
- data.ClientObject.SetIp(ConvertFromIntegerToIpAddress(mgclAuthRequest.AddressList.AddressList[0].BinaryAddress));
- else if (mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryExternalVport
- || mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryInternalVport)
- {
- data.ClientObject.SetIp(mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitOne + "." +
- mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitTwo + "." +
- mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitThree + "." +
- mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitFour);
- }
- else
- // NetAddressTypeExternal
- data.ClientObject.SetIp(mgclAuthRequest.AddressList.AddressList[0].Address ?? "0.0.0.0");
-
- if (nonSecure.Contains(data.ClientObject.ApplicationId))
- {
- data.ClientObject.Queue(new MediusServerAuthenticationResponse()
- {
- MessageID = mgclAuthRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = new RSA_KEY(),
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- new NetAddress() { AddressType = NetAddressType.NetAddressNone }
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- }
- });
-
- // Keep the client alive until the dme objects connects to MPS or times out
- data.ClientObject.OnConnected();
- data.ClientObject.KeepAliveUntilNextConnection();
- }
- else
- {
- data.ClientObject.Queue(new MediusServerAuthenticationResponse()
- {
- MessageID = mgclAuthRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
- new NetAddress() { AddressType = NetAddressType.NetAddressNone },
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- }
- });
-
- // Keep the client alive until the dme objects connects to MPS or times out
- data.ClientObject.OnConnected();
- data.ClientObject.KeepAliveUntilNextConnection();
- }
- }
-
- break;
- }
-
- case MediusServerSetAttributesRequest mgclSetAttrRequest:
- {
- ClientObject? dmeObject = data.ClientObject;
- if (dmeObject == null)
- {
- LoggerAccessor.LogError($"[MAS] - Non-DME Client sending MGCL messages.");
- break;
- }
-
- dmeObject.MGCL_SERVER_ATTRIBUTES = mgclSetAttrRequest.Attributes;
- dmeObject.SetIpPort(mgclSetAttrRequest.ListenServerAddress);
-
- // Reply with success
- dmeObject.Queue(new MediusServerSetAttributesResponse()
- {
- MessageID = mgclSetAttrRequest.MessageID,
- Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS
- });
- break;
- }
-
- case MediusServerSessionEndRequest sessionEndRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} is trying to end server session without an Client Object");
- break;
- }
-
- data.ClientObject.EndServerSession();
-
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusServerSessionEndResponse()
- {
- MessageID = sessionEndRequest.MessageID,
- ErrorCode = MGCL_ERROR_CODE.MGCL_SUCCESS
- }
- }, clientChannel);
-
- break;
- }
-
- case MediusServerReport serverReport:
- {
- data.ClientObject?.OnServerReport(serverReport);
- break;
- }
-
- #endregion
-
- #region Session
-
- case MediusExtendedSessionBeginRequest extendedSessionBeginRequest:
- {
- if (data.ClientObject != null)
- {
- data.ClientObject.MediusConnectionType = extendedSessionBeginRequest.ConnectionClass;
-
- await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
- {
- // Ensure that maintenance is active
- // Ensure that we're past the from date
- // Ensure that we're before the to date (if set)
- if (r.Result.MaintenanceMode.IsActive
- && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
- && (!r.Result.MaintenanceMode.ToDt.HasValue
- || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
- QueueBanMessage(data, "Server in maintenance mode.");
- else
- {
- // Reply
- data.ClientObject.Queue(new MediusSessionBeginResponse()
- {
- MessageID = extendedSessionBeginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- SessionKey = data.ClientObject.SessionKey
- });
- }
- }
- });
- }
- break;
- }
- case MediusSessionBeginRequest sessionBeginRequest:
- {
- if (data.ClientObject != null)
- {
- data.ClientObject.MediusConnectionType = sessionBeginRequest.ConnectionClass;
-
- LoggerAccessor.LogInfo($"Retrieved ApplicationID {data.ClientObject.ApplicationId} from client connection");
-
- await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
- {
- #region Maintenance Mode?
- // Ensure that maintenance is active
- // Ensure that we're past the from date
- // Ensure that we're before the to date (if set)
- if (r.Result.MaintenanceMode.IsActive
- && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
- && (!r.Result.MaintenanceMode.ToDt.HasValue
- || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
- QueueBanMessage(data, "Server in maintenance mode.");
- #endregion
-
- #region Send Response
- else
- {
- // Reply
- data.ClientObject.Queue(new MediusSessionBeginResponse()
- {
- MessageID = sessionBeginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- SessionKey = data.ClientObject.SessionKey
- });
- }
- #endregion
- }
- });
- }
-
- break;
- }
-
- case MediusSessionBeginRequest1 sessionBeginRequest1:
- {
- if (data.ClientObject != null)
- {
- data.ClientObject.MediusConnectionType = sessionBeginRequest1.ConnectionClass;
-
- LoggerAccessor.LogInfo($"Retrieved ApplicationID {data.ClientObject.ApplicationId} from client connection");
-
- #region SystemMessageSingleTest Disabled?
- if (MediusClass.Settings.SystemMessageSingleTest)
- {
- await QueueBanMessage(data, "MAS.Notification Test:\nYou have been banned from this server.");
-
- await data.ClientObject.Logout();
- }
- #endregion
- else
- {
- await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
- {
- #region Maintenance Mode?
- // Ensure that maintenance is active
- // Ensure that we're past the from date
- // Ensure that we're before the to date (if set)
- if (r.Result.MaintenanceMode.IsActive
- && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
- && (!r.Result.MaintenanceMode.ToDt.HasValue
- || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
- QueueBanMessage(data, "Server in maintenance mode.");
-
- #endregion
-
- #region Send Response
- else
- {
- // Reply
- data.ClientObject.Queue(new MediusSessionBeginResponse()
- {
- MessageID = sessionBeginRequest1.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- SessionKey = data.ClientObject.SessionKey
- });
- }
- #endregion
- }
- });
- }
- }
- break;
- }
-
- case MediusSessionEndRequest sessionEndRequest:
- {
- ClientObject? clientToEnd = MediusClass.Manager.GetClientBySessionKey(sessionEndRequest.SessionKey, data.ApplicationId);
-
- if (clientToEnd == null)
- {
- LoggerAccessor.LogError($"[MAS] - INVALID OPERATION: {clientChannel} is trying to end session of a non-existing Client Object with SessionKey: {sessionEndRequest.SessionKey}");
- break;
- }
-
- clientToEnd.OnDisconnected();
-
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusSessionEndResponse()
- {
- MessageID = sessionEndRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- }
- }, clientChannel);
-
- break;
- }
-
- #endregion
-
- #region Localization
-
- case MediusSetLocalizationParamsRequest setLocalizationParamsRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest} without a session.");
- break;
- }
-
- data.ClientObject.CharacterEncoding = setLocalizationParamsRequest.CharacterEncoding;
- data.ClientObject.LanguageType = setLocalizationParamsRequest.Language;
-
- data.ClientObject.Queue(new MediusStatusResponse()
- {
- Type = 0xA4,
- Class = setLocalizationParamsRequest.PacketClass,
- MessageID = setLocalizationParamsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- break;
- }
-
- case MediusSetLocalizationParamsRequest1 setLocalizationParamsRequest1:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest1} without a session.");
- break;
- }
-
- data.ClientObject.CharacterEncoding = setLocalizationParamsRequest1.CharacterEncoding;
- data.ClientObject.LanguageType = setLocalizationParamsRequest1.Language;
- data.ClientObject.TimeZone = setLocalizationParamsRequest1.TimeZone;
- data.ClientObject.LocationId = setLocalizationParamsRequest1.LocationID;
-
- data.ClientObject.Queue(new MediusStatusResponse()
- {
- Type = 0xA4,
- Class = (NetMessageClass)1,
- MessageID = setLocalizationParamsRequest1.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- break;
- }
- case MediusSetLocalizationParamsRequest2 setLocalizationParamsRequest2:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest2} without a session.");
- break;
- }
-
- data.ClientObject.CharacterEncoding = setLocalizationParamsRequest2.CharacterEncoding;
- data.ClientObject.LanguageType = setLocalizationParamsRequest2.Language;
- data.ClientObject.TimeZone = setLocalizationParamsRequest2.TimeZone;
-
- data.ClientObject.Queue(new MediusStatusResponse()
- {
- Type = 0xA4,
- Class = (NetMessageClass)1,
- MessageID = setLocalizationParamsRequest2.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- break;
- }
-
- #endregion
-
- #region Game
-
- case MediusGetTotalGamesRequest getTotalGamesRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalGamesRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalGamesRequest} without being logged in.");
- break;
- }
-
- data.ClientObject.Queue(new MediusGetTotalGamesResponse()
- {
- MessageID = getTotalGamesRequest.MessageID,
- Total = 0,
- StatusCode = MediusCallbackStatus.MediusRequestDenied
- });
- break;
- }
-
- #endregion
-
- #region Channel
-
- case MediusGetTotalChannelsRequest getTotalChannelsRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalChannelsRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalChannelsRequest} without being logged in.");
- break;
- }
-
- data.ClientObject.Queue(new MediusGetTotalChannelsResponse()
- {
- MessageID = getTotalChannelsRequest.MessageID,
- Total = 0,
- StatusCode = MediusCallbackStatus.MediusRequestDenied,
- });
- break;
- }
-
- case MediusSetLobbyWorldFilterRequest setLobbyWorldFilterRequest:
- {
- //WRC 4 Sets LobbyWorldFilter Prior to making a session.
- // ERROR - Need a session
- /*
- if (data.ClientObject == null)
- throw new InvalidOperationException($"INVALID OPERATION: {clientChannel} sent {setLobbyWorldFilterRequest} without a session.");
- */
- // ERROR -- Need to be logged in
- /*
- if (!data.ClientObject.IsLoggedIn)
- throw new InvalidOperationException($"INVALID OPERATION: {clientChannel} sent {setLobbyWorldFilterRequest} without being logged in.");
- */
- /*
- data.ClientObject.Queue(new MediusSetLobbyWorldFilterResponse()
- {
- MessageID = setLobbyWorldFilterRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusRequestDenied,
- });
- */
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusSetLobbyWorldFilterResponse()
- {
- MessageID = setLobbyWorldFilterRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusRequestDenied
- }
- });
-
- break;
- }
- #endregion
-
- #region DNAS CID Check
-
- case MediusMachineSignaturePost machineSignaturePost:
- {
- if (Settings.DnasEnablePost == true)
- {
- //Sets the CachedPlayer's MachineId
- data.MachineId = BitConverter.ToString(machineSignaturePost.MachineSignature);
-
- LoggerAccessor.LogInfo($"Session Key {machineSignaturePost.SessionKey} | Posting Machine signatures");
-
- // Then post to the Database if logged in
- if (data.ClientObject?.IsLoggedIn ?? false)
- await HorizonServerConfiguration.Database.PostMachineId(data.ClientObject.AccountId, data.MachineId);
- }
- else
- {
- //DnasEnablePost set to false;
- }
-
- break;
- }
-
- case MediusDnasSignaturePost dnasSignaturePost:
- {
- if (Settings.DnasEnablePost == true)
- {
- //If DNAS Signature Post is the PS2/PSP/PS3 Console ID then continue
- if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasConsoleID)
- {
- data.MachineId = BitConverter.ToString(dnasSignaturePost.DnasSignature);
-
- LoggerAccessor.LogInfo($"Posting ConsoleID - ConsoleSigSize={dnasSignaturePost.DnasSignatureLength}");
-
- // Then post to the Database if logged in
- if (data.ClientObject?.IsLoggedIn ?? false)
- await HorizonServerConfiguration.Database.PostMachineId(data.ClientObject.AccountId, data.MachineId);
- }
-
- if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasTitleID)
- LoggerAccessor.LogInfo($"DnasSignaturePost Error - Invalid SignatureType");
-
- if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasDiskID)
- LoggerAccessor.LogInfo($"Posting DiskID - DiskSigSize={dnasSignaturePost.DnasSignatureLength}");
- }
- else
- {
- //DnasEnablePost false, no Post;
- }
- break;
- }
- #endregion
-
- #region AccessLevel (2.12)
-
- case MediusGetAccessLevelInfoRequest getAccessLevelInfoRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getAccessLevelInfoRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getAccessLevelInfoRequest} without being logged in.");
- break;
- }
-
- //int adminAccessLevel = 4;
-
- data.ClientObject.Queue(new MediusGetAccessLevelInfoResponse()
- {
- MessageID = getAccessLevelInfoRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccessLevel = MediusAccessLevelType.MEDIUS_ACCESSLEVEL_MODERATOR,
- });
- break;
- }
-
- #endregion
-
- #region Version Server
- case MediusVersionServerRequest mediusVersionServerRequest:
- {
- List appIdBeforeSession = new() { 10442, 10724 };
-
- // ERROR - Need a session
- if (data.ClientObject == null && !appIdBeforeSession.Contains(data.ApplicationId)) // KILLZONE PS2 GET VERSION SERVER INFO BEFORE SESSION
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {mediusVersionServerRequest} without a session.");
- break;
- }
-
- if (Settings.MediusServerVersionOverride == true)
- {
- #region F1 2005 PAL
- List F12005AppIds = new List { 10952, 10954 };
- // F1 2005 PAL SCES / F1 2005 PAL TCES
- if (F12005AppIds.Contains(data.ApplicationId))
- {
- data.ClientObject?.Queue(new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 2.9.0009",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- });
- }
- #endregion
-
- #region Socom 1
- else if (data.ApplicationId == 10274)
- {
- data.ClientObject?.Queue(new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 1.40.PRE8",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- });
- }
- #endregion
-
- #region EyeToy Chat Beta
- else if (data.ApplicationId == 10550)
- {
- data.ClientObject?.Queue(new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 1.43.0000",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- });
- }
- #endregion
-
- #region Killzone Beta/Retail
- else if (appIdBeforeSession.Contains(data.ApplicationId))
- {
- //data.ClientObject = MediusClass.LobbyServer.ReserveClient(mediusVersionServerRequest);
-
- data.SendQueue.Enqueue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 1.50.0009",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- }
- });
- }
- else
- #endregion
-
- //Default
- {
- data.ClientObject?.Queue(new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 3.05.201109161400",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- });
- }
- }
- else
- {
- // If MediusServerVersionOverride is false, we send our own Version String
- // AND if its Killzone PS2 we make the ClientObject BEFORE SESSIONBEGIN
- if (appIdBeforeSession.Contains(data.ApplicationId))
- {
- //data.ClientObject = Program.LobbyServer.ReserveClient(mediusVersionServerRequest);
- data.SendQueue.Enqueue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = "Medius Authentication Server Version 1.50.0009",
- StatusCode = MediusCallbackStatus.MediusSuccess,
- }
- });
- }
- else
- {
- data.ClientObject?.Queue(new MediusVersionServerResponse()
- {
- MessageID = mediusVersionServerRequest.MessageID,
- VersionServer = Settings.MASVersion,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- });
- }
- }
-
- break;
- }
-
- #endregion
-
- #region Co-Locations
- case MediusGetLocationsRequest getLocationsRequest:
- {
- // ERROR - Need a session but doesn't need to be logged in
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getLocationsRequest} without a session.");
- break;
- }
-
- LoggerAccessor.LogInfo($"Get Locations Request Received Sessionkey: {getLocationsRequest.SessionKey}");
- await HorizonServerConfiguration.Database.GetLocations(data.ClientObject.ApplicationId).ContinueWith(r =>
- {
- LocationDTO[]? locations = r.Result;
-
- if (r.IsCompletedSuccessfully)
- {
- if (locations?.Length == 0)
- {
- LoggerAccessor.LogInfo("No Locations found.");
-
- data.ClientObject.Queue(new MediusGetLocationsResponse()
- {
- MessageID = getLocationsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusNoResult,
- EndOfList = true
- });
- }
- else
- {
- var responses = locations?.Select(x => new MediusGetLocationsResponse()
- {
- MessageID = getLocationsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- LocationId = x.Id,
- LocationName = x.Name
- }).ToList();
-
- if (responses != null)
- {
- LoggerAccessor.LogInfo("GetLocationsRequest success");
- LoggerAccessor.LogInfo($"NumLocations returned[{responses.Count}]");
-
- responses[responses.Count - 1].EndOfList = true;
- data.ClientObject.Queue(responses);
- }
- }
- }
- else
- {
- LoggerAccessor.LogError($"GetLocationsRequest failed [{r.Exception}]");
-
- data.ClientObject.Queue(new MediusGetLocationsResponse()
- {
- MessageID = getLocationsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError,
- LocationId = -1,
- LocationName = "0",
- EndOfList = true
- });
- }
- });
- break;
- }
-
- case MediusPickLocationRequest pickLocationRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {pickLocationRequest} without a session.");
- break;
- }
-
- data.ClientObject.LocationId = pickLocationRequest.LocationID;
-
- data.ClientObject.Queue(new MediusPickLocationResponse()
- {
- MessageID = pickLocationRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- break;
- }
-
- #endregion
-
- #region Account
-
- case MediusAccountRegistrationRequest accountRegRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountRegRequest} without a session.");
- break;
- }
-
- // Check that account creation is enabled
- if (appSettings.DisableAccountCreation)
- {
- // Reply error
- data.ClientObject.Queue(new MediusAccountRegistrationResponse()
- {
- MessageID = accountRegRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusFail
- });
-
- return;
- }
-
- // validate name
- if (!MediusClass.PassTextFilter(data.ApplicationId, TextFilterContext.ACCOUNT_NAME, accountRegRequest.AccountName))
- {
- data.ClientObject.Queue(new MediusAccountRegistrationResponse()
- {
- MessageID = accountRegRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusFail,
- });
- return;
- }
-
- await HorizonServerConfiguration.Database.CreateAccount(new CreateAccountDTO()
- {
- AccountName = accountRegRequest.AccountName,
- AccountPassword = ComputeSHA256(accountRegRequest.Password),
- MachineId = data.MachineId,
- MediusStats = Convert.ToBase64String(new byte[Constants.ACCOUNTSTATS_MAXLEN]),
- AppId = data.ClientObject.ApplicationId
- }, clientChannel).ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- // Reply with account id
- data.ClientObject.Queue(new MediusAccountRegistrationResponse()
- {
- MessageID = accountRegRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID = r.Result.AccountId
- });
- }
- else
- {
- // Reply error
- data.ClientObject.Queue(new MediusAccountRegistrationResponse()
- {
- MessageID = accountRegRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusAccountAlreadyExists
- });
- }
- });
- break;
- }
- case MediusAccountGetIDRequest accountGetIdRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountGetIdRequest} without a session.");
- break;
- }
-
- await HorizonServerConfiguration.Database.GetAccountByName(accountGetIdRequest.AccountName, data.ClientObject.ApplicationId).ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- // Success
- data?.ClientObject?.Queue(new MediusAccountGetIDResponse()
- {
- MessageID = accountGetIdRequest.MessageID,
- AccountID = r.Result.AccountId,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- }
- else
- {
- // Fail
- data?.ClientObject?.Queue(new MediusAccountGetIDResponse()
- {
- MessageID = accountGetIdRequest.MessageID,
- AccountID = -1,
- StatusCode = MediusCallbackStatus.MediusAccountNotFound
- });
- }
- });
-
- break;
- }
- case MediusAccountDeleteRequest accountDeleteRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountDeleteRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountDeleteRequest} without being logged in.");
- break;
- }
-
- if (!string.IsNullOrEmpty(data.ClientObject.AccountName))
- {
- await HorizonServerConfiguration.Database.DeleteAccount(data.ClientObject.AccountName, data.ClientObject.ApplicationId).ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result)
- {
- LoggerAccessor.LogInfo($"Logging out {data?.ClientObject?.AccountName}'s account\nDeleting from Medius Server");
-
- data?.ClientObject?.Logout();
-
- data?.ClientObject?.Queue(new MediusAccountDeleteResponse()
- {
- MessageID = accountDeleteRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- }
- else
- {
- LoggerAccessor.LogWarn($"Logout FAILED for {data?.ClientObject?.AccountName}'s account\nData still persistent on Medius Server");
-
- data?.ClientObject?.Queue(new MediusAccountDeleteResponse()
- {
- MessageID = accountDeleteRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- }
- break;
- }
- case MediusAnonymousLoginRequest anonymousLoginRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {anonymousLoginRequest} without a session.");
- break;
- }
-
- await LoginAnonymous(anonymousLoginRequest, clientChannel, data);
- break;
- }
- case MediusAccountLoginRequest accountLoginRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountLoginRequest} without a session.");
- break;
- }
-
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_ACCOUNT_LOGIN_REQUEST, new OnAccountLoginRequestArgs()
- {
- Player = data.ClientObject,
- Request = accountLoginRequest
- });
-
- // Check the client isn't already logged in
- if (MediusClass.Manager.GetClientByAccountName(accountLoginRequest.Username, data.ClientObject.ApplicationId)?.IsLoggedIn ?? false)
- {
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusAccountLoggedIn
- });
- }
- else
- {
- #region SystemMessageSingleTest Disabled?
- if (MediusClass.Settings.SystemMessageSingleTest != false)
- {
- await QueueBanMessage(data, "MAS.Notification Test:\nYou have been banned from this server.");
-
- await data.ClientObject.Logout();
- }
- #endregion
- else
- {
- _ = HorizonServerConfiguration.Database.GetAccountByName(accountLoginRequest.Username, data.ClientObject.ApplicationId, true).ContinueWith(async (r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && data != null && data.ClientObject != null && data.ClientObject.IsConnected)
- {
-
- if (r.Result.IsBanned)
- {
- // Send ban message
- //await QueueBanMessage(data);
-
- // Account is banned
- // Temporary solution is to tell the client the login failed
- data?.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusAccountBanned
- });
-
- }
- else if (appSettings.EnableAccountWhitelist && !appSettings.AccountIdWhitelist.Contains(r.Result.AccountId))
- {
- // Account not allowed to sign in
- data?.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusFail
- });
- }
- else if (MediusClass.Manager.GetClientByAccountName(accountLoginRequest.Username, data.ClientObject.ApplicationId)?.IsLoggedIn ?? false)
- {
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusAccountLoggedIn
- });
- }
-
- else if (ComputeSHA256(accountLoginRequest.Password) == r.Result.AccountPassword)
- await Login(accountLoginRequest.MessageID, clientChannel, data, r.Result, false);
- else
- {
- // Incorrect password
- data?.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusInvalidPassword
- });
- }
- }
- else if (appSettings.CreateAccountOnNotFound)
- {
- // Account not found, create new and login
- // Check that account creation is enabled
- if (appSettings.DisableAccountCreation)
- {
- // Reply error
- data?.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusFail,
- });
- return;
- }
-
- // validate name
- if (data != null && !MediusClass.PassTextFilter(data.ApplicationId, TextFilterContext.ACCOUNT_NAME, accountLoginRequest.Username))
- {
- data.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusVulgarityFound,
- });
- return;
- }
-
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_PRE_ACCOUNT_CREATE_ON_NOT_FOUND, new OnAccountLoginRequestArgs()
- {
- Player = data?.ClientObject,
- Request = accountLoginRequest
- });
-
- if (data != null && data.ClientObject != null)
- {
- _ = HorizonServerConfiguration.Database.CreateAccount(new CreateAccountDTO()
- {
- AccountName = accountLoginRequest.Username,
- AccountPassword = ComputeSHA256(accountLoginRequest.Password),
- MachineId = data.MachineId,
- MediusStats = Convert.ToBase64String(new byte[Constants.ACCOUNTSTATS_MAXLEN]),
- AppId = data.ClientObject.ApplicationId
- }, clientChannel).ContinueWith(async (r) =>
- {
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_POST_ACCOUNT_CREATE_ON_NOT_FOUND, new OnAccountLoginRequestArgs()
- {
- Player = data.ClientObject,
- Request = accountLoginRequest
- });
- await Login(accountLoginRequest.MessageID, clientChannel, data, r.Result, false);
- }
- else
- {
- // Reply error
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusInvalidPassword
- });
- }
- });
- }
- }
- else
- {
- // Account not found
- data?.ClientObject?.Queue(new MediusAccountLoginResponse()
- {
- MessageID = accountLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusAccountNotFound,
- });
- }
- });
- }
- }
- break;
- }
-
- case MediusAccountUpdatePasswordRequest accountUpdatePasswordRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountUpdatePasswordRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountUpdatePasswordRequest} without being logged in.");
- break;
- }
-
- // Post New Password to Database
- await HorizonServerConfiguration.Database.PostAccountUpdatePassword(data.ClientObject.AccountId, accountUpdatePasswordRequest.OldPassword, accountUpdatePasswordRequest.NewPassword).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result)
- {
- data.ClientObject.Queue(new MediusAccountUpdatePasswordStatusResponse()
- {
- MessageID = accountUpdatePasswordRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusAccountUpdatePasswordStatusResponse()
- {
- MessageID = accountUpdatePasswordRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
-
- case MediusAccountLogoutRequest accountLogoutRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountLogoutRequest} without a session.");
- break;
- }
-
- MediusCallbackStatus result = MediusCallbackStatus.MediusFail;
-
- // Check token
- if (data.ClientObject.IsLoggedIn && accountLogoutRequest.SessionKey == data.ClientObject.SessionKey)
- {
- result = MediusCallbackStatus.MediusSuccess;
-
- // Logout
- await data.ClientObject.Logout();
- }
-
- data.ClientObject.Queue(new MediusAccountLogoutResponse()
- {
- MessageID = accountLogoutRequest.MessageID,
- StatusCode = result
- });
- break;
- }
-
- case MediusAccountUpdateStatsRequest accountUpdateStatsRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountUpdateStatsRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {accountUpdateStatsRequest} without being logged in.");
- break;
- }
-
- await HorizonServerConfiguration.Database.PostMediusStats(data.ClientObject.AccountId, Convert.ToBase64String(accountUpdateStatsRequest.Stats)).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result)
- {
- data.ClientObject.Queue(new MediusAccountUpdateStatsResponse()
- {
- MessageID = accountUpdateStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusAccountUpdateStatsResponse()
- {
- MessageID = accountUpdateStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
-
- case MediusTicketLoginRequest ticketLoginRequest:
- {
- // ERROR - Need a session and XI5 Ticket
- if (data.ClientObject == null || ticketLoginRequest.TicketData == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {ticketLoginRequest} without a session or XI5 Ticket.");
- break;
- }
-
- string accountLoggingMsg = string.Empty;
- byte[] XI5TicketData = ByteUtils.CombineByteArrays(BitConverter.GetBytes(
- BitConverter.IsLittleEndian ? EndianUtils.ReverseUint(ticketLoginRequest.Version) : ticketLoginRequest.Version), BitConverter.GetBytes(
- BitConverter.IsLittleEndian ? EndianUtils.ReverseUint(ticketLoginRequest.Size) : ticketLoginRequest.Size), ticketLoginRequest.TicketData);
-
- // Extract the desired portion of the binary data for a npticket 4.0
- byte[] extractedData = new byte[0x63 - 0x54 + 1];
-
- // Copy it
- Array.Copy(XI5TicketData, 0x54, extractedData, 0, extractedData.Length);
-
- // Trim null bytes
- int nullByteIndex = Array.IndexOf(extractedData, (byte)0x00);
- if (nullByteIndex >= 0)
- {
- byte[] trimmedData = new byte[nullByteIndex];
- Array.Copy(extractedData, trimmedData, nullByteIndex);
- extractedData = trimmedData;
- }
-
- string UserOnlineId = Encoding.UTF8.GetString(extractedData);
- XI5Ticket ticker = new XI5Ticket(XI5TicketData);
-
- if (ByteUtils.FindBytePattern(XI5TicketData, new byte[] { 0x52, 0x50, 0x43, 0x4E }, 184) != -1)
- {
- if (MediusClass.Settings.ForceOfficialRPCNSignature && !ticker.SignedByOfficialRPCN)
- {
- LoggerAccessor.LogError($"[MAS] - MediusTicketLoginRequest : User {UserOnlineId} was caught using an invalid RPCN signature!");
-
- // Account is banned
- // Temporary solution is to tell the client the login failed
- data.ClientObject.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusMachineBanned
- });
-
- break;
- }
-
- accountLoggingMsg = $"[MAS] - MediusTicketLoginRequest : User {UserOnlineId} logged in and is on RPCN";
- data.ClientObject.IsOnRPCN = true;
- UserOnlineId += "@RPCN";
- }
- else if (UserOnlineId.EndsWith("@RPCN"))
- {
- LoggerAccessor.LogError($"[MAS] - MediusTicketLoginRequest : User {UserOnlineId} was caught using a RPCN suffix while not on it!");
-
- // Account is banned
- // Temporary solution is to tell the client the login failed
- data.ClientObject.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusMachineBanned
- });
-
- break;
- }
- else
- accountLoggingMsg = $"[MAS] - MediusTicketLoginRequest : User {UserOnlineId} logged in and is on PSN";
-
- _ = data.ClientObject.CurrentChannel?.BroadcastSystemMessage(data.ClientObject.CurrentChannel.LocalClients.Where(client => client != data.ClientObject), accountLoggingMsg, byte.MinValue);
-
- LoggerAccessor.LogInfo(accountLoggingMsg);
-
- ClientObject? ExsitingClient = MediusClass.Manager.GetClientByAccountName(UserOnlineId, data.ClientObject.ApplicationId);
-
- // Check the client isn't already logged in
- if (ExsitingClient != null && ExsitingClient.IsLoggedIn)
- {
- data.ClientObject.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusAccountLoggedIn
- });
-
- break;
- }
-
- //Check if their MacBanned
- await HorizonServerConfiguration.Database.GetIsMacBanned(data.MachineId ?? string.Empty).ContinueWith(async (r) =>
- {
- if (r.IsCompletedSuccessfully && data != null && data.ClientObject != null && data.ClientObject.IsConnected)
- {
- data.IsBanned = r.IsCompletedSuccessfully && r.Result;
-
- #region isBanned?
- LoggerAccessor.LogInfo($"Is Connected User MAC Banned: {data.IsBanned}");
-
- if (data.IsBanned == true)
- {
- LoggerAccessor.LogError($"Account MachineID {data.MachineId} is BANNED!");
-
- // Account is banned
- // Temporary solution is to tell the client the login failed
- data?.ClientObject?.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusMachineBanned
- });
-
- // Send ban message
- //await QueueBanMessage(data);
- }
- else
- {
- await HorizonServerConfiguration.Database.GetAccountByName(UserOnlineId, data.ClientObject.ApplicationId, true).ContinueWith(async (r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && data != null && data.ClientObject != null && data.ClientObject.IsConnected)
- {
- bool isHomeRejected = !MediusClass.Settings.PlaystationHomeAllowAnyEboot && (data.ClientObject.ApplicationId == 20371 || data.ClientObject.ApplicationId == 20374) && data.ClientObject.ClientHomeData == null;
-
- LoggerAccessor.LogInfo($"Account found for AppId from Client: {data.ClientObject.ApplicationId}");
-
- if (r.Result.IsBanned || isHomeRejected)
- {
- // Account is banned
- // Respond with Statuscode MediusAccountBanned
- data?.ClientObject?.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusAccountBanned
- });
-
- // Then queue send ban message
- await QueueBanMessage(data, isHomeRejected ? "You was caught using an anti Poke/Query eboot" : "Your CID has been banned");
- }
- else
- {
- #region AccountWhitelist Check
- if (appSettings.EnableAccountWhitelist && !appSettings.AccountIdWhitelist.Contains(r.Result.AccountId))
- {
- LoggerAccessor.LogError($"AppId {data.ClientObject.ApplicationId} has EnableAccountWhitelist enabled or\n" +
- $"Contains a AccountIdWhitelist!");
-
- // Account not allowed to sign in
- data?.ClientObject?.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusFail
- });
- }
- #endregion
-
- if (data != null)
- await Login(ticketLoginRequest.MessageID, clientChannel, data, r.Result, true);
- }
-
- }
- else
- {
- // Account not found, create new and login
- #region AccountCreationDisabled?
- // Check that account creation is enabled
- if (appSettings.DisableAccountCreation)
- {
- LoggerAccessor.LogError($"AppId {data?.ClientObject?.ApplicationId} has DisableAllowCreation enabled!");
-
- // Reply error
- data?.ClientObject?.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusFail,
- });
- return;
- }
- #endregion
-
- if (data != null)
- {
- LoggerAccessor.LogInfo($"Account not found for AppId from Client: {data.ClientObject?.ApplicationId}");
-
- if (data.ClientObject != null)
- {
- _ = HorizonServerConfiguration.Database.CreateAccount(new CreateAccountDTO()
- {
- AccountName = UserOnlineId,
- AccountPassword = "UNSET",
- MachineId = data.MachineId,
- MediusStats = Convert.ToBase64String(new byte[Constants.ACCOUNTSTATS_MAXLEN]),
- AppId = data.ClientObject.ApplicationId
- }, clientChannel).ContinueWith(async (r) =>
- {
- LoggerAccessor.LogInfo($"Creating New Account for user {UserOnlineId}!");
-
- if (r.IsCompletedSuccessfully && r.Result != null)
- await Login(ticketLoginRequest.MessageID, clientChannel, data, r.Result, true);
- else
- {
- // Reply error
- data.ClientObject.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusDBError
- });
- }
- });
- }
- }
- }
- });
- }
- #endregion
- }
- else
- {
- // Reply error
- data?.ClientObject?.Queue(new MediusTicketLoginResponse()
- {
- MessageID = ticketLoginRequest.MessageID,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusDBError,
- });
- }
- });
- break;
- }
-
- #endregion
-
- #region Policy / Announcements
-
- case MediusGetAllAnnouncementsRequest getAllAnnouncementsRequest:
- {
- // Send to plugins
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_PLAYER_ON_GET_ALL_ANNOUNCEMENTS, new OnPlayerRequestArgs()
- {
- Player = data.ClientObject,
- Request = getAllAnnouncementsRequest
- });
-
- await HorizonServerConfiguration.Database.GetLatestAnnouncementsList(data.ApplicationId).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.Length > 0)
- {
- List responses = new List();
- foreach (var result in r.Result)
- {
- responses.Add(new MediusGetAnnouncementsResponse()
- {
- MessageID = getAllAnnouncementsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Announcement = string.IsNullOrEmpty(result.AnnouncementTitle) ? $"{result.AnnouncementBody}" : $"{result.AnnouncementTitle}\n{result.AnnouncementBody}\n",
- AnnouncementID = result.Id++,
- EndOfList = false
- });
- }
-
- responses[responses.Count - 1].EndOfList = true;
- data.ClientObject.Queue(responses);
- }
- else
- {
- data.ClientObject.Queue(new MediusGetAnnouncementsResponse()
- {
- MessageID = getAllAnnouncementsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Announcement = "",
- AnnouncementID = 0,
- EndOfList = true
- });
- }
- });
- break;
- }
-
- case MediusGetAnnouncementsRequest getAnnouncementsRequest:
- {
- // Send to plugins
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_PLAYER_ON_GET_ANNOUNCEMENTS, new OnPlayerRequestArgs()
- {
- Player = data.ClientObject,
- Request = getAnnouncementsRequest
- });
-
- await HorizonServerConfiguration.Database.GetLatestAnnouncement(data.ApplicationId).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- data.ClientObject.Queue(new MediusGetAnnouncementsResponse()
- {
- MessageID = getAnnouncementsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Announcement = string.IsNullOrEmpty(r.Result.AnnouncementTitle) ? $"{r.Result.AnnouncementBody}" : $"{r.Result.AnnouncementTitle}\n{r.Result.AnnouncementBody}\n",
- AnnouncementID = r.Result.Id++,
- EndOfList = true
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetAnnouncementsResponse()
- {
- MessageID = getAnnouncementsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Announcement = "",
- AnnouncementID = 0,
- EndOfList = true
- });
- }
- });
- break;
- }
-
- case MediusGetPolicyRequest getPolicyRequest:
- {
- // Send to plugins
- await MediusClass.Plugins.OnEvent(PluginEvent.MEDIUS_PLAYER_ON_GET_POLICY, new OnPlayerRequestArgs()
- {
- Player = data.ClientObject,
- Request = getPolicyRequest
- });
-
- switch (getPolicyRequest.Policy)
- {
- case MediusPolicyType.Privacy:
- {
- if (data.ClientObject != null)
- {
- await HorizonServerConfiguration.Database.GetPolicy((int)MediusPolicyType.Privacy, data.ClientObject.ApplicationId).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- string? txt = r.Result.EulaBody;
- if (!string.IsNullOrEmpty(r.Result.EulaTitle))
- txt = r.Result.EulaTitle + "\n" + txt;
- else
- txt = string.Empty;
- LoggerAccessor.LogInfo($"GetPolicy Succeeded:{getPolicyRequest.MessageID}");
- data.ClientObject.Queue(MediusClass.GetPolicyFromText(getPolicyRequest.MessageID, txt));
- }
- else if (r.IsCompletedSuccessfully && r.Result == null)
- {
- LoggerAccessor.LogDebug($"Sending blank Policy since no chunks were found");
- data.ClientObject.Queue(new MediusGetPolicyResponse() { MessageID = getPolicyRequest.MessageID, StatusCode = MediusCallbackStatus.MediusSuccess, Policy = string.Empty, EndOfText = true });
- }
- else
- {
- LoggerAccessor.LogError($"GetPolicy Failed = [{r.Exception}]");
- data.ClientObject.Queue(new MediusGetPolicyResponse() { MessageID = getPolicyRequest.MessageID, StatusCode = MediusCallbackStatus.MediusSuccess, Policy = "NONE", EndOfText = true });
- }
- });
- }
- break;
- }
- case MediusPolicyType.Usage:
- {
- if (data.ClientObject != null)
- {
- await HorizonServerConfiguration.Database.GetPolicy((int)MediusPolicyType.Usage, data.ClientObject.ApplicationId).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null)
- {
- string? txt = r.Result.EulaBody;
- if (!string.IsNullOrEmpty(r.Result.EulaTitle))
- txt = r.Result.EulaTitle + "\n" + txt;
- else
- txt = string.Empty;
- LoggerAccessor.LogInfo($"GetPolicy Succeeded:{getPolicyRequest.MessageID}");
- data.ClientObject.Queue(MediusClass.GetPolicyFromText(getPolicyRequest.MessageID, txt));
- }
- else if (r.IsCompletedSuccessfully && r.Result == null)
- {
- LoggerAccessor.LogDebug($"Sending blank Policy since no chunks were found");
- data.ClientObject.Queue(new MediusGetPolicyResponse() { MessageID = getPolicyRequest.MessageID, StatusCode = MediusCallbackStatus.MediusSuccess, Policy = string.Empty, EndOfText = true });
- }
- else
- {
- LoggerAccessor.LogError($"GetPolicy Failed = [{r.Exception}]");
- data.ClientObject.Queue(new MediusGetPolicyResponse() { MessageID = getPolicyRequest.MessageID, StatusCode = MediusCallbackStatus.MediusSuccess, Policy = "NONE", EndOfText = true });
- }
- });
- }
- break;
- }
- }
- break;
- }
-
- #endregion
-
- #region Ladders
-
- case MediusGetLadderStatsRequest getLadderStatsRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getLadderStatsRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getLadderStatsRequest} without being logged in.");
- break;
- }
-
- switch (getLadderStatsRequest.LadderType)
- {
- case MediusLadderType.MediusLadderTypePlayer:
- {
- await HorizonServerConfiguration.Database.GetAccountById(getLadderStatsRequest.AccountID_or_ClanID).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.AccountStats != null)
- {
- data.ClientObject.Queue(new MediusGetLadderStatsResponse()
- {
- MessageID = getLadderStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Stats = Array.ConvertAll(r.Result.AccountStats, Convert.ToInt32)
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetLadderStatsResponse()
- {
- MessageID = getLadderStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
- case MediusLadderType.MediusLadderTypeClan:
- {
- await HorizonServerConfiguration.Database.GetClanById(getLadderStatsRequest.AccountID_or_ClanID,
- data.ClientObject.ApplicationId)
- .ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.ClanStats != null)
- {
- data.ClientObject.Queue(new MediusGetLadderStatsResponse()
- {
- MessageID = getLadderStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Stats = r.Result.ClanStats
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetLadderStatsResponse()
- {
- MessageID = getLadderStatsRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
- default:
- {
- LoggerAccessor.LogWarn($"Unhandled MediusGetLadderStatsRequest {getLadderStatsRequest}");
- break;
- }
- }
- break;
- }
-
- case MediusGetLadderStatsWideRequest getLadderStatsWideRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getLadderStatsWideRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getLadderStatsWideRequest} without being logged in.");
- break;
- }
-
- switch (getLadderStatsWideRequest.LadderType)
- {
- case MediusLadderType.MediusLadderTypePlayer:
- {
- await HorizonServerConfiguration.Database.GetAccountById(getLadderStatsWideRequest.AccountID_or_ClanID).ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.AccountWideStats != null)
- {
- data.ClientObject.Queue(new MediusGetLadderStatsWideResponse()
- {
- MessageID = getLadderStatsWideRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID_or_ClanID = r.Result.AccountId,
- Stats = r.Result.AccountWideStats
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetLadderStatsWideResponse()
- {
- MessageID = getLadderStatsWideRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
- case MediusLadderType.MediusLadderTypeClan:
- {
- await HorizonServerConfiguration.Database.GetClanById(getLadderStatsWideRequest.AccountID_or_ClanID,
- data.ClientObject.ApplicationId)
- .ContinueWith((r) =>
- {
- if (data == null || data.ClientObject == null || !data.ClientObject.IsConnected)
- return;
-
- if (r.IsCompletedSuccessfully && r.Result != null && r.Result.ClanWideStats != null)
- {
- data.ClientObject.Queue(new MediusGetLadderStatsWideResponse()
- {
- MessageID = getLadderStatsWideRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID_or_ClanID = r.Result.ClanId,
- Stats = r.Result.ClanWideStats
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetLadderStatsWideResponse()
- {
- MessageID = getLadderStatsWideRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusDBError
- });
- }
- });
- break;
- }
- default:
- {
- LoggerAccessor.LogWarn($"Unhandled MediusGetLadderStatsWideRequest {getLadderStatsWideRequest}");
- break;
- }
- }
- break;
- }
-
- #endregion
-
- #region Channels
-
- case MediusChannelListRequest channelListRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {channelListRequest} without a session.");
- break;
- }
-
- // ERROR -- Need to be logged in
- if (!data.ClientObject.IsLoggedIn)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {channelListRequest} without being logged in.");
- break;
- }
-
- List channelResponses = new List();
-
- var lobbyChannels = MediusClass.Manager.GetChannelList(
- data.ClientObject.ApplicationId,
- channelListRequest.PageID,
- channelListRequest.PageSize,
- ChannelType.Lobby
- );
-
- foreach (var channel in lobbyChannels)
- {
- channelResponses.Add(new MediusChannelListResponse()
- {
- MessageID = channelListRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- MediusWorldID = channel.Id,
- LobbyName = channel.Name,
- PlayerCount = channel.PlayerCount,
- EndOfList = false
- });
- }
-
- if (channelResponses.Count == 0)
- {
- // Return none
- data.ClientObject.Queue(new MediusChannelListResponse()
- {
- MessageID = channelListRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusNoResult,
- EndOfList = true
- });
- }
- else
- {
- // Ensure the end of list flag is set
- channelResponses[channelResponses.Count - 1].EndOfList = true;
-
- // Add to responses
- data.ClientObject.Queue(channelResponses);
- }
-
-
- break;
- }
-
- #endregion
-
- #region Deadlocked No-op Messages (MAS)
-
- case MediusGetBuddyList_ExtraInfoRequest getBuddyList_ExtraInfoRequest:
- {
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusGetBuddyList_ExtraInfoResponse()
- {
- MessageID = getBuddyList_ExtraInfoRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusNoResult,
- EndOfList = true
- }
- }, clientChannel);
- break;
- }
-
- case MediusGetIgnoreListRequest getIgnoreListRequest:
- {
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusGetIgnoreListResponse()
- {
- MessageID = getIgnoreListRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusNoResult,
- EndOfList = true
- }
- }, clientChannel);
- break;
- }
-
- case MediusGetMyClansRequest getMyClansRequest:
- {
- Queue(new RT_MSG_SERVER_APP()
- {
- Message = new MediusGetMyClansResponse()
- {
- MessageID = getMyClansRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusNoResult,
- EndOfList = true
- }
- }, clientChannel);
- break;
- }
-
- #endregion
-
- #region TextFilter
-
- case MediusTextFilterRequest textFilterRequest:
- {
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {textFilterRequest} without a session.");
- break;
- }
-
- // Deny special characters
- // Also trim any whitespace
- switch (textFilterRequest.TextFilterType)
- {
- case MediusTextFilterType.MediusTextFilterPassFail:
- {
- // validate name
- if (!MediusClass.PassTextFilter(data.ApplicationId, Config.TextFilterContext.ACCOUNT_NAME, textFilterRequest.Text))
- {
- // Failed due to special characters
- data.ClientObject.Queue(new MediusTextFilterResponse()
- {
- MessageID = textFilterRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusFail
- });
- return;
- }
- else
- {
- data.ClientObject.Queue(new MediusTextFilterResponse()
- {
- MessageID = textFilterRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusPass,
- Text = textFilterRequest.Text.Trim()
- });
- }
- break;
- }
- case MediusTextFilterType.MediusTextFilterReplace:
- {
- data.ClientObject.Queue(new MediusTextFilterResponse()
- {
- MessageID = textFilterRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusPass,
- Text = MediusClass.FilterTextFilter(data.ApplicationId, TextFilterContext.ACCOUNT_NAME, textFilterRequest.Text).Trim()
- });
- break;
- }
- }
- break;
- }
-
- #endregion
-
- #region Time
- case MediusGetServerTimeRequest getServerTimeRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getServerTimeRequest} without a session.");
- break;
- }
-
- //Doesn't need to be logged in to get ServerTime
-
- var time = DateTime.Now;
-
- await GetTimeZone(time).ContinueWith((r) =>
- {
- if (r.IsCompletedSuccessfully)
- {
- //Fetched
- data.ClientObject.Queue(new MediusGetServerTimeResponse()
- {
- MessageID = getServerTimeRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Local_server_timezone = r.Result,
- });
- }
- else
- {
- //default
- data.ClientObject.Queue(new MediusGetServerTimeResponse()
- {
- MessageID = getServerTimeRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- Local_server_timezone = MediusTimeZone.MediusTimeZone_GMT,
- });
- }
- });
- break;
- }
- #endregion
-
- #region GetMyIP
- //Syphon Filter - The Omega Strain Beta
-
- case MediusGetMyIPRequest getMyIpRequest:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getMyIpRequest} without a session.");
- break;
- }
-
- IPAddress? ClientIP = (clientChannel.RemoteAddress as IPEndPoint)?.Address;
-
- if (ClientIP == null)
- {
- LoggerAccessor.LogInfo($"Error: Retrieving Client IP address {clientChannel.RemoteAddress} = [{ClientIP}]");
- data.ClientObject.Queue(new MediusGetMyIPResponse()
- {
- MessageID = getMyIpRequest.MessageID,
- IP = null,
- StatusCode = MediusCallbackStatus.MediusDMEError
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusGetMyIPResponse()
- {
- MessageID = getMyIpRequest.MessageID,
- IP = ClientIP,
- StatusCode = MediusCallbackStatus.MediusSuccess
- });
- }
-
- break;
- }
-
- #endregion
-
- #region UpdateUserState
- case MediusUpdateUserState updateUserState:
- {
- // ERROR - Need a session
- if (data.ClientObject == null)
- {
- LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {updateUserState} without a session.");
- break;
- }
-
- // ERROR - Needs to be logged in --Doesn't need to be logged in on older clients
-
- switch (updateUserState.UserAction)
- {
- case MediusUserAction.KeepAlive:
- {
- data.ClientObject.KeepAliveUntilNextConnection();
- break;
- }
- case MediusUserAction.JoinedChatWorld:
- {
- LoggerAccessor.LogInfo($"[MAS] - Successfully Joined ChatWorld [{data.ClientObject.CurrentChannel?.Id}] {data.ClientObject.AccountId}:{data.ClientObject.AccountName}");
- break;
- }
- case MediusUserAction.LeftGameWorld:
- {
- LoggerAccessor.LogInfo($"[MAS] - Successfully Left GameWorld {data.ClientObject.AccountId}:{data.ClientObject.AccountName}");
- MediusClass.AntiCheatPlugin.mc_anticheat_event_msg_UPDATEUSERSTATE(AnticheatEventCode.anticheatLEAVEGAME, data.ClientObject.MediusWorldID, data.ClientObject.AccountId, MediusClass.AntiCheatClient, updateUserState, 256);
- break;
- }
- case MediusUserAction.LeftPartyWorld:
- {
- LoggerAccessor.LogInfo($"[MAS] - Successfully Left PartyWorld {data.ClientObject.AccountId}:{data.ClientObject.AccountName}");
- break;
- }
- default:
- {
- LoggerAccessor.LogWarn($"[MAS] - Requested a non-existant UserState {data.ClientObject.AccountId}:{data.ClientObject.AccountName}, please report to GITHUB.");
- break;
- }
- }
-
- break;
- }
-
- #endregion
-
- default:
- {
- LoggerAccessor.LogWarn($"Unhandled Medius Message: {message}");
- break;
- }
- }
- }
-
- #region Login
- private async Task Login(MessageId messageId, IChannel clientChannel, ChannelData data, AccountDTO accountDto, bool ticket)
- {
- var fac = new PS2CipherFactory();
- var rsa = fac.CreateNew(CipherContext.RSA_AUTH) as PS2_RSA;
- IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
-
- List pre108Secure = new() { 10010, 10031, 10190, 10124, 10680, 10681, 10683, 10684 };
-
- if (data.ClientObject!.IP == IPAddress.Any)
- data.ClientObject!.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
-
- if ((data.ApplicationId == 20371 || data.ApplicationId == 20374) && data.ClientObject.ClientHomeData != null)
- {
- if (data.ClientObject.IsOnRPCN && data.ClientObject.ClientHomeData.VersionAsDouble >= 01.83)
- {
- if (!string.IsNullOrEmpty(data.ClientObject.ClientHomeData.Type) && (data.ClientObject.ClientHomeData.Type.Contains("HDK") || data.ClientObject.ClientHomeData.Type == "Online Debug"))
- _ = HomeRTMTools.SendRemoteCommand(data.ClientObject, "lc Debug.System( 'mlaaenable 0' )");
- else
- _ = HomeRTMTools.SendRemoteCommand(data.ClientObject, "mlaaenable 0");
- }
- /*else if (data.ClientObject.ClientHomeData.VersionAsDouble >= 01.83) // MSAA PS3 Only for now: https://github.com/RPCS3/rpcs3/issues/15719
- {
- if (!string.IsNullOrEmpty(data.ClientObject.ClientHomeData?.Type) && (data.ClientObject.ClientHomeData.Type.Contains("HDK") || data.ClientObject.ClientHomeData.Type == "Online Debug"))
- _ = HomeRTMTools.SendRemoteCommand(data.ClientObject, "lc Debug.System( 'msaaenable 1' )");
- else
- _ = HomeRTMTools.SendRemoteCommand(data.ClientObject, "msaaenable 1");
- }*/
-
- switch (data.ClientObject.ClientHomeData.Type)
- {
- case "HDK With Offline":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- if (MediusClass.Settings.PokePatchOn)
- {
- CheatQuery(0x005478dc, 4, clientChannel);
-
- CheatQuery(0x0016cc6c, 4, clientChannel);
- }
-
- CheatQuery(0x1054e5c0, 4, clientChannel);
- break;
- default:
- break;
- }
- break;
- case "HDK Online Only":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- default:
- break;
- }
- break;
- case "HDK Online Only (Dbg Symbols)":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.82.09":
- if (MediusClass.Settings.PokePatchOn)
- {
- CheatQuery(0x00531370, 4, clientChannel);
-
- CheatQuery(0x0016b4d0, 4, clientChannel);
- }
-
- CheatQuery(0x1053e160, 4, clientChannel);
- break;
- default:
- break;
- }
- break;
- case "Online Debug":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.83.12":
- if (MediusClass.Settings.PokePatchOn)
- {
- CheatQuery(0x00548bc0, 4, clientChannel);
-
- CheatQuery(0x001709e0, 4, clientChannel);
- }
-
- CheatQuery(0x1054e1c0, 4, clientChannel);
- break;
- case "01.86.09":
- if (MediusClass.Settings.PokePatchOn)
- {
- CheatQuery(0x00555cb4, 4, clientChannel);
-
- CheatQuery(0x0016dac0, 4, clientChannel);
- }
-
- CheatQuery(0x1054e358, 4, clientChannel);
- break;
- default:
- break;
- }
- break;
- case "Retail":
- switch (data.ClientObject.ClientHomeData.Version)
- {
- case "01.86.09":
- if (MediusClass.Settings.PokePatchOn)
- {
- CheatQuery(0x006f59b8, 4, clientChannel);
- CheatQuery(0x002aa960, 4, clientChannel);
- }
-
- CheatQuery(0x105c24c8, 4, clientChannel);
- break;
- default:
- break;
- }
- break;
- }
- }
-
- await data.ClientObject.Login(accountDto);
-
- #region Update DB IP and CID
- await HorizonServerConfiguration.Database.PostAccountIp(accountDto.AccountId, ((IPEndPoint)clientChannel.RemoteAddress).Address.MapToIPv4().ToString());
-
- CIDManager.CreateCIDPair(data.ClientObject.AccountName, data.MachineId);
-
- if (!string.IsNullOrEmpty(data.MachineId))
- await HorizonServerConfiguration.Database.PostMachineId(data.ClientObject.AccountId, data.MachineId);
- #endregion
-
- // Add to logged in clients
- MediusClass.Manager.AddOrUpdateLoggedInClient(data.ClientObject);
-
- LoggerAccessor.LogInfo($"LOGGING IN AS {data.ClientObject.AccountName} with access token {data.ClientObject.AccessToken}");
-
- // Tell client
- if (ticket)
- {
- #region IF PS3 Client
- data.ClientObject.Queue(new MediusTicketLoginResponse()
- {
- //TicketLoginResponse
- MessageID = messageId,
- StatusCodeTicketLogin = MediusCallbackStatus.MediusSuccess,
- PasswordType = MediusPasswordType.MediusPasswordNotSet,
-
- //AccountLoginResponse Wrapped
- MessageID2 = messageId,
- StatusCodeAccountLogin = MediusCallbackStatus.MediusSuccess,
- AccountID = data.ClientObject.AccountId,
- AccountType = MediusAccountType.MediusMasterAccount,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = new RSA_KEY(), //MediusStarter.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() {Address = !string.IsNullOrEmpty(MediusClass.Settings.NpMLSIpOverride) ? MediusClass.Settings.NpMLSIpOverride : MediusClass.LobbyServer.IPAddress.ToString(), Port = (MediusClass.Settings.NpMLSPortOverride != -1) ? MediusClass.Settings.NpMLSPortOverride : MediusClass.LobbyServer.TCPPort , AddressType = NetAddressType.NetAddressTypeExternal},
- new NetAddress() {Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService},
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- },
- });
- #endregion
-
- // Prepare for transition to lobby server
- data.ClientObject.KeepAliveUntilNextConnection();
- }
- else
- {
- #region If PS2/PSP
-
- if (data.ClientObject.MediusVersion > 108)
- {
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = messageId,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID = data.ClientObject.AccountId,
- AccountType = MediusAccountType.MediusMasterAccount,
- WorldID = data.ClientObject.CurrentChannel!.Id,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic,
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() {Address = MediusClass.LobbyServer.IPAddress.ToString(), Port = MediusClass.LobbyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal},
- new NetAddress() {Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService},
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- },
- });
- }
- else if (pre108Secure.Contains(data.ClientObject.ApplicationId)) //10683 / 10684
- {
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = messageId,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID = data.ClientObject.AccountId,
- AccountType = MediusAccountType.MediusMasterAccount,
- WorldID = data.ClientObject.CurrentChannel!.Id,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = new RSA_KEY(),
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() {Address = MediusClass.LobbyServer.IPAddress.ToString(), Port = MediusClass.LobbyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal},
- new NetAddress() {Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService},
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- },
- });
- }
- else
- {
- data.ClientObject.Queue(new MediusAccountLoginResponse()
- {
- MessageID = messageId,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID = data.ClientObject.AccountId,
- AccountType = MediusAccountType.MediusMasterAccount,
- WorldID = data.ClientObject.CurrentChannel!.Id,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = MediusClass.GlobalAuthPublic, //Some Older Medius games don't set a RSA Key
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() {Address = MediusClass.LobbyServer.IPAddress.ToString(), Port = MediusClass.LobbyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal},
- new NetAddress() {Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService},
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- },
- });
- }
-
- // Prepare for transition to lobby server
- data.ClientObject.KeepAliveUntilNextConnection();
- #endregion
- }
- }
- #endregion
-
- #region AnonymousLogin
- private async Task LoginAnonymous(MediusAnonymousLoginRequest anonymousLoginRequest, IChannel clientChannel, ChannelData data)
- {
- IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
- PS2CipherFactory fac = new();
- var rsa = fac.CreateNew(CipherContext.RSA_AUTH) as PS2_RSA;
-
- int iAccountID = MediusClass.Manager.AnonymousAccountIDGenerator(MediusClass.Settings.AnonymousIDRangeSeed);
- LoggerAccessor.LogInfo($"AnonymousIDRangeSeedGenerator AccountID returned {iAccountID}");
-
- if (data.ClientObject != null)
- {
- char[] charsToRemove = { ':', 'f', '{', '}' };
- if (data.ClientObject.IP == IPAddress.Any)
- data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(charsToRemove));
- }
-
- if (data.ClientObject != null)
- {
- CIDManager.CreateCIDPair("AnonymousClient", data.MachineId);
-
- // Login
- await data.ClientObject.LoginAnonymous(anonymousLoginRequest, iAccountID);
-
- #region Update DB IP and CID
-
- //We don't post to the database as anonymous... This ain't it chief
-
- #endregion
-
- // Add to logged in clients
- MediusClass.Manager.AddOrUpdateLoggedInClient(data.ClientObject);
-
- LoggerAccessor.LogInfo($"LOGGING IN ANONYMOUSLY AS {data.ClientObject.AccountDisplayName} with access token {data.ClientObject.AccessToken}");
-
- // Tell client
- data.ClientObject.Queue(new MediusAnonymousLoginResponse()
- {
- MessageID = anonymousLoginRequest.MessageID,
- StatusCode = MediusCallbackStatus.MediusSuccess,
- AccountID = iAccountID,
- AccountType = MediusAccountType.MediusMasterAccount,
- WorldID = data.ClientObject.CurrentChannel!.Id,
- ConnectInfo = new NetConnectionInfo()
- {
- AccessKey = data.ClientObject.AccessToken,
- SessionKey = data.ClientObject.SessionKey,
- TargetWorldID = data.ClientObject.CurrentChannel!.Id,
- ServerKey = new RSA_KEY(), // Null for 108 clients
- AddressList = new NetAddressList()
- {
- AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
- {
- new NetAddress() {Address = MediusClass.LobbyServer.IPAddress.ToString(), Port = MediusClass.LobbyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal},
- new NetAddress() {Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService},
- }
- },
- Type = NetConnectionType.NetConnectionTypeClientServerTCP
- }
- });
-
- data.ClientObject.KeepAliveUntilNextConnection();
- }
- }
- #endregion
-
- #region TimeZone
- public Task GetTimeZone(DateTime time)
- {
- var tz = TimeZoneInfo.Local;
- var tzStanName = tz.StandardName;
-
- if (tzStanName == "CEST")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_CEST);
- else if (tz.Id == "Swedish Standard Time")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_SWEDISHST);
- else if (tz.Id == "FST")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_FST);
- else if (tz.Id == "Central Africa Time")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_CAT);
- else if (tzStanName == "South Africa Standard Time")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_SAST);
- else if (tz.Id == "EET")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_EET);
- else if (tz.Id == "Israel Standard Time")
- return Task.FromResult(MediusTimeZone.MediusTimeZone_ISRAELST);
-
- return Task.FromResult(MediusTimeZone.MediusTimeZone_GMT);
- }
- #endregion
-
- #region ConvertFromIntegerToIpAddress
- ///
- /// Convert from Binary Ip Address to UInt
- ///
- /// Binary formatted IP Address
- ///
- public static string ConvertFromIntegerToIpAddress(uint ipAddress)
- {
- byte[] bytes = BitConverter.GetBytes(ipAddress);
-
- if (!BitConverter.IsLittleEndian)
- Array.Reverse(bytes);
-
- return new IPAddress(bytes).ToString();
- }
- #endregion
-
- #region ConvertFromIntegerToPort
- ///
- /// Convert from Binary Ip Address to UInt
- ///
- /// Binary formatted IP Address
- ///
- public static int ConvertFromIntegerToPort(string port)
- {
- int i = Convert.ToInt32(port, 2);
-
- // flip little-endian to big-endian(network order)
- /* NOT NEEDED
- if (BitConverter.IsLittleEndian)
- {
- Array.Reverse(bytes);
- }
- */
- return i;
- }
- #endregion
-
- #region ConvertFromIntegerToIpAddress
- ///
- /// Convert from Binary Ip Address to UInt
- ///
- /// Binary formatted IP Address
- ///
- public static uint ConvertFromIpAddressToBinary(IPAddress ipAddress)
- {
- uint Uint = (uint)BitConverter.ToInt32(ipAddress.GetAddressBytes());
-
- // flip little-endian to big-endian(network order)
- /* NOT NEEDED
- if (BitConverter.IsLittleEndian)
- {
- Array.Reverse(bytes);
- }
- */
- return Uint;
- }
- #endregion
-
- #region PokeEngine
-
- private void PokePatch(IChannel clientChannel, ChannelData data)
- {
- if (MediusClass.Settings.PokePatchOn)
- {
- if (File.Exists(Directory.GetCurrentDirectory() + $"/static/poke_config.json"))
- {
- try
- {
- JObject? jsonObject = JObject.Parse(File.ReadAllText(Directory.GetCurrentDirectory() + $"/static/poke_config.json"));
-
- foreach (JProperty? appProperty in jsonObject.Properties())
- {
- string? appId = appProperty.Name;
-
- if (!string.IsNullOrEmpty(appId) && appId == data.ApplicationId.ToString())
- {
- if (appProperty.Value is JObject innerObject)
- {
- foreach (JProperty? offsetProperty in innerObject.Properties())
- {
- string? offset = offsetProperty.Name;
- string? valuestr = offsetProperty.Value.ToString();
-
- if (!string.IsNullOrEmpty(offset) && !string.IsNullOrEmpty(valuestr) && uint.TryParse(offset.Replace("0x", string.Empty), NumberStyles.HexNumber, null, out uint offsetValue) && uint.TryParse(valuestr, NumberStyles.Any, null, out uint hexValue))
- {
- LoggerAccessor.LogInfo($"[MAS] - MemoryPoke sent to appid {appId} with infos : offset:{offset} - value:{valuestr}");
- Queue(new RT_MSG_SERVER_MEMORY_POKE()
- {
- start_Address = offsetValue,
- Payload = BitConverter.GetBytes(hexValue),
- SkipEncryption = true
-
- }, clientChannel);
- }
- else
- LoggerAccessor.LogWarn($"[MAS] - MemoryPoke failed to convert json properties! Check your Json syntax.");
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- LoggerAccessor.LogWarn($"[MAS] - MemoryPoke failed to initialise! {ex}.");
- }
- }
- else
- LoggerAccessor.LogWarn($"[MAS] - No MemoryPoke config found.");
- }
- }
-
- private bool CheatQuery(uint address, int Length, IChannel? clientChannel, CheatQueryType Type = CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int SequenceId = 1)
- {
- // address = 0, don't read
- if (address == 0)
- return false;
-
- // client channel is null, don't read
- if (clientChannel == null)
- return false;
-
- // read client memory
- Queue(new RT_MSG_SERVER_CHEAT_QUERY()
- {
- QueryType = Type,
- SequenceId = SequenceId,
- StartAddress = address,
- Length = Length,
- }, clientChannel);
-
- // return read
- return true;
- }
-
- private bool PatchHttpsSVOCheck(uint patchLocation, IChannel? clientChannel)
- {
- // patch location = 0, don't patch
- if (patchLocation == 0)
- return false;
-
- // client channel is null, don't patch
- if (clientChannel == null)
- return false;
-
- // poke client memory
- Queue(new RT_MSG_SERVER_MEMORY_POKE()
- {
- start_Address = patchLocation,
- Payload = new byte[] { 0x3A, 0x2F }, // We patch to :/ instead of s: as the check only compare first 6 characters.
- SkipEncryption = false,
- }, clientChannel);
-
- // return patched
- return true;
- }
-
- private bool PokeAddress(uint patchLocation, byte[] Payload, IChannel? clientChannel)
- {
- // patch location = 0, don't patch
- if (patchLocation == 0)
- return false;
-
- // client channel is null, don't patch
- if (clientChannel == null)
- return false;
-
- // poke client memory
- Queue(new RT_MSG_SERVER_MEMORY_POKE()
- {
- start_Address = patchLocation,
- Payload = Payload,
- SkipEncryption = false,
- }, clientChannel);
-
- // return patched
- return true;
- }
- #endregion
-
- #region SHA256
-
- ///
- /// Compute the SHA256 checksum of a string.
- /// Calcul la somme des contr�les en SHA256 d'un string.
- ///
- /// The input string.
- /// A string.
- private static string ComputeSHA256(string input)
- {
- // ComputeHash - returns byte array
- byte[] bytes = NetHasher.DotNetHasher.ComputeSHA256(Encoding.UTF8.GetBytes(input));
-
- // Convert byte array to a string
- StringBuilder builder = new();
- for (int i = 0; i < bytes.Length; i++)
- builder.Append(bytes[i].ToString("x2"));
-
- return builder.ToString();
- }
- #endregion
- }
-}
+using CustomLogger;
+using DotNetty.Transport.Channels;
+using EndianTools;
+using Horizon.HTTPSERVICE;
+using Horizon.LIBRARY.Common;
+using Horizon.LIBRARY.Database.Models;
+using Horizon.MUM.Models;
+using Horizon.PluginManager;
+using Horizon.RT.Common;
+using Horizon.RT.Cryptography;
+using Horizon.RT.Cryptography.RSA;
+using Horizon.RT.Models;
+using Horizon.SERVER.Config;
+using Horizon.SERVER.Extension.PlayStationHome;
+using Horizon.SERVER.PluginArgs;
+using NetworkLibrary.Extension;
+using Newtonsoft.Json.Linq;
+using System.Buffers;
+using System.Globalization;
+using System.Net;
+using System.Text;
+using System.Text.RegularExpressions;
+using XI5;
+
+namespace Horizon.SERVER.Medius
+{
+ public class MAS : BaseMediusComponent
+ {
+ public override int TCPPort => MediusClass.Settings.MASPort;
+ public override int UDPPort => 00000;
+
+ public static ServerSettings Settings = new();
+
+ public MAS()
+ {
+
+ }
+
+ public static void ReserveClient(ClientObject client)
+ {
+ MediusClass.Manager.AddClient(client);
+ }
+
+ protected override async Task ProcessMessage(BaseScertMessage message, IChannel clientChannel, ChannelData data)
+ {
+ // Get ScertClient data
+ var scertClient = clientChannel.GetAttribute(LIBRARY.Pipeline.Constants.SCERT_CLIENT).Get();
+ var enableEncryption = MediusClass.GetAppSettingsOrDefault(data.ApplicationId).EnableEncryption;
+ if (scertClient.CipherService != null)
+ scertClient.CipherService.EnableEncryption = enableEncryption;
+
+ switch (message)
+ {
+ case RT_MSG_CLIENT_HELLO clientHello:
+ {
+ // send hello
+ Queue(new RT_MSG_SERVER_HELLO() { RsaPublicKey = enableEncryption ? MediusClass.Settings.DefaultKey.N : Org.BouncyCastle.Math.BigInteger.Zero }, clientChannel);
+ break;
+ }
+ case RT_MSG_CLIENT_CRYPTKEY_PUBLIC clientCryptKeyPublic:
+ {
+ if (clientCryptKeyPublic.PublicKey != null)
+ {
+ // generate new client session key
+ scertClient.CipherService?.GenerateCipher(CipherContext.RSA_AUTH, clientCryptKeyPublic.PublicKey.Reverse().ToArray());
+ scertClient.CipherService?.GenerateCipher(CipherContext.RC_CLIENT_SESSION);
+
+ Queue(new RT_MSG_SERVER_CRYPTKEY_PEER() { SessionKey = scertClient.CipherService?.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
+ }
+ break;
+ }
+ case RT_MSG_CLIENT_CONNECT_TCP clientConnectTcp:
+ {
+ #region Check if AppId from Client matches Server
+ if (!MediusClass.Manager.IsAppIdSupported(clientConnectTcp.AppId))
+ {
+ LoggerAccessor.LogError($"Client {clientChannel.RemoteAddress} attempting to authenticate with incompatible app id {clientConnectTcp.AppId}");
+ await clientChannel.CloseAsync();
+ return;
+ }
+ #endregion
+
+ List pre108ServerComplete = new() { 10114, 10130, 10164, 10190, 10124, 10284, 10330, 10334, 10414, 10421, 10442, 10538, 10540, 10550, 10582, 10584, 10680, 10681, 10683, 10684, 10724 };
+
+ ///
+ /// Some do not post-108 so we have to account for those too!
+ /// tmheadon 10694 does not for initial
+ ///
+ List post108ServerComplete = new() { 10694 };
+
+ data.ApplicationId = clientConnectTcp.AppId;
+ scertClient.ApplicationID = clientConnectTcp.AppId;
+
+ Channel? targetChannel = MediusClass.Manager.GetChannelByChannelId(clientConnectTcp.TargetWorldId, data.ApplicationId);
+
+ if (targetChannel == null)
+ {
+ Channel DefaultChannel = MediusClass.Manager.GetOrCreateDefaultLobbyChannel(data.ApplicationId, scertClient.MediusVersion ?? 0);
+
+ if (DefaultChannel.Id == clientConnectTcp.TargetWorldId)
+ targetChannel = DefaultChannel;
+
+ if (targetChannel == null)
+ {
+ LoggerAccessor.LogError($"[MAS] - Client: {clientConnectTcp.AccessToken} tried to join, but targetted WorldId:{clientConnectTcp.TargetWorldId} doesn't exist!");
+ await clientChannel.CloseAsync();
+ break;
+ }
+ }
+
+ // If booth are null, it means MAS client wants a new object.
+ if (!string.IsNullOrEmpty(clientConnectTcp.AccessToken) && !string.IsNullOrEmpty(clientConnectTcp.SessionKey))
+ {
+ data.ClientObject = MediusClass.Manager.GetClientByAccessToken(clientConnectTcp.AccessToken, clientConnectTcp.AppId);
+ if (data.ClientObject == null)
+ data.ClientObject = MediusClass.Manager.GetClientBySessionKey(clientConnectTcp.SessionKey, clientConnectTcp.AppId);
+
+ if (data.ClientObject != null)
+ LoggerAccessor.LogInfo($"[MAS] - Client Connected {clientChannel.RemoteAddress}!");
+ else
+ {
+ data.Ignore = true;
+ LoggerAccessor.LogError($"[MAS] - ClientObject could not be granted for {clientChannel.RemoteAddress}: {clientConnectTcp}");
+ break;
+ }
+
+ data.ClientObject.MediusVersion = scertClient.MediusVersion ?? 0;
+ data.ClientObject.ApplicationId = clientConnectTcp.AppId;
+ data.ClientObject.OnConnected();
+ }
+ else
+ {
+ LoggerAccessor.LogInfo($"[MAS] - Client Connected {clientChannel.RemoteAddress} with new ClientObject!");
+
+ data.ClientObject = new(scertClient.MediusVersion ?? 0)
+ {
+ ApplicationId = clientConnectTcp.AppId
+ };
+ data.ClientObject.OnConnected();
+
+ ReserveClient(data.ClientObject); // ONLY RESERVE CLIENTS HERE!
+ }
+
+ await data.ClientObject.JoinChannel(targetChannel);
+
+ #region if PS3
+ if (scertClient.IsPS3Client)
+ {
+ List ConnectAcceptTCPGames = new() { 20623, 20624, 21564, 21574, 21584, 21594, 22274, 22284, 22294, 22304, 20040, 20041, 20042, 20043, 20044 };
+
+ //CAC & Warhawk
+ if (ConnectAcceptTCPGames.Contains(scertClient.ApplicationID))
+ {
+ Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
+ {
+ PlayerId = 0,
+ ScertId = GenerateNewScertClientId(),
+ PlayerCount = 0x0001,
+ IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
+ }, clientChannel);
+ }
+ else
+ Queue(new RT_MSG_SERVER_CONNECT_REQUIRE(), clientChannel);
+ }
+ #endregion
+ else if (scertClient.MediusVersion > 108 && scertClient.ApplicationID != 11484)
+ Queue(new RT_MSG_SERVER_CONNECT_REQUIRE(), clientChannel);
+ else
+ {
+ //Older Medius titles do NOT use CRYPTKEY_GAME, newer ones have this.
+ if (scertClient.CipherService != null && scertClient.CipherService.HasKey(CipherContext.RC_CLIENT_SESSION) && scertClient.MediusVersion >= 109)
+ Queue(new RT_MSG_SERVER_CRYPTKEY_GAME() { GameKey = scertClient.CipherService.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
+ Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
+ {
+ PlayerId = 0,
+ ScertId = GenerateNewScertClientId(),
+ PlayerCount = 0x0001,
+ IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
+ }, clientChannel);
+
+ if (pre108ServerComplete.Contains(data.ApplicationId) || post108ServerComplete.Contains(data.ApplicationId))
+ Queue(new RT_MSG_SERVER_CONNECT_COMPLETE() { ClientCountAtConnect = 0x0001 }, clientChannel);
+ }
+
+ if (MediusClass.Settings.HttpsSVOCheckPatcher)
+ {
+ switch (data.ApplicationId)
+ {
+ case 20371:
+ CheatQuery(0x10085d80, 6, clientChannel); // PS Home 1.50 Beta
+ break;
+ case 20384:
+ CheatQuery(0x008625b0, 6, clientChannel); // SingStar Vol3 Retail
+ CheatQuery(0x00b96850, 6, clientChannel); // SingStar Starter Pack
+ break;
+ case 21354:
+ CheatQuery(0x008625E0, 6, clientChannel); // SingStar Hits v1.00
+ break;
+ case 21574:
+ CheatQuery(0x0070c068, 6, clientChannel); // Warhawk EU v1.50
+ break;
+ case 21564:
+ CheatQuery(0x0070BFF8, 6, clientChannel); // Warhawk US v1.50
+ break;
+ case 22924:
+ CheatQuery(0x00df0008, 6, clientChannel); // Starhawk v1.4 Retail
+ break;
+ }
+ }
+
+ if (data.ApplicationId == 20371 || data.ApplicationId == 20374)
+ CheatQuery(0x00010000, 512000, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_SHA1_HASH, unchecked((int)0xDEADBEEF));
+
+ PokePatch(clientChannel, data);
+
+ break;
+ }
+
+ case RT_MSG_SERVER_CHEAT_QUERY clientCheatQuery:
+ {
+ byte[]? QueryData = clientCheatQuery.Data;
+
+ if (QueryData != null)
+ {
+ LoggerAccessor.LogDebug($"[MAS] - QUERY CHECK - Client:{data.ClientObject?.IP} Has Data:{QueryData.ToHexString()} in offset: {clientCheatQuery.StartAddress}");
+
+ if (MediusClass.Settings.HttpsSVOCheckPatcher && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 6
+ && QueryData.EqualsTo(new byte[] { 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A }))
+ PatchHttpsSVOCheck(clientCheatQuery.StartAddress + 4, clientChannel);
+
+ if (data.ApplicationId == 20371 || data.ApplicationId == 20374)
+ {
+ if (data.ClientObject?.ClientHomeData != null)
+ {
+ switch (data.ClientObject.ClientHomeData.Type)
+ {
+ case "HDK With Offline":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.86.09":
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 0x005478dc:
+ // 4096 character command line limit.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
+ {
+ PokeAddress(0x005478dc, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
+ PokeAddress(0x00548378, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
+ }
+ break;
+ case 0x1054e5c0:
+ // Sets WorldCorePointer.
+ if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
+ data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
+ break;
+ case 0x0016cc6c:
+ // Patches out the forceInvite command.
+ if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
+ PokeAddress(0x0016cc6c, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case "HDK Online Only":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ default:
+ break;
+ }
+ break;
+ case "HDK Online Only (Dbg Symbols)":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.82.09":
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 0x00531370:
+ // 4096 character command line limit.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
+ {
+ PokeAddress(0x00531370, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
+ PokeAddress(0x00531e08, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
+ }
+ break;
+ case 0x1053e160:
+ // Sets WorldCorePointer.
+ if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
+ data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
+ break;
+ case 0x0016b4d0:
+ // Patches out the forceInvite command.
+ if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
+ PokeAddress(0x0016b4d0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case "Online Debug":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.83.12":
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 0x00548bc0:
+ // 4096 character command line limit.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
+ {
+ PokeAddress(0x00548bc0, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
+ PokeAddress(0x0054964c, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
+ }
+ break;
+ case 0x1054e1c0:
+ // Sets WorldCorePointer.
+ if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
+ data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
+ break;
+ case 0x001709e0:
+ // Patches out the forceInvite command.
+ if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
+ PokeAddress(0x001709e0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
+ break;
+ }
+ break;
+ case "01.86.09":
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 0x00555cb4:
+ // 4096 character command line limit.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x83, 0x00, 0xfe }))
+ {
+ PokeAddress(0x00555cb4, new byte[] { 0x2f, 0x83, 0x0f, 0xff }, clientChannel);
+ PokeAddress(0x00556740, new byte[] { 0x2b, 0x83, 0x0f, 0xff }, clientChannel);
+ }
+ break;
+ case 0x1054e358:
+ // Sets WorldCorePointer.
+ if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
+ data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
+ break;
+ case 0x0016dac0:
+ // Patches out the forceInvite command.
+ if (MediusClass.Settings.PlaystationHomeForceInviteExploitPatch && MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x2f, 0x80, 0x00, 0x00 }))
+ PokeAddress(0x0016dac0, new byte[] { 0x2f, 0x80, 0x00, 0x02 }, clientChannel);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case "Retail":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.86.09":
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 0x006f59b8:
+ // Grant PS Plus for 1.86 retail.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x54, 0x63, 0xd9, 0x7e }))
+ {
+ byte[] liPatch = new byte[] { 0x38, 0x60, 0x00, 0x01 };
+ PokeAddress(0x006f59b8, liPatch, clientChannel);
+ PokeAddress(0x0073bdb0, liPatch, clientChannel);
+ }
+ break;
+ case 0x002aa960:
+ // Disable SSFW Reward check for 1.86 retail.
+ if (MediusClass.Settings.PokePatchOn && clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4 && QueryData.EqualsTo(new byte[] { 0x7c, 0x65, 0x1b, 0x78 }))
+ PokeAddress(0x002aa960, new byte[] { 0x48, 0x40, 0xe2, 0x2c }, clientChannel);
+ break;
+ case 0x105c24c8:
+ // Sets WorldCorePointer.
+ if (clientCheatQuery.QueryType == CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY && QueryData.Length == 4)
+ data.ClientObject.SetWorldCorePointer(BitConverter.ToUInt32(BitConverter.IsLittleEndian ? EndianUtils.ReverseArray(QueryData) : QueryData));
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ }
+
+ switch (clientCheatQuery.SequenceId)
+ {
+ case int.MinValue:
+ if (data.ClientObject != null)
+ data.ClientObject.SSFWid = Encoding.ASCII.GetString(clientCheatQuery.Data);
+ break;
+ case -559038737:
+ switch (clientCheatQuery.StartAddress)
+ {
+ case 65536:
+ if (data.ClientObject != null)
+ {
+ if (data.ClientObject.ClientHomeData == null)
+ data.ClientObject.ClientHomeData = MediusClass.HomeOffsetsList.Where(x => !string.IsNullOrEmpty(x.Sha1Hash) && x.Sha1Hash[..^8]
+ .Equals(clientCheatQuery.Data.ToHexString(), StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
+
+ if (data.ClientObject.ClientHomeData != null)
+ {
+ switch (data.ClientObject.ClientHomeData.Type)
+ {
+ case "HDK With Offline":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.86.09":
+ CheatQuery(0x10244430, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
+ break;
+ default:
+ break;
+ }
+ break;
+ case "HDK Online Only":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ default:
+ break;
+ }
+ break;
+ case "HDK Online Only (Dbg Symbols)":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.82.09":
+ CheatQuery(0x10234440, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
+ break;
+ default:
+ break;
+ }
+ break;
+ case "Online Debug":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.83.12":
+ CheatQuery(0x10244439, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
+ break;
+ case "01.86.09":
+ CheatQuery(0x10244428, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
+ break;
+ default:
+ break;
+ }
+ break;
+ case "Retail":
+ switch (data.ClientObject.ClientHomeData.Version)
+ {
+ case "01.86.09":
+ CheatQuery(0x101555f0, 36, clientChannel, CheatQueryType.DME_SERVER_CHEAT_QUERY_RAW_MEMORY, int.MinValue);
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ }
+ else if (!MediusClass.Settings.PlaystationHomeAllowAnyEboot)
+ {
+ string anticheatMsg = $"[SECURITY] - HOME ANTI-CHEAT - DETECTED UNKNOWN EBOOT - User:{data.ClientObject.IP + ":" + data.ClientObject.AccountName} CID:{data.MachineId}";
+
+ _ = data.ClientObject.CurrentChannel?.BroadcastSystemMessage(data.ClientObject.CurrentChannel.LocalClients.Where(x => x != data.ClientObject), anticheatMsg, byte.MaxValue);
+
+ LoggerAccessor.LogError(anticheatMsg);
+
+ await HorizonServerConfiguration.Database.BanIp(data.ClientObject.IP).ContinueWith((r) =>
+ {
+ if (r.IsCompletedSuccessfully && r.Result)
+ {
+ // Banned
+ QueueBanMessage(data);
+ }
+ data.ClientObject.ForceDisconnect();
+ _ = data.ClientObject.Logout();
+ });
+ }
+ }
+ break;
+ }
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ case RT_MSG_CLIENT_CONNECT_READY_REQUIRE clientConnectReadyRequire:
+ {
+ if (scertClient.CipherService != null && scertClient.CipherService.HasKey(CipherContext.RC_CLIENT_SESSION) && !scertClient.IsPS3Client)
+ Queue(new RT_MSG_SERVER_CRYPTKEY_GAME() { GameKey = scertClient.CipherService.GetPublicKey(CipherContext.RC_CLIENT_SESSION) }, clientChannel);
+ Queue(new RT_MSG_SERVER_CONNECT_ACCEPT_TCP()
+ {
+ PlayerId = 0,
+ ScertId = GenerateNewScertClientId(),
+ PlayerCount = 0x0001,
+ IP = (clientChannel.RemoteAddress as IPEndPoint)?.Address
+ }, clientChannel);
+ break;
+ }
+
+ case RT_MSG_CLIENT_CONNECT_READY_TCP clientConnectReadyTcp:
+ {
+ Queue(new RT_MSG_SERVER_CONNECT_COMPLETE() { ClientCountAtConnect = 0x0001 }, clientChannel);
+
+ if (scertClient.MediusVersion > 108)
+ Queue(new RT_MSG_SERVER_ECHO(), clientChannel);
+ break;
+ }
+
+ #region Echos
+ case RT_MSG_SERVER_ECHO serverEchoReply:
+ {
+
+ break;
+ }
+ case RT_MSG_CLIENT_ECHO clientEcho:
+ {
+ Queue(new RT_MSG_CLIENT_ECHO() { Value = clientEcho.Value }, clientChannel);
+ break;
+ }
+ #endregion
+
+ case RT_MSG_CLIENT_APP_TOSERVER clientAppToServer:
+ {
+ if (clientAppToServer.Message != null)
+ await ProcessMediusMessage(clientAppToServer.Message, clientChannel, data);
+ break;
+ }
+
+ #region Client Disconnect
+ case RT_MSG_CLIENT_DISCONNECT _:
+ {
+ //Medius 1.08 (Used on WRC 4) haven't a state
+ if (scertClient.MediusVersion > 108)
+ data.State = ClientState.DISCONNECTED;
+
+ await clientChannel.CloseAsync();
+
+ LoggerAccessor.LogInfo($"[MAS] - Client disconnected by request with no specific reason\n");
+ break;
+ }
+ case RT_MSG_CLIENT_DISCONNECT_WITH_REASON clientDisconnectWithReason:
+ {
+ if (clientDisconnectWithReason.Reason <= RT_MSG_CLIENT_DISCONNECT_REASON.RT_MSG_CLIENT_DISCONNECT_LENGTH_MISMATCH)
+ LoggerAccessor.LogInfo($"[MAS] - Disconnected by request with reason of {clientDisconnectWithReason.Reason}\n");
+ else
+ LoggerAccessor.LogInfo($"[MAS] - Disconnected by request with (application specified) reason of {clientDisconnectWithReason.Reason}\n");
+
+ data.State = ClientState.DISCONNECTED;
+ await clientChannel.CloseAsync();
+ break;
+ }
+ #endregion
+
+ default:
+ {
+ LoggerAccessor.LogWarn($"UNHANDLED RT MESSAGE: {message}");
+ break;
+ }
+ }
+
+ return;
+ }
+
+ protected virtual async Task ProcessMediusMessage(BaseMediusMessage message, IChannel clientChannel, ChannelData data)
+ {
+ var scertClient = clientChannel.GetAttribute(LIBRARY.Pipeline.Constants.SCERT_CLIENT).Get();
+ if (message == null)
+ return;
+
+ var appSettings = MediusClass.GetAppSettingsOrDefault(data.ApplicationId);
+
+ switch (message)
+ {
+ #region MGCL - Dme
+
+ case MediusServerSessionBeginRequest serverSessionBeginRequest:
+ {
+ List nonSecure = new() { 10010, 10031 };
+
+ if (data.ClientObject != null)
+ {
+ // MGCL_SEND_FAILED, MGCL_UNSUCCESSFUL
+ if (!data.ClientObject.IsConnected)
+ {
+ data.ClientObject.Queue(new MediusServerSessionBeginResponse()
+ {
+ MessageID = serverSessionBeginRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_UNSUCCESSFUL
+ });
+ }
+ else
+ {
+ IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
+
+ data.ClientObject.LocationId = serverSessionBeginRequest.LocationID;
+ data.ClientObject.ServerType = serverSessionBeginRequest.ServerType;
+ data.ClientObject.ServerVersion = serverSessionBeginRequest.ServerVersion;
+ data.ClientObject.Port = serverSessionBeginRequest.Port;
+ data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
+ data.ClientObject.BeginServerSession();
+
+ if (nonSecure.Contains(data.ClientObject.ApplicationId))
+ {
+ // TM:BO Reply unencrypted
+ data.ClientObject.Queue(new MediusServerSessionBeginResponse()
+ {
+ MessageID = serverSessionBeginRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = new RSA_KEY(),
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerUDP
+ }
+ });
+ }
+ else
+ {
+ // Default Reply
+ data.ClientObject.Queue(new MediusServerSessionBeginResponse()
+ {
+ MessageID = serverSessionBeginRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = MediusClass.GlobalAuthPublic,
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerUDP
+ }
+ });
+ }
+
+ data.ClientObject.KeepAliveUntilNextConnection();
+ }
+ }
+ break;
+ }
+
+ case MediusServerSessionBeginRequest1 serverSessionBeginRequest1:
+ {
+ if (data.ClientObject != null)
+ {
+ IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
+
+ data.ClientObject.LocationId = serverSessionBeginRequest1.LocationID;
+ data.ClientObject.ServerType = serverSessionBeginRequest1.ServerType;
+ data.ClientObject.Port = serverSessionBeginRequest1.Port;
+ data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
+ data.ClientObject.BeginServerSession();
+
+ LoggerAccessor.LogInfo($"[MAS] - Registered MGCL client for appid {data.ClientObject.ApplicationId} with access token {data.ClientObject.AccessToken}");
+
+ //Send NAT Service
+ data.ClientObject.Queue(new MediusServerSessionBeginResponse()
+ {
+ MessageID = serverSessionBeginRequest1.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = MediusClass.GlobalAuthPublic,
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerUDP
+ }
+ });
+ }
+
+ break;
+ }
+
+ case MediusServerSessionBeginRequest2 serverSessionBeginRequest2:
+ {
+ if (data.ClientObject != null)
+ {
+ IPHostEntry host = Dns.GetHostEntry(MediusClass.Settings.NATIp ?? "natservice.pdonline.scea.com");
+
+ data.ClientObject.LocationId = serverSessionBeginRequest2.LocationID;
+ data.ClientObject.ServerType = serverSessionBeginRequest2.ServerType;
+ data.ClientObject.Port = serverSessionBeginRequest2.Port;
+ data.ClientObject.SetIp(((IPEndPoint)clientChannel.RemoteAddress).Address.ToString().Trim(new char[] { ':', 'f', '{', '}' }));
+ data.ClientObject.BeginServerSession();
+
+ //Send NAT Service
+ data.ClientObject.Queue(new MediusServerSessionBeginResponse()
+ {
+ MessageID = serverSessionBeginRequest2.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = MediusClass.GlobalAuthPublic,
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = host.AddressList.First().ToString(), Port = MediusClass.Settings.NATPort, AddressType = NetAddressType.NetAddressTypeNATService },
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerUDP
+ }
+ });
+ }
+
+ break;
+ }
+
+ case MediusServerAuthenticationRequest mgclAuthRequest:
+ {
+ List nonSecure = new() { 10010, 10031, 10190 };
+
+ if (data.ClientObject != null)
+ {
+ data.ClientObject.MGCL_TRUST_LEVEL = mgclAuthRequest.TrustLevel;
+ data.ClientObject.NetConnectionType = NetConnectionType.NetConnectionTypeClientServerTCP;
+
+ if (mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryExternal)
+ data.ClientObject.SetIp(ConvertFromIntegerToIpAddress(mgclAuthRequest.AddressList.AddressList[0].BinaryAddress));
+ else if (mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryExternalVport
+ || mgclAuthRequest.AddressList.AddressList[0].AddressType == NetAddressType.NetAddressTypeBinaryInternalVport)
+ {
+ data.ClientObject.SetIp(mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitOne + "." +
+ mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitTwo + "." +
+ mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitThree + "." +
+ mgclAuthRequest.AddressList.AddressList[0].IPBinaryBitFour);
+ }
+ else
+ // NetAddressTypeExternal
+ data.ClientObject.SetIp(mgclAuthRequest.AddressList.AddressList[0].Address ?? "0.0.0.0");
+
+ if (nonSecure.Contains(data.ClientObject.ApplicationId))
+ {
+ data.ClientObject.Queue(new MediusServerAuthenticationResponse()
+ {
+ MessageID = mgclAuthRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = new RSA_KEY(),
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ new NetAddress() { AddressType = NetAddressType.NetAddressNone }
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerTCP
+ }
+ });
+
+ // Keep the client alive until the dme objects connects to MPS or times out
+ data.ClientObject.OnConnected();
+ data.ClientObject.KeepAliveUntilNextConnection();
+ }
+ else
+ {
+ data.ClientObject.Queue(new MediusServerAuthenticationResponse()
+ {
+ MessageID = mgclAuthRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS,
+ ConnectInfo = new NetConnectionInfo()
+ {
+ AccessKey = data.ClientObject.AccessToken,
+ SessionKey = data.ClientObject.SessionKey,
+ TargetWorldID = data.ClientObject.CurrentChannel!.Id,
+ ServerKey = MediusClass.GlobalAuthPublic,
+ AddressList = new NetAddressList()
+ {
+ AddressList = new NetAddress[Constants.NET_ADDRESS_LIST_COUNT]
+ {
+ new NetAddress() { Address = MediusClass.ProxyServer.IPAddress.ToString(), Port = MediusClass.ProxyServer.TCPPort, AddressType = NetAddressType.NetAddressTypeExternal },
+ new NetAddress() { AddressType = NetAddressType.NetAddressNone },
+ }
+ },
+ Type = NetConnectionType.NetConnectionTypeClientServerTCP
+ }
+ });
+
+ // Keep the client alive until the dme objects connects to MPS or times out
+ data.ClientObject.OnConnected();
+ data.ClientObject.KeepAliveUntilNextConnection();
+ }
+ }
+
+ break;
+ }
+
+ case MediusServerSetAttributesRequest mgclSetAttrRequest:
+ {
+ ClientObject? dmeObject = data.ClientObject;
+ if (dmeObject == null)
+ {
+ LoggerAccessor.LogError($"[MAS] - Non-DME Client sending MGCL messages.");
+ break;
+ }
+
+ dmeObject.MGCL_SERVER_ATTRIBUTES = mgclSetAttrRequest.Attributes;
+ dmeObject.SetIpPort(mgclSetAttrRequest.ListenServerAddress);
+
+ // Reply with success
+ dmeObject.Queue(new MediusServerSetAttributesResponse()
+ {
+ MessageID = mgclSetAttrRequest.MessageID,
+ Confirmation = MGCL_ERROR_CODE.MGCL_SUCCESS
+ });
+ break;
+ }
+
+ case MediusServerSessionEndRequest sessionEndRequest:
+ {
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} is trying to end server session without an Client Object");
+ break;
+ }
+
+ data.ClientObject.EndServerSession();
+
+ Queue(new RT_MSG_SERVER_APP()
+ {
+ Message = new MediusServerSessionEndResponse()
+ {
+ MessageID = sessionEndRequest.MessageID,
+ ErrorCode = MGCL_ERROR_CODE.MGCL_SUCCESS
+ }
+ }, clientChannel);
+
+ break;
+ }
+
+ case MediusServerReport serverReport:
+ {
+ data.ClientObject?.OnServerReport(serverReport);
+ break;
+ }
+
+ #endregion
+
+ #region Session
+
+ case MediusExtendedSessionBeginRequest extendedSessionBeginRequest:
+ {
+ if (data.ClientObject != null)
+ {
+ data.ClientObject.MediusConnectionType = extendedSessionBeginRequest.ConnectionClass;
+
+ await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
+ {
+ if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
+ {
+ // Ensure that maintenance is active
+ // Ensure that we're past the from date
+ // Ensure that we're before the to date (if set)
+ if (r.Result.MaintenanceMode.IsActive
+ && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
+ && (!r.Result.MaintenanceMode.ToDt.HasValue
+ || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
+ QueueBanMessage(data, "Server in maintenance mode.");
+ else
+ {
+ // Reply
+ data.ClientObject.Queue(new MediusSessionBeginResponse()
+ {
+ MessageID = extendedSessionBeginRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess,
+ SessionKey = data.ClientObject.SessionKey
+ });
+ }
+ }
+ });
+ }
+ break;
+ }
+ case MediusSessionBeginRequest sessionBeginRequest:
+ {
+ if (data.ClientObject != null)
+ {
+ data.ClientObject.MediusConnectionType = sessionBeginRequest.ConnectionClass;
+
+ LoggerAccessor.LogInfo($"Retrieved ApplicationID {data.ClientObject.ApplicationId} from client connection");
+
+ await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
+ {
+ if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
+ {
+ #region Maintenance Mode?
+ // Ensure that maintenance is active
+ // Ensure that we're past the from date
+ // Ensure that we're before the to date (if set)
+ if (r.Result.MaintenanceMode.IsActive
+ && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
+ && (!r.Result.MaintenanceMode.ToDt.HasValue
+ || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
+ QueueBanMessage(data, "Server in maintenance mode.");
+ #endregion
+
+ #region Send Response
+ else
+ {
+ // Reply
+ data.ClientObject.Queue(new MediusSessionBeginResponse()
+ {
+ MessageID = sessionBeginRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess,
+ SessionKey = data.ClientObject.SessionKey
+ });
+ }
+ #endregion
+ }
+ });
+ }
+
+ break;
+ }
+
+ case MediusSessionBeginRequest1 sessionBeginRequest1:
+ {
+ if (data.ClientObject != null)
+ {
+ data.ClientObject.MediusConnectionType = sessionBeginRequest1.ConnectionClass;
+
+ LoggerAccessor.LogInfo($"Retrieved ApplicationID {data.ClientObject.ApplicationId} from client connection");
+
+ #region SystemMessageSingleTest Disabled?
+ if (MediusClass.Settings.SystemMessageSingleTest)
+ {
+ await QueueBanMessage(data, "MAS.Notification Test:\nYou have been banned from this server.");
+
+ await data.ClientObject.Logout();
+ }
+ #endregion
+ else
+ {
+ await HorizonServerConfiguration.Database.GetServerFlags().ContinueWith((r) =>
+ {
+ if (r.IsCompletedSuccessfully && r.Result != null && r.Result.MaintenanceMode != null)
+ {
+ #region Maintenance Mode?
+ // Ensure that maintenance is active
+ // Ensure that we're past the from date
+ // Ensure that we're before the to date (if set)
+ if (r.Result.MaintenanceMode.IsActive
+ && DateTimeUtils.GetHighPrecisionUtcTime() > r.Result.MaintenanceMode.FromDt
+ && (!r.Result.MaintenanceMode.ToDt.HasValue
+ || r.Result.MaintenanceMode.ToDt > DateTimeUtils.GetHighPrecisionUtcTime()))
+ QueueBanMessage(data, "Server in maintenance mode.");
+
+ #endregion
+
+ #region Send Response
+ else
+ {
+ // Reply
+ data.ClientObject.Queue(new MediusSessionBeginResponse()
+ {
+ MessageID = sessionBeginRequest1.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess,
+ SessionKey = data.ClientObject.SessionKey
+ });
+ }
+ #endregion
+ }
+ });
+ }
+ }
+ break;
+ }
+
+ case MediusSessionEndRequest sessionEndRequest:
+ {
+ ClientObject? clientToEnd = MediusClass.Manager.GetClientBySessionKey(sessionEndRequest.SessionKey, data.ApplicationId);
+
+ if (clientToEnd == null)
+ {
+ LoggerAccessor.LogError($"[MAS] - INVALID OPERATION: {clientChannel} is trying to end session of a non-existing Client Object with SessionKey: {sessionEndRequest.SessionKey}");
+ break;
+ }
+
+ clientToEnd.OnDisconnected();
+
+ Queue(new RT_MSG_SERVER_APP()
+ {
+ Message = new MediusSessionEndResponse()
+ {
+ MessageID = sessionEndRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess,
+ }
+ }, clientChannel);
+
+ break;
+ }
+
+ #endregion
+
+ #region Localization
+
+ case MediusSetLocalizationParamsRequest setLocalizationParamsRequest:
+ {
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest} without a session.");
+ break;
+ }
+
+ data.ClientObject.CharacterEncoding = setLocalizationParamsRequest.CharacterEncoding;
+ data.ClientObject.LanguageType = setLocalizationParamsRequest.Language;
+
+ data.ClientObject.Queue(new MediusStatusResponse()
+ {
+ Type = 0xA4,
+ Class = setLocalizationParamsRequest.PacketClass,
+ MessageID = setLocalizationParamsRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess
+ });
+ break;
+ }
+
+ case MediusSetLocalizationParamsRequest1 setLocalizationParamsRequest1:
+ {
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest1} without a session.");
+ break;
+ }
+
+ data.ClientObject.CharacterEncoding = setLocalizationParamsRequest1.CharacterEncoding;
+ data.ClientObject.LanguageType = setLocalizationParamsRequest1.Language;
+ data.ClientObject.TimeZone = setLocalizationParamsRequest1.TimeZone;
+ data.ClientObject.LocationId = setLocalizationParamsRequest1.LocationID;
+
+ data.ClientObject.Queue(new MediusStatusResponse()
+ {
+ Type = 0xA4,
+ Class = (NetMessageClass)1,
+ MessageID = setLocalizationParamsRequest1.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess
+ });
+ break;
+ }
+ case MediusSetLocalizationParamsRequest2 setLocalizationParamsRequest2:
+ {
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {setLocalizationParamsRequest2} without a session.");
+ break;
+ }
+
+ data.ClientObject.CharacterEncoding = setLocalizationParamsRequest2.CharacterEncoding;
+ data.ClientObject.LanguageType = setLocalizationParamsRequest2.Language;
+ data.ClientObject.TimeZone = setLocalizationParamsRequest2.TimeZone;
+
+ data.ClientObject.Queue(new MediusStatusResponse()
+ {
+ Type = 0xA4,
+ Class = (NetMessageClass)1,
+ MessageID = setLocalizationParamsRequest2.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess
+ });
+ break;
+ }
+
+ #endregion
+
+ #region Game
+
+ case MediusGetTotalGamesRequest getTotalGamesRequest:
+ {
+ // ERROR - Need a session
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalGamesRequest} without a session.");
+ break;
+ }
+
+ // ERROR -- Need to be logged in
+ if (!data.ClientObject.IsLoggedIn)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalGamesRequest} without being logged in.");
+ break;
+ }
+
+ data.ClientObject.Queue(new MediusGetTotalGamesResponse()
+ {
+ MessageID = getTotalGamesRequest.MessageID,
+ Total = 0,
+ StatusCode = MediusCallbackStatus.MediusRequestDenied
+ });
+ break;
+ }
+
+ #endregion
+
+ #region Channel
+
+ case MediusGetTotalChannelsRequest getTotalChannelsRequest:
+ {
+ // ERROR - Need a session
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalChannelsRequest} without a session.");
+ break;
+ }
+
+ // ERROR -- Need to be logged in
+ if (!data.ClientObject.IsLoggedIn)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getTotalChannelsRequest} without being logged in.");
+ break;
+ }
+
+ data.ClientObject.Queue(new MediusGetTotalChannelsResponse()
+ {
+ MessageID = getTotalChannelsRequest.MessageID,
+ Total = 0,
+ StatusCode = MediusCallbackStatus.MediusRequestDenied,
+ });
+ break;
+ }
+
+ case MediusSetLobbyWorldFilterRequest setLobbyWorldFilterRequest:
+ {
+ //WRC 4 Sets LobbyWorldFilter Prior to making a session.
+ // ERROR - Need a session
+ /*
+ if (data.ClientObject == null)
+ throw new InvalidOperationException($"INVALID OPERATION: {clientChannel} sent {setLobbyWorldFilterRequest} without a session.");
+ */
+ // ERROR -- Need to be logged in
+ /*
+ if (!data.ClientObject.IsLoggedIn)
+ throw new InvalidOperationException($"INVALID OPERATION: {clientChannel} sent {setLobbyWorldFilterRequest} without being logged in.");
+ */
+ /*
+ data.ClientObject.Queue(new MediusSetLobbyWorldFilterResponse()
+ {
+ MessageID = setLobbyWorldFilterRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusRequestDenied,
+ });
+ */
+ Queue(new RT_MSG_SERVER_APP()
+ {
+ Message = new MediusSetLobbyWorldFilterResponse()
+ {
+ MessageID = setLobbyWorldFilterRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusRequestDenied
+ }
+ });
+
+ break;
+ }
+ #endregion
+
+ #region DNAS CID Check
+
+ case MediusMachineSignaturePost machineSignaturePost:
+ {
+ if (Settings.DnasEnablePost == true)
+ {
+ //Sets the CachedPlayer's MachineId
+ data.MachineId = BitConverter.ToString(machineSignaturePost.MachineSignature);
+
+ LoggerAccessor.LogInfo($"Session Key {machineSignaturePost.SessionKey} | Posting Machine signatures");
+
+ // Then post to the Database if logged in
+ if (data.ClientObject?.IsLoggedIn ?? false)
+ await HorizonServerConfiguration.Database.PostMachineId(data.ClientObject.AccountId, data.MachineId);
+ }
+ else
+ {
+ //DnasEnablePost set to false;
+ }
+
+ break;
+ }
+
+ case MediusDnasSignaturePost dnasSignaturePost:
+ {
+ if (Settings.DnasEnablePost == true)
+ {
+ //If DNAS Signature Post is the PS2/PSP/PS3 Console ID then continue
+ if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasConsoleID)
+ {
+ data.MachineId = BitConverter.ToString(dnasSignaturePost.DnasSignature);
+
+ LoggerAccessor.LogInfo($"Posting ConsoleID - ConsoleSigSize={dnasSignaturePost.DnasSignatureLength}");
+
+ // Then post to the Database if logged in
+ if (data.ClientObject?.IsLoggedIn ?? false)
+ await HorizonServerConfiguration.Database.PostMachineId(data.ClientObject.AccountId, data.MachineId);
+ }
+
+ if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasTitleID)
+ LoggerAccessor.LogInfo($"DnasSignaturePost Error - Invalid SignatureType");
+
+ if (dnasSignaturePost.DnasSignatureType == MediusDnasCategory.DnasDiskID)
+ LoggerAccessor.LogInfo($"Posting DiskID - DiskSigSize={dnasSignaturePost.DnasSignatureLength}");
+ }
+ else
+ {
+ //DnasEnablePost false, no Post;
+ }
+ break;
+ }
+ #endregion
+
+ #region AccessLevel (2.12)
+
+ case MediusGetAccessLevelInfoRequest getAccessLevelInfoRequest:
+ {
+ // ERROR - Need a session
+ if (data.ClientObject == null)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getAccessLevelInfoRequest} without a session.");
+ break;
+ }
+
+ // ERROR -- Need to be logged in
+ if (!data.ClientObject.IsLoggedIn)
+ {
+ LoggerAccessor.LogError($"INVALID OPERATION: {clientChannel} sent {getAccessLevelInfoRequest} without being logged in.");
+ break;
+ }
+
+ //int adminAccessLevel = 4;
+
+ data.ClientObject.Queue(new MediusGetAccessLevelInfoResponse()
+ {
+ MessageID = getAccessLevelInfoRequest.MessageID,
+ StatusCode = MediusCallbackStatus.MediusSuccess,
+ AccessLevel = MediusAccessLevelType.MEDIUS_ACCESSLEVEL_MODERATOR,
+ });
+ break;
+ }
+
+ #endregion
+
+ #region Version Server
+ case MediusVersionServerRequest mediusVersionServerRequest:
+ {
+ List