- Timestamp:
- Jun 5, 2020, 2:13:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-arcamap-2.5/shared/rxrpclib.vrs
r1023 r1071 1 1 /* Samba REXX Function Library for RPC calls */ 2 2 3 /* 3 /* 4 4 Copyright (C) 2007-2017 Herwig Bauernfeind for bww bitwise works GmbH. 5 5 … … 22 22 /* _rpcenumdomgroups(server,username,password) */ 23 23 /* _rpcenumdomusers(server,username,password) */ 24 /* _rpcenumprinters(server,username,password) */ 24 /* _rpcenumprinters(server,username,password) */ 25 25 /* _rpcnetshareenum(server,username,password) */ 26 26 /* _rpcnetsharegetinfo(server,username,password,share) */ … … 36 36 username = arg(2) 37 37 password = arg(3) 38 39 call VRSet VRWindow(), 'Pointer', 'Wait' 40 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomgroups" 'debuglevel' ' 38 passmask = COPIES('*', LENGTH( password )) 39 40 call VRSet VRWindow(), 'Pointer', 'Wait' 41 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="enumdomgroups" 'debuglevel' ' 41 42 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomgroups" 'debuglevel' >'samba.!msg 42 43 call VRSet VRWindow(), 'Pointer', '<default>' … … 70 71 interpret dyn 71 72 72 end 73 end 73 74 SIGNAL OFF SYNTAX 74 75 ok = stream(samba.!msg,'c','close') … … 85 86 end 86 87 IF options.!debug == 1 THEN SAY time()" _rpcenumdomgroups() done, "retval" "rpc.enumdomgroups.LOGONSTATUS 87 return retval 88 return retval 88 89 89 90 /*:VRX _rpcenumdomusers … … 94 95 username = arg(2) 95 96 password = arg(3) 96 97 call VRSet VRWindow(), 'Pointer', 'Wait' 98 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomusers" 'debuglevel' ' 97 passmask = COPIES('*', LENGTH( password )) 98 99 call VRSet VRWindow(), 'Pointer', 'Wait' 100 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="enumdomusers" 'debuglevel' ' 99 101 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="enumdomusers" 'debuglevel' >'samba.!msg 100 102 call VRSet VRWindow(), 'Pointer', '<default>' … … 128 130 interpret dyn 129 131 130 end 132 end 131 133 SIGNAL OFF SYNTAX 132 134 ok = stream(samba.!msg,'c','close') … … 152 154 username = arg(2) 153 155 password = arg(3) 156 passmask = COPIES('*', LENGTH( password )) 154 157 155 158 usercred = '--user='username'%'password 156 159 157 160 call VRSet VRWindow(), 'Pointer', 'Wait' 158 say ' 'samba.!rpcclientexe' 'server' 'usercred' --command="enumprinters" 'debuglevel' '161 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="enumprinters" 'debuglevel' ' 159 162 address cmd samba.!rpcclientexe' 'server' 'usercred' --command="enumprinters" 'debuglevel' >'samba.!msg 160 163 call VRSet VRWindow(), 'Pointer', '<default>' … … 183 186 interpret dyn 184 187 end 185 end 188 end 186 189 SIGNAL OFF SYNTAX 187 190 ok = stream(samba.!msg,'c','close') … … 206 209 username = arg(2) 207 210 password = arg(3) 208 209 call VRSet VRWindow(), 'Pointer', 'Wait' 210 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="netshareenum" 'debuglevel' ' 211 passmask = COPIES('*', LENGTH( password )) 212 213 call VRSet VRWindow(), 'Pointer', 'Wait' 214 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="netshareenum" 'debuglevel' ' 211 215 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="netshareenum" 'debuglevel' >'samba.!msg 212 216 call VRSet VRWindow(), 'Pointer', '<default>' … … 235 239 interpret dyn 236 240 end 237 end 241 end 238 242 SIGNAL OFF SYNTAX 239 243 ok = stream(samba.!msg,'c','close') … … 260 264 password = arg(3) 261 265 share = arg(4) 262 263 call VRSet VRWindow(), 'Pointer', 'Wait' 264 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="netsharegetinfo 'share'" 'debuglevel' ' 266 passmask = COPIES('*', LENGTH( password )) 267 268 call VRSet VRWindow(), 'Pointer', 'Wait' 269 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="netsharegetinfo 'share'" 'debuglevel' ' 265 270 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="netsharegetinfo 'share'" 'debuglevel' >'samba.!msg 266 271 call VRSet VRWindow(), 'Pointer', '<default>' … … 285 290 if Token = "TYPE" & left(Tvalue,2) = "0x" & length(Tvalue) = 3 then Token = "SHARETYPE" 286 291 if Token = "TYPE" & pos("SEC",Tvalue) > 1 then Token = "SECTYPE" 287 292 288 293 dyn = 'rpc.netsharegetinfo.'Token' = "'Tvalue'"' 289 294 say " "dyn 290 295 interpret dyn 291 296 end 292 end 297 end 293 298 SIGNAL OFF SYNTAX 294 299 ok = stream(samba.!msg,'c','close') … … 314 319 password = arg(3) 315 320 grouprid = arg(4) 316 317 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="querygroupmem 'grouprid'" 'debuglevel' ' 321 passmask = COPIES('*', LENGTH( password )) 322 323 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="querygroupmem 'grouprid'" 'debuglevel' ' 318 324 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="querygroupmem 'grouprid'" 'debuglevel' >'samba.!msg 319 325 … … 346 352 interpret dyn 347 353 348 end 354 end 349 355 SIGNAL OFF SYNTAX 350 356 ok = stream(samba.!msg,'c','close') … … 370 376 password = arg(3) 371 377 userrid = arg(4) 372 373 call VRSet VRWindow(), 'Pointer', 'Wait' 374 say ' 'samba.!rpcclientexe' 'server' --user='username'%'password' --command="queryuser 'userrid'" 'debuglevel' ' 378 passmask = COPIES('*', LENGTH( password )) 379 380 call VRSet VRWindow(), 'Pointer', 'Wait' 381 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="queryuser 'userrid'" 'debuglevel' ' 375 382 address cmd samba.!rpcclientexe' 'server' --user='username'%'password' --command="queryuser 'userrid'" 'debuglevel' >'samba.!msg 376 383 call VRSet VRWindow(), 'Pointer', '<default>' … … 403 410 interpret dyn 404 411 end 405 end 412 end 406 413 SIGNAL OFF SYNTAX 407 414 ok = stream(samba.!msg,'c','close') … … 417 424 end 418 425 IF options.!debug == 1 THEN SAY time()" _rpcqueryuser() done, "retval" "rpc.queryuser.LOGONSTATUS 419 return retval 426 return retval 420 427 /*:VRX _rpcsrvinfo 421 428 */ … … 425 432 username = arg(2) 426 433 password = arg(3) 427 428 /* Initialize temporary files */ 434 passmask = COPIES('*', LENGTH( password )) 435 436 /* Initialize temporary files */ 429 437 rpcinfo.!msg = SysTempFileName(TempDir||"rpcinfo_msg.???") 430 438 rpcinfo.!err = SysTempFileName(TempDir||"rpcinfo_err.???") … … 438 446 439 447 call VRSet VRWindow(), 'Pointer', 'Wait' 440 say ' 'samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'rpcinfo.!err' 1>'rpcinfo.!msg448 say ' 'samba.!rpcclientexe' 'server' --user='username'%'passmask' --command="srvinfo" 'debuglevel' 2>'rpcinfo.!err' 1>'rpcinfo.!msg 441 449 address cmd samba.!rpcclientexe' 'server' 'usercred' --command="srvinfo" 'debuglevel' 2>'rpcinfo.!err' 1>'rpcinfo.!msg 442 450 call VRSet VRWindow(), 'Pointer', '<default>'
Note:
See TracChangeset
for help on using the changeset viewer.