charlesabarnes / SPFtoolbox

SPFtoolbox is a Javascript and PHP app to look up DNS records such as SPF, MX, Whois, and more
http://spftoolbox.com/
MIT License
274 stars 61 forks source link

getPort.php #22

Closed frju365 closed 6 years ago

frju365 commented 6 years ago

I tried something, surely unfinished. I don't know how to manipulate the .out of the function. You use "$response" but can you explain how I can manipulate the echo of the function ?

fixes #20

charlesabarnes commented 6 years ago

I recommend checking out the code for the blacklist. It built the object and spit it out all at once

frju365 commented 6 years ago

ok. I will see that tomorrow... 3 am in my timezone ;)

frju365 commented 6 years ago

ok. I try something which is quite the same... as I just removed useless class and just check if ip or domain was correctly set. Not tested if it worked or not.

frju365 commented 6 years ago

for the choice of the Port to check, we can of course do a discussion. I can add more. It's just to not write 1000 lines on the page ;)

edit : I just download every source, to avoid repeatedly do requests to google servers.

charlesabarnes commented 6 years ago

Beyond the external request, is there any real benefit from moving away from the CDN?

frju365 commented 6 years ago

In fact, there are different reason (it's only my point of view... :) ) :

charlesabarnes commented 6 years ago

Bootstrap isn't by Google, it is a framework developed by twitter, and the CDN is served by Stackpath. Keeping the CDN in use is actually decentralizing it so the load isn't being put on your own personal CDN. This helps reduce the cost of hosting and reduces the host's server load.

frju365 commented 6 years ago

ok. Well anyway, it was not the object of the PR ;) For privacy use, most of servers use their own bootstrap css files... The CDN hosters track websites, which is not a really good feature. Most of the website which care of privacy and data use their own files.

frju365 commented 6 years ago

Is it ok like that ?

frju365 commented 6 years ago

Do you have an idea what I did wrong ?

frju365 commented 6 years ago

It works... finally (I forgot I had this PR pending). But I've still a problem with the title. It's still undefined... but strange as I added it to the main.js ... Do you have an idea how I can correct it ?

charlesabarnes commented 6 years ago

Sorry I've been so unresponsive. I'll take a look tonight

frju365 commented 6 years ago

Don't worry. Well, understanding Javascript here is quite difficult. I didn't understand why it didn't work. ;) Now I understand better even if there are some part of the code which are still weird for me like the title. I didn't see a limited number of "case" in main.js, but it's perhaps my error ?

charlesabarnes commented 6 years ago

I'll check this out this weekend. can you add screenshots of it working?

frju365 commented 6 years ago

Well, finally, it's ok. I get the title. Surely a cache I had in my browser. So, the PR is ready for final review. Wait 2 sec : I will add screenshot ;)

frju365 commented 6 years ago

yunohostportswebsite

For this screenshot, I just changed the title in the index.html.

Perhaps in the future, I will try to add title, because in fact, here there is no title.

frju365 commented 6 years ago

@charlesabarnes : Ok, done.

yunohostportswebsite

frju365 commented 6 years ago

Sometimes it say ports is closed but are open... Perhaps increase the time in the function (to try more time) ? Try and give feedbacks... perhaps it's just cache which is the problem.

charlesabarnes commented 6 years ago

In the future I will want to add the option to check custom ports. LGTM