hostname

How do I broadcast a hostname using Ruby's net-mdns?

Hi there. I'm new to net-mdns and mDNS in general, so I have just a basic understanding of how the protocol works for now, and I hope the question is pretty self-explanatory. So far I've seen some examples of how to advertise a service with net-mdns, but what I really need is to broadcast a hostname alias, so that my machine can be reso...

Where is origin of HttpContext.Current.Request.Url.Host?

Why does HttpContext.Current.Request.Url.Host return a different URL than the URL used in the Web browser? For example, when entering "www.someurl.com" in the browser, the HttpContext.Current.Request.Url.Host variable is equal to "www.someotherurl.com". ...

C++ Windows function call that get local hostname and IP address

Is there built-in windows C++ function call that can get hostname and IP address? Thanks. ...

Cannot access website using host headers on local windows 7 and iis 7

I have problem of accessing my website created using visual studio on my local pc. the pc using windows 7 with static ip address has been configured and i have added a hostname "192.168.0.1 hosts myweb.mylocal.com" on c:\windows\system32\driver\etc. on the IIS i have configured the binding myweb.mylocal.com with impersonation set enabled...

How to validate hostname in Perl?

Hi, I need to come up with a regular expression to validate hostname against RFC-1123 and RFC-952. Right now I'm using this: ^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|\b-){0,61}[0-9A-Za-z])?)*\.?$/ but this does not do the trick since it does not catch a. as invalid hostname...

Is there an easy way to get the ServerName in Symfony?

I have been searching for an easy way to get the ServerName of the machine where Symfony runs in Symfony (so that my app adapts when it is used on a host with a different ServerName), but I couldn't find one. I created a variable in app.yml and I fetch it, but I still wonder if there is no easier way to do this. How are you doing this? I...

What is MSSRPD?

Recently, I found that some searches in Firefox are redirected to Bing. (Instead of my primary search engine Google.) I am not sure, but it seems that it is not bound to search but rather a hostname resolving. Since entering a single word that might be a hostname redirects to Bing. But entering more words searches using my primary searc...

Detecting host name in java

Is it possible to detect the hostname used in java (even through a cname)? I am looking for something similar to this: http://api.drupal.org/api/function/conf_path/6 In that code, drupal checks to see what domain name is accessing it in order to load the correct configuration (multi-site). If the domain doesn't match any configurations...

Java regex for accepting a valid hostname,IPv4, or IPv6 address.

Anyone have a good (preferably tested) regex for accpeting only a valid DNS hostname, IPv4 or IPv6 address? ...

Hostname scanning in C#

Heya guys Iv'e recently started a new job as an ICT Technician and im creating an Console application which will consists of stuff that will help our daily tools! My first tool is a Network Scanner, Our system currently runs on Vanilla and Asset tags but the only way we can find the hostname / ip address is by going into the Windows Co...

.net 3.5: (ip2hostname) find if a certain ip is used by another computer in domain

I'm working under a domain, and im making an app that changes ip from 1 to 253 until it finds an available, unconfliced ip (where it get's ping response from the domain, it tries to ping it each time it changes ip), this part works. the problem is, that i dont want the program to override an ip address that is used by other computers tha...

Rename a computer programmatically

I need to automate the changing of the hostname of a computer, but I can't figure out how to do it inside a program. My options are open; I would be happy with a solution in any of the following: Command line Java Python C# (would prefer one of the other 3, but this is ok) It would be helpful to learn how to do this on both Linux and W...

how to setup "ip address","DNS", "hostname","MAC address" in python?

Dear All, I want to write a script for network security IP scan porpose, such a tool may need spoofing it's host NIC status for testing purpose, for example, to setup NIC's ip address, to setup DNS address, while to setup hostname, MAC address and enable/disable the NICs adapter. I googled and found most soultion is using "popen" ...

IP Address to Hostname in Java?

My hosts file (C:\WINDOWS\system32\drivers\etc\hosts) has a bunch of IP Address to host name mappings: # Switches 192.168.200.254 sw-con-ctrl 192.168.201.253 sw-con-ctrl-2 192.168.201.254 sw-con-ctrl-1 # 192.168.188.1 sw-con-ctrl-blk-1 # 192.168.189.1 sw-con-ctrl-red 192.168.190.62 access-console # Rou...

write a C++ code to get the hostname

I want to write a C++ Code to get the full information on all the host name, and ip address and sub net mask of computer that has been added to the domain control. ...

Extracting a Hostname's TLD with a Regular Expression

Extracting an accurate representation of the top-level domain of a hostname is complicated by the fact that each top-level domain registry is free to make up its own policies regarding how domains are issued and what subdomains are defined. As there doesn't appear to be any standards body coordinating these or establishing standards, thi...

Regular expression for a hostname

I'm trying to match a hostname similar to foo-bar3-vm.companyname.local. The part that is foo-bar3 can be any combination of letters, numbers, and hyphens, but I want to ensure it ends in -vm.companyname.local. I was attempting to use /^[a-zA-Z0-9\-]*[vmVM]*\.companynanme\.local$/, but that seems to match anything ending in .companynam...

Image position changes when IP address is typed in the address instead of hostname

I have a web site in ASP.NET MVC 2. I deployed it in the server. But when I browse the site, the image position behaves differently with ip address and host name on the URL. http://mysite/applicationsite http://192.28.252.13/applicationsite I couldn't figure out why its behaving differently. The image is more to the left when used ip ...

How to make 'www' optional in a Hostname Route in Zend ?

Hello, Let's say I have the domain "example.com" I would like to add a route such as when the URL is "example.com/whatever/follows" it redirects to "http://www.example.com/whatever/follows" (forwarding the query strings too). Basically I would like to translate into Zend the following Apache Rewrite rule: RewriteCond %{HTTP_HOST} ^exa...

Prompt not displaying Hostname for AIX's KSH

Similar to question 1171663, AIX appears to not have the $HOSTNAME option available. $hname and $hostname are also non-existent. Other than doing the following within .profile - export HOSTNAME=`hostname` Is there an official manner where AIX users should be capable of getting the proper results when using: PS1="${HOSTNAME}:\${PWD...