Projects STRLCPY SharpMapExec Commits 089005a7
🤬
  • ■ ■ ■ ■ ■
    SharpMapExec/Lib/Smb.cs
    1  -using System;
     1 +using System;
    2 2  using System.Collections.Generic;
    3 3  using System.IO;
    4 4  using System.Linq;
    skipped 102 lines
    107 107   }
    108 108   catch
    109 109   {
    110  - if (!errors.Contains("C$"))
     110 + SHARE_INFO_1[] computerShares = EnumNetShares(computer);
     111 + foreach (SHARE_INFO_1 share in computerShares)
    111 112   {
    112  - Console.WriteLine(String.Format(" [+] Authenticated but not admin on {0}", computer));
     113 + if (share.shi1_netname.Contains("ERROR"))
     114 + {
     115 + Console.WriteLine(String.Format(" [-] Failed to authenticate on {0}", computer));
     116 + return;
     117 + }
    113 118   }
     119 + Console.WriteLine(String.Format(" [+] Authenticated but not admin on {0}", computer));
    114 120   }
    115 121   }
    116 122   else
    skipped 65 lines
    182 188   }
    183 189   }
    184 190  }
     191 + 
Please wait...
Page is in error, reload to recover