473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to bypass hosts file

Hello,

I need an urgent help here. I would like to write a code where I can bypass
the hosts file entries while contacting the web server directly. I also want
to get the list of IP addresses the for that domain. getHostByName function
serves the purpose but it reads the address from hosts file. Can I do it
through sockets or is there any other way to do it ?
Nov 17 '05 #1
1 5032
AFAIK Dns class uses system network settings and if there is not dns server
specified, it will try to search first in the hosts file.

Also I didn't find any property to specify what dns server to use...

If you want to query specific dns server for the host info you'll have to do
that manually. DNS protocol specs are here www.dns.net/dnsrd/rfc/
--
Vadym Stetsyak aka Vadmyst

"Fakhar S via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:52***********@DotNetMonster.com...
Hello,

I need an urgent help here. I would like to write a code where I can bypass the hosts file entries while contacting the web server directly. I also want to get the list of IP addresses the for that domain. getHostByName function serves the purpose but it reads the address from hosts file. Can I do it
through sockets or is there any other way to do it ?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Liza | last post by:
Hi, I run Tomcat5.0.24 on Fedora Core 1. I have two hosts defined in server.xml in a following way: <Host name ="WebTest1.something.com" debug="0" appBase="webapps" unpackWARs="true"...
0
by: Bla | last post by:
Hello, Does anyone have a script that would remove the appropriate line from the hosts file on a UNIX box. This might be a tricky one? Let's say we have a list of hosts and associated ip's we...
2
by: Alex Vinokur | last post by:
========================================= Windows 2000 CYGWIN_NT-5.0 1.3.22(0.78/3/2) GNU gcc version 3.2 20020927 (prerelease) ========================================= Here is some program...
0
by: shawnk | last post by:
I want to use the Hosts file to locate schema for validation. The Hosts file (C:\Windows\System32\etc) will locate xsd schema files on a LAN server for development purposes. This gives me a...
0
by: David Swanson | last post by:
I am trying to configure the proxy section of the machine.config to handle BOTH connecting to hosts that are not "live" but rather defined in my winnt/system32/drivers/etc/hosts file. AND to hosts...
4
by: Haxan | last post by:
Hi, I am looking for a way to write etc/hosts file. Is there any APIS for search/delete/insert/update for entries ? or behave hosts as a normal file ? thanks in advance
3
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the...
4
by: while-one | last post by:
When I make a new website, during development I create a new virtual domain definition (using a temporary, made-up name) in apache's configuration, and then bounce my server. Then, on the client...
5
by: mike.coakley | last post by:
Does stream_socket_client use the /etc/hosts file? I'm using Mac OSX 10.5.3 as a development platform and VMware Fusion for VM hosting. I have a OpenSUSE Linux VM that has an Apache 2 web server...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.