Using WebsitePanel hosting.
URL redirection feature of WebsitePanel redirect abc.domain1.com to xyz.domain2.com.
What I need to do is browse abc.domain1.com and display contents of xyz.domain2.com without redirection.
Does it require to update Zone Records or something else ?
In DNS Zone Records:
Added type = "CNAME", Name = "test" and Data = "test.mydomain.com".
And Edit type = "A" , Name = "" and Data = "xxx.xxx.xxx.xxx" (Server IP where it needs to redirect).
This solution is working for me.
Please note that the DNS propagation might take up to 24 hours.
Related
I'd like to automate my log in to my bank to automatically fetch my transactions to stay up-to-date with spendings and earnings, but I am stuck.
The bank's login webpage is: https://login.bancochile.cl/bancochile-web/persona/login/index.html#/login
I am using python's request module with sessions:
urlLoginPage = 'https://login.bancochile.cl/bancochile-web/persona/login/index.html'
urlLoginSubmit = 'https://login.bancochile.cl/oam/server/auth_cred_submit'
username = '11.111.111-1' # this the format of a Chilean National ID ("RUT")
usernameFormatted = '111111111' # same id but formatted
pw = "password"
payload = [
("username2", usernameFormatted),
("username2", username),
("userpassword", pw),
("request_id", ''),
("ctx", "persona"),
("username", usernameFormatted),
("password", pw),
]
with requests.Session() as session:
login = session.get(urlLoginPage)
postLogin = session.post(
urlLoginSubmit,
data=payload,
allow_redirects=False,
)
redirectUrl = postLogin.headers["Location"]
First I find that the form data has duplicated keys, so I am using the payload as a list of tuples. From Chrome's inspect I find the form data to be like this:
username2=111111111&username2=11.111.111-1&userpassword=password&request_id=&ctx=persona&username=111111111&password=password
I've checked the page's source code to look for the use of a csrf token, but couldn't find any hint of it.
What happens is that the site does a redirect upon submitting the login data. I set allow_redirects=False to catch the redirect url of the post under the Location-header. However, here is the problem. Using the web-browser I know that the redirect url should be https://portalpersonas.bancochile.cl/mibancochile/rest/persona/perfilamiento/home, but I always end up on an error page when using the above method (https://login.bancochile.cl/bancochile-web/contingencia/error404.html). (I am using my own, correct login credentials to try this)
If I submit the payload in a wrong format (e.g. by dropping a key) I am redirected to the same error-page. This tells me that probably something with the payload is incorrect, but I don't know how to find out what may be wrong.
I am kind of stuck and don't know how I can figure out where/how to look for errors and possible solutions. Any suggestions on how to debug this and continue or ideas for other approaches would be very welcome!
Thanks!
My apache server goes down when a random client starts al lot of GET for same url. The problem is it happens with unpredictable url paths. With fail2ban i can ban a predetermined url but not prevent it for unknown url paths. Is there a way to resolve this?
Depending on your Web Server, you should be able to scan your web server logs for GET requests and ban people who make too many of them within a specific time period. You just need to be careful to avoid banning legitimate users, so the frequency of allowable GET requests is something to fine tune carefully.
Create a new Jail Filter: sudo nano /etc/fail2ban/filter.d/GETFlood.conf
Define the regex you need for identifying GET requests based on the logs for your Web server. With a standard Apache access.log, it would be: failregex = ^<HOST>.*\s"GET\s.*$
Add an entry to your /etc/fail2ban/jail.local:
[getflood]
enabled = true
action = iptables-allports[name=getflood]
filter = getflood
logpath = /var/log/apache2/*access.log
maxretry = 30
findtime = 90
bantime = 604800
Here, we let any individual IP Address make up to 30 GET requests every 90 seconds. Again, without more details about your server, you'll need to play around with these timings to avoid banning legitimate users.
When I send emails by phplist, I never get any bounce email report in any of above email address. Any idea why?
$message_envelope = 'bounce222#allheart.co.in';
$bounce_mailbox_host = 'localhost';
$bounce_mailbox_user = 'noreply#allheart.co.in';
$bounce_mailbox_password = 'MI5Topsecretpassword';
$bounce_mailbox_port = "110/pop3/notls";
If I use both email same in envelop and user, it starts getting error.
Everything is ok only if I get bounce emails in noreply#allheart.co.in, which is not working at all.
Also, when I get a bounce, it shows in SES, but not in PHPlist. I am sure I am doing something wrong, but can't figure it out.
PHPlist verion v3.0.6
Using amazon SES
phplist configured on hostgator
If you take down the bounce address to a phplist database do one thing. Change your program code in phplist config.php page like this:
$bounce_mailbox_host = "mail.yourdomain.com"
$bounce_mailbox_username = "bounce"
$bounce_mailbox_password = "password"
$bounce_mailbox_port = "993/pop3/notls" instead of "110/notls"
And add:
$manually_process_bounces = 1
Or else create a cron job for this.
''I am using the WinNT ADSI provider in a bit of authentication code, which looks up the user from Active Directory and checks its group membership.
We have run in to an issue getting this working for cross domain access. We followed the steps outlined here (https://support.microsoft.com/kb/241737?wa=wsignin1.0) to set up a Cross-Reference to an External Domain in Active Directory. This should be all that is required to allow WinNT to find the users.
When the code is run we only ever find one object under the domain (in the loop below) - "Schema". This is not correct - there are MANY child objects.
This problem seems to be intermittent - the same system did not have this issue a month ago. I realise this will be hard to investigate but someone who has a better understanding of ADSI may know better.
The below code illustrates the problem:
Dim objUser
Dim sUserName
Set ns = GetObject("WinNT://DOMAINNAME")
msgbox "Found " & ns.AdsPath & " (" & ns.Class &")" ' Shown
'ns.Filter = Array("User") ' Commented to show ALL objects
For Each UserObj in ns
Dim UserName
UserName = UserObj.Name & " " & UserObj.Class ' Returns "Schema Schema"
msgbox UserName
Next
This solution works but I'd like to point out why. After hours of trying to determine what the importance of the dns suffix on NetBIOS resolution for the WinNT provider, I found that the client makes a call to the local domain controller first to do an LSA_LookupNames call for the NetBIOS name and it gets back a domain controller in the remote domain/forest to go to which is responsible for that NetBIOS name. Subsequent to that lookup, it attempts to connect to the domain controller that was returned - but the name of the server is the simple host or NetBIOS name! So, it has to look that up and it uses DNS for that, trying suffixes in the order prescribed in the network config of the client. So, the domain is being translated properly by the local AD domain as part of the lookup but the client can't figure out how to get to that DC because LSA_LookupNames doesn't return an FQDN, just a hostname.
Hopefully this will save others the time I burned searching - sometimes it pays to just break down and open wireshark.
The solution was to ensure that the local computer, that the query was being run from, had a DNS suffix for the remote domain
I have written simple code to determine country location using the suffix on the url eg. .cn, .se, .br etc.
Does anyone have any ideas or even if its possible to determine country or location using urls that end in .com or .net?
I was just reading up on something and found online apps that can determine location/country from the ip so how would I determine the ip or look it up using the url? can I do this in .net?
OK
So I have the following code and I get an exception when the url is invalid or faulty, can anyone help me to catch the error and add the url to another list and continue with my loop.
Public Sub getIpAddress(ByVal querylist As ArrayList)
Dim IPList As New ArrayList
Dim badList As New ArrayList
Dim badHost As String
Try
For Each prod In querylist
Dim ipEntry As IPHostEntry = Dns.GetHostEntry(prod)
Dim IPAdd As IPAddress() = ipEntry.AddressList
IPList.Add(IPAdd.ToString)
Next
Catch ex As Exception
If ex.Message.Contains("No such host is known?") Then
End If
End Try
End Sub
You could easily use an IP-to-country mapping file such as this to build a little tool to infer location from the IP. I would also supplement this with the TLD of country specific domains such as .co.uk and .co.nz.
You can get the IP from the host name in java using something like:
InetAddress addr = InetAddress.getByName("www.bbc.co.uk");
Long ipNum = ipToInt(addr.getHostAddress());
You'll have to map to the equivalent in your language.
If it is .net or .com you cannot read the location from the url.
You can read the language of the browser, see http://www.west-wind.com/weblog/posts/334.aspx
You could also read the IP address of request, and then use a location service to find where the request came from.
Not from the URL, but from the IP, you can do this. There are publicly available files which map an IP range to a country.
Note that the location within a country is quite hard to get, as you can only know the address of an ISP, not of a Web site.
You can determine the country where the servers are located.
You can find out the location of the domain registrar.
But then, the company or a person behind the site may live in some third place.
Whose geolocation are you trying to find out?