Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: batch script Adding Ip adresses to hosts file  (Read 13630 times)

0 Members and 1 Guest are viewing this topic.

Reno



    Hopeful
  • Thanked: 32
    Re: batch script Adding Ip adresses to hosts file
    « Reply #15 on: April 06, 2009, 07:35:57 AM »
    you are posting some information on how a host file could be "mis-used". could you delete this whole thread?
    No point in arguing.

    I have had hands-on experiencing regarding Hosts file edits. A friend created a batch file that redirected popular URLs to a website I need not mention here. He ran this batch file on several of the laptops in my class and caused a great deal of trouble in the lesson.
    None of them knew how to undo this. They didn't know where the problem lay, nor did they know what the Hosts file was.

    I asked Plm 'why he wanted to do this', and BatchFileCommand concurred with my assessment.
    You went ahead and posted the potentially harmful information anyways.

    Read the forum rules under Causing users grief / hacking.

    You should be glad I didn't simply delete your posts and offer no reason why I did it.


    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: batch script Adding Ip adresses to hosts file
    « Reply #16 on: April 06, 2009, 07:37:54 AM »
    No, I don't believe this should be deleted. In fact, I just wanted to know what Plm is trying to accomplish, which was my initial question......

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: batch script Adding Ip adresses to hosts file
      « Reply #17 on: April 06, 2009, 07:38:53 AM »
      No point in arguing.

      I have had hands-on experiencing regarding Hosts file edits. A friend created a batch file that redirected popular URLs to a website I need not mention here. He ran this batch file on several of the laptops in my class and caused a great deal of trouble in the lesson.
      None of them knew how to undo this. They didn't know where the problem lay, nor did they know what the Hosts file was.

      I asked Plm 'why he wanted to do this', and BatchFileCommand concurred with my assessment.
      You went ahead and posted the potentially harmful information anyways.

      Read the forum rules under Causing users grief / hacking.

      You should be glad I didn't simply delete your posts and offer no reason why I did it.
      i definitely DO NOT AGREE with you. He can jolly well edit the host file and type in (or copy and paste) the ip addresses himself, wouldn't he?  you have made a ridiculous assumption, however seeing you as the superior being here, i will rest my case.

      Carbon Dudeoxide

      • Global Moderator

      • Mastermind
      • Thanked: 169
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Experience: Guru
      • OS: Mac OS
      Re: batch script Adding Ip adresses to hosts file
      « Reply #18 on: April 06, 2009, 07:39:52 AM »
      Creating the batch file will make it easier for him to use it on other computers, eh?

      Anyways, this is a hypothetical situation...

      gh0std0g74



        Apprentice

        Thanked: 37
        Re: batch script Adding Ip adresses to hosts file
        « Reply #19 on: April 06, 2009, 07:43:33 AM »
        Creating the batch file will make it easier for him to use it on other computers, eh?

        Anyways, this is a hypothetical situation...
        yeah right, the key word is hypothetical. you wouldn't know what he's going to do. maybe he is a legit system admin. therefore, its not right to do what you did.

        Carbon Dudeoxide

        • Global Moderator

        • Mastermind
        • Thanked: 169
          • Yes
          • Yes
          • Yes
        • Certifications: List
        • Experience: Guru
        • OS: Mac OS
        Re: batch script Adding Ip adresses to hosts file
        « Reply #20 on: April 06, 2009, 07:46:21 AM »
        And if his intentions were bad?  ::)

        gh0std0g74



          Apprentice

          Thanked: 37
          Re: batch script Adding Ip adresses to hosts file
          « Reply #21 on: April 06, 2009, 07:52:57 AM »
          And if his intentions were bad?  ::)
          how would you know?  so if he were to rephrase his question (or title) without the ip address and host file, but just some example text and file names and ask how to append properly, would you still suspect him of anything?

          Carbon Dudeoxide

          • Global Moderator

          • Mastermind
          • Thanked: 169
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Experience: Guru
          • OS: Mac OS
          Re: batch script Adding Ip adresses to hosts file
          « Reply #22 on: April 06, 2009, 07:54:51 AM »
          Not at all, but that avoids my question.

          No point continuing further. I am ending this now.

          If you have any other questions or a response, please PM me.

          Dias de verano

          • Guest
          Re: batch script Adding Ip adresses to hosts file
          « Reply #23 on: April 06, 2009, 09:47:28 AM »
          An astute sys admin will use file permissions so that limited users cannot alter the Hosts file, and will keep a known good backup.


          plm

            Topic Starter


            Newbie

            Re: batch script Adding Ip adresses to hosts file
            « Reply #24 on: April 07, 2009, 04:11:07 AM »
            Hi CDO

            I am about to make sure that some hundred monitored servers can send their snmp traps to some newly added monitoring servers during an upgrade. I have no intention of any malicious acts. I am a virgin into scripting so i thought that the experts on batch scripting on this site might be able to get me started.

            best regards plm

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: batch script Adding Ip adresses to hosts file
            « Reply #25 on: April 07, 2009, 05:43:21 AM »
            the funny thing is if plm had asked how to append data to a text file there would have been no issues.
            I was trying to dereference Null Pointers before it was cool.

            Dias de verano

            • Guest
            Re: batch script Adding Ip adresses to hosts file
            « Reply #26 on: April 07, 2009, 05:50:18 AM »
            Why do people paid to know how to do sys admin come here to find out how to do their jobs?

            Carbon Dudeoxide

            • Global Moderator

            • Mastermind
            • Thanked: 169
              • Yes
              • Yes
              • Yes
            • Certifications: List
            • Experience: Guru
            • OS: Mac OS
            Re: batch script Adding Ip adresses to hosts file
            « Reply #27 on: April 07, 2009, 05:52:37 AM »
            You would want software to do this....Not a Hosts file edit....

            gh0std0g74



              Apprentice

              Thanked: 37
              Re: batch script Adding Ip adresses to hosts file
              « Reply #28 on: April 07, 2009, 06:13:29 AM »
              You would want software to do this....Not a Hosts file edit....
              come on, what are talking about?

              gh0std0g74



                Apprentice

                Thanked: 37
                Re: batch script Adding Ip adresses to hosts file
                « Reply #29 on: April 07, 2009, 06:14:30 AM »
                the funny thing is if plm had asked how to append data to a text file there would have been no issues.
                this is what i said in post #21.