u/TheOmniscientOne - 10 Archived Voat Posts in v/programming
u/TheOmniscientOne
  • home
  • search

u/TheOmniscientOne

1 post · 9 comments · 10 total

Active in: v/programming (10)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: What are your Site Hardening Tips?

Black Nasty and Security.

Do u even MetaCognition Bro :?

0 28 May 2018 06:44 u/TheOmniscientOne in v/programming
Comment 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.

0 27 May 2018 20:49 u/TheOmniscientOne in v/programming
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.

0 27 May 2018 17:45 u/TheOmniscientOne in v/programming
Comment on: What are your Site Hardening Tips?

https://efukt.com/21627_Mother_Fucking_T_Rex.html

0 27 May 2018 09:09 u/TheOmniscientOne in v/programming
Comment 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.

0 27 May 2018 08:05 u/TheOmniscientOne in v/programming
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?

0 27 May 2018 07:28 u/TheOmniscientOne in v/programming
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.

0 27 May 2018 06:55 u/TheOmniscientOne in v/programming
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:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

0 27 May 2018 06:12 u/TheOmniscientOne in v/programming
What are your Site Hardening Tips?
1 1 comment 27 May 2018 05:55 u/TheOmniscientOne (self.programming) in v/programming
Comment 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/");
?>
0 27 May 2018 05:52 u/TheOmniscientOne in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.