Comment on: What are your Site Hardening Tips?
0 28 May 2018 06:44 u/TheOmniscientOne in v/programmingComment on: How can one Collect the details of articles from websites?
Everything else being equal, Python is more elegant.
I am sticking with my language right now because my codebase uses lots of tricks like case statements [switch in php] which actually don't even evaluate/parse past the case statements and is therefore an easy way to segregate functions for extra security. I also misuse the heck out of MYSQL variables although that is pretty portable as long as I can get DB hooks for the same generation of MYSQL.
Python seems plenty mature now if I were to start over. I have used it for small web interfaces and it's great.
Comment on: How can one Collect the details of articles from websites?
Stick with Python vs. php. I only use php because at the time I developed some of my first big apps it had more modules and portability. Python is better.
Comment on: What are your Site Hardening Tips?
0 27 May 2018 09:09 u/TheOmniscientOne in v/programmingComment on: What are your Site Hardening Tips?
Qubes is cool. You can use the same concept and just put your Webserver into one and your DB into another and a tiny little squid proxy in the only one facing the public. When you roll your own they have to as well! I haven't used qubes yet but I have used a partitioned OS before. For now though I just use firejail+apparmor.
Thanks for the ideas, I think they will help further me along.
Comment on: What are your Site Hardening Tips?
Thanks for the notes.
Assuming I had my own server, why would a VM be any more secure than just running a masqueraded address/virtualhost? Physically same NIC and hardware etc, so you're assuming the VM somehow jails them into the VM environment? I'm not arguing with you, just that I generally prefer the reduction of complexity. A firewall on the host system is going to be performing the same functions whether port 80 is coming from a VMware host or a Web Server frontend.
I am using a Virtual Server on one project with really old code base though. What's your favorite these days?
Comment on: What are your Site Hardening Tips?
What do you suggest as a front end language?
My entire codebase is hand-written at this point and therefore doesn't have any heavy frameworks or bloat. Mysql/InnoDB does most of the heavy lifting so it's really just a display app.
Comment on: How can one Collect the details of articles from websites?
I would try a method that only grabbed headers, but it would be difficult to implement across all the various server types. What I am saying is if you could just grab the header without the rest of the document that would be great. Some coders would pass the response directly into buffers and close the connection as soon as it saw the </head> tag but I think that would be rude. [And likely to get your bot blacklisted]
Here's some background on headers:
What are your Site Hardening Tips?
1 1 comment 27 May 2018 05:55 u/TheOmniscientOne (self.programming) in v/programmingComment on: How can one Collect the details of articles from websites?
https://stackoverflow.com/questions/4348912/get-title-of-website-via-link
<?php
function get_title($url){
$str = file_get_contents($url);
if(strlen($str)>0){
$str = trim(preg_replace('/\s+/', ' ', $str)); // supports line breaks inside <title>
preg_match("/\<title\>(.*)\<\/title\>/i",$str,$title); // ignore case
return $title[1];
}
}
//Example:
echo get_title("http://f4ct.co/");
?>
Black Nasty and Security.
Do u even MetaCognition Bro :?