Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Connecting and disconnecting from internet

Connecting and disconnecting from internet

Scheduled Pinned Locked Moved C#
question
10 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fred 34
    wrote on last edited by
    #1

    How can we disable and enable the internet from inside of our program?

    L L 3 Replies Last reply
    0
    • F Fred 34

      How can we disable and enable the internet from inside of our program?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Fred 34 wrote:

      disable and enable the internet

      It is highly unlikely that you are going to be writing a program that can disable or enable the internet so you must mean something else.

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      F 1 Reply Last reply
      0
      • F Fred 34

        How can we disable and enable the internet from inside of our program?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        #Define "The Internet". You could disable every TCP/IP adapter on my machine, if you ran under an administrative account. Then again, maintenance and support might become angry if my internet doesn't work for no good reason. Keep in mind that Windows Update and the virusscanner would be affected to.

        Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

        1 Reply Last reply
        0
        • L Lost User

          Fred 34 wrote:

          disable and enable the internet

          It is highly unlikely that you are going to be writing a program that can disable or enable the internet so you must mean something else.

          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

          F Offline
          F Offline
          Fred 34
          wrote on last edited by
          #4

          In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.

          L D S 3 Replies Last reply
          0
          • F Fred 34

            How can we disable and enable the internet from inside of our program?

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Fred 34 wrote:

            How can we disable the internet ...

            Sorry, I'm not going to hand you that code; would some launch codes for a nuclear missile be sufficient? For most CP members, life would be quite different without Google, MSDN, CodeProject, and many more. :^)

            Luc Pattyn [My Articles] Nil Volentibus Arduum

            R 1 Reply Last reply
            0
            • F Fred 34

              In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              How is that going to help? My keylogger doesn't send data when it is entered, it sends it at midnight. Think again.

              Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

              1 Reply Last reply
              0
              • F Fred 34

                In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                An utter waste of time. It doesn't matter if the machine has internet access or not. Malware is still going to get this information and hang onto it until it CAN send it.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak

                F 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  An utter waste of time. It doesn't matter if the machine has internet access or not. Malware is still going to get this information and hang onto it until it CAN send it.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  F Offline
                  F Offline
                  Fred 34
                  wrote on last edited by
                  #8

                  U are right, I did not think about it in this way.

                  1 Reply Last reply
                  0
                  • L Luc Pattyn

                    Fred 34 wrote:

                    How can we disable the internet ...

                    Sorry, I'm not going to hand you that code; would some launch codes for a nuclear missile be sufficient? For most CP members, life would be quite different without Google, MSDN, CodeProject, and many more. :^)

                    Luc Pattyn [My Articles] Nil Volentibus Arduum

                    R Offline
                    R Offline
                    Roger Wright
                    wrote on last edited by
                    #9

                    Luc Pattyn wrote:

                    would some launch codes for a nuclear missile be sufficient?

                    I've got a few to share, too. I'm sure that they haven't changed them in the past 20 years. Why bother? They're secret... :rolleyes:

                    Will Rogers never met me.

                    1 Reply Last reply
                    0
                    • F Fred 34

                      In fact I want to disable internet for awhile to prevent spyware to access that sensitive portion of program which contains some personal information which is not coded yet. for example account number which is coming from keyboard.

                      S Offline
                      S Offline
                      Sunil P V
                      wrote on last edited by
                      #10

                      Well there are 2 crude ways to do it: (if you haven't written drivers for your connectivity interfaces ;P ) 1. Enumerate all the network interfaces (non-virtual) and disable them 2. Configure a non-existent proxy server (like 0.0.0.0 port 80) for time being. After you are done with your execution reset this dummy proxy. Ensure you can backup any existent proxy settings if any.

                      Sunil

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups