Jump to content

Recommended Posts

Posted

so ... basically you're just trying to grab stuff from other students computers without them knowing ? you could do a ipscan of the network, just use the netmask to figure out the span. Prolly the easiest way if you're unable to browse the DHCP-server.

IP scanning the network was becoming my prefered way of doing it too.

I will try to get a few IP's with new view and the function I just posted, and try to find out the span with that. How do you suggest I use the netmask to get it?

Posted

It would probably be easier to not try find that out............ I have no idea what the schools net even looks like.... With the whole place wireless, and everyone from grade 5 having laptops.... there's a few of them around..... (Last count around 2000+) and every person has 100mb of online storage (already around 200gb) But for what type the network is I have no idea.... I can tell you there's a proxy. and that the room with all the networking stuff has independant aircon! and they cant even get us some... :whistle: I did find a delphi code snipit, but it didnt really help.... :D

Ok.... I edit your script to look for computers between the ip range 192.168.0.100 -> 192.168.0.109 (At current, It found my home computer, mine, and my sisters.... YAY!) So all i need to do is do the same for my school ip, add a ping to check status and show all of the infomation in a listview.... Perfect :P

Posted

the netmask is used to define the subnet. If you have a netmask of 255.255.255.0 you got 255 IPadresses in your subnet. Out of these your gateway should probably use one of them (usually x.x.x.1) and the broadcast address x.x.x.255. The network address is x.x.x.0. 255.255.254.0 will give you 255+255 (minus broadcast, and probably a few others) and so on...

you'll probably find this link useful subnet calculator, it will help you figure out the span of your subnet.

> there are 10 types of people in the world, those who understand binary and those who don't.

Posted

Well this work reasonably well..... Its basic with the IP being in a FOR loop, and then the end numbers changing from 100 -> 110. The code:

for $x = 100 to 110
    $ip = "192.168.0."&$x
MsgBox (0, "Test Number", "IP being tested: " & $ip) 
$ping = Ping ($ip) 
If $ping = 1 Then
    $status = "Offline"
ElseIf $ping = 2 Then
    $status = "Host is unreachable"
ElseIf $ping = 3 Then
    $status = "Bad destination"
ElseIf $ping = 4 Then
    $status = "Other errors"    
EndIf
$Info = _GetMacAndName($ip) 
If Not @error Then
    MsgBox(0x40,"_GetMacAndName()","Name: " & $Info[0] & @CRLF & "Mac: " & $Info[1] & @CRLF & "Ping Status:" & $status )
Else
    MsgBox (0x40, "_GetMacAndName ()", "Error! 192.168.0.10"&$x &" Couldn't be found!")
EndIf
Next

Func _GetMacAndName($g_IP)
    Dim $Return[2]
    $PID = Run(@ComSpec & " /c nbtstat -A " & $g_IP,@ScriptDir,@SW_HIDE,2)
    While ProcessExists($PID)
        Sleep(50)
    WEnd
    $nRead = StdoutRead($PID,1024)
    $Mac = StringRegExp($nRead,"([A-F0-9]{2}-?){6}",2)
    If Not @error Then
        $Computername = StringRegExp($nRead,"[^\n]+<..>",3)
        If Not @error Then
            $Computername = StringStripWS(StringTrimRight($Computername[0],4),8)
            $Return[0] = $Computername
            $Return[1] = $Mac[0]
            SetError(0)
            Return $Return
        EndIf
    EndIf
    SetError(1)
    Return 0
EndFunc

Now I'll intergrate ptrex's e.g. into it and wala! Its almost done.... :whistle:

Posted

I've also been trying to do something similar to this, bert. But for me I just wanted to be able to view all of the files on this computer from my other computer (in a listview) and be able to download them too. Not too sure how to get this done, good luck though.

Kurt

Awaiting Diablo III..

Posted

Hmm..... I'm doing some reasearch now, seeing possible methods to get all computers in a workgroup... :whistle:

I haven't read the 2nd page of replies yet but workgroups don't mean much. It's a loose collection of PCs but they aren't really joined at the hip. You could easily have multiple workgroups and share files. This is how PCs are @ home. They belong to workgroups, not domain.

You might know the workgroup that you are in but not be aware of the others easily. The most basic mehtod would be to do an IP scan if you have any ideas of the network layout, thus bypassing the need to know all the workgroups.

Either way, you will need to have some understanding of your environment.

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Posted

@Manadar

When you get something going you might as well share the code with the rest.

Maybe posting it in the Example scritpts section.

regards

ptrex

You should know that I've never kept something behind. Unless that keylogger I wrote, but I shared that on a different forum. I just don't like to pre-release anything. The part I shared about _GetMacAndName() function is in that client too..
Posted

You should know that I've never kept something behind. Unless that keylogger I wrote, but I shared that on a different forum. I just don't like to pre-release anything. The part I shared about _GetMacAndName() function is in that client too..

ok

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...