Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

netcut

Status
Not open for further replies.

jezky82

MIS
Jul 7, 2012
39
0
0
ID
whether it can make a similar program using VFP netcut. or how to run a program netcut through VFP program to cutoff. thanks
 
I don't know anything about Netcut, other than the brief product description I found. However, I'll try to answer your questions:

1. Create a similar program in VFP? Yes, you probably could, but it would take some substantial knowledge of how a local network works.

2. Run Metcut from VFP? Yes, assuming it's a normal executable, you should be able to run it in exactly the same way as any other external program, for example, via ShellExecute().

If anyone else here knows more about Netcut, they will no doubt add to or correct the above answers.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I was able to call or open netcut program in VFP, but if it is difficult to use, because netcut not support command via cmd, is there any other way.I just want to turn off the computer's Internet connection through VFP program with command button
 
So you don't want to simply run Netcut. You want a way to control it programmatically.

I'm not sure what you mean by "turn off the computer's Internet connection". Do you want to actually disable the network card? Or do you want to block any other program from accessing the internet? All internet access, or just web browsing (will you continue to allow email, FTP, etc, for example)?

If you could clarify exactly what you want to achieve ....

MIke

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I just want to turn off other computers internet connection. or disconnect the other computer to getway, like netcut program.
NetCut this is a commonly used tool used on networks to cut down the network connection of victim. It makes a Denial of Service attack on the Victim so that he doesn’t get internet access. It does so by flooding the switch with unreal MAC address entries that point to the victim’s ip address, so the packets are mapped incorrectly and the victim receives no packets.
 
I'm afraid this is all beyond my comfort zone. I can only say that, if it's do-able in Netcut, it's probably do-able in VFP.

No doubt someone else will be able to point you in the right direction.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Here is the reverse function I wrote a while back (How to activate an internet connection). All you need to do is change the C&onnect command to make it do the reverse.
Code:
Public Array aconnections[1]
aconnections[1]=''
LOCAL singleconnection
 i = 1
 o = Createobject("Shell.Application")
 ns=o.NameSpace (3)
For Each oItems In  ns.Items
   If oItems.Name ="Network Connections"  && Windows Anglais
     colNetwork = oItems.getfolder
     If Vartype(colNetwork) = "O"
       For Each colConn In colNetwork.Items
         If Alen(aconnections)= 1 And Empty(aconnections[1])
         Else
           Dimension aconnections[ALEN(aconnections)+1]
         Endif
         aconnections[i]=colConn.Name
         i = i +1
       Next
     Endif
   Endif
Next
For i = 1 To Alen(aconnections)
   If "Titan" $ aconnections[i]  &&Un example
     Connect(aconnections[i])
   Endif
Next
Function Connect(lcConnexion)
For Each colConn In colNetwork.Items
   If colConn.Name = lcConnexion
     singleconnection = colConn
     Exit
   Endif
Next
For Each clsVerb In singleconnection.Verbs
     If "C&onnect" = clsVerb.Name Or "En&able" = clsVerb.Name
       Try
         singleconnection.InvokeVerb("C&onnect")
       Catch
         singleconnection.InvokeVerb("En&able")
       ENDTRY
     Endif
   Next
Endfunc

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top