Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IPMac scanner
#12
Enumerates network computers, like NET VIEW.

Macro Macro1448
Code:
Copy      Help
def MAX_PREFERRED_LENGTH 0xFFFFFFFF
def SV_TYPE_NT 0x00001000
type SERVER_INFO_100 sv100_platform_id @*sv100_name
dll netapi32 #NetServerEnum @*servername level !**bufptr prefmaxlen *entriesread *totalentries servertype @*domain *resume_handle
dll netapi32 #NetApiBufferFree !*Buffer

SERVER_INFO_100* p
int n nt
if(NetServerEnum(0 100 &p MAX_PREFERRED_LENGTH &n &nt SV_TYPE_NT 0 0)) end "failed"

int i
for i 0 n
,str s.ansi(p[i].sv100_name)
,out s

NetApiBufferFree p


Messages In This Thread

Forum Jump:


Users browsing this thread: 8 Guest(s)