Tag: access

Access List, Microsoft Windows, Security

Modify access control lists on specified files through cmd

Icacls displays or modifies discretionary access control lists (DACLs) on specified files, and applies stored DACLs to files in specified directories.   Parameters Parameter Description <FileName> Specifies the file for which to display DACLs. <Directory> Specifies the directory for which to display DACLs. /t Performs the operation on all specified files in the current directory …

C#

Connecting MS Access Database in C#

Let’s how we can connect to an MS Access database (accdb) in C#. String _database_path = "path/to/database/file"; String _conn_str = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _database_path + ";Persist Security Info=False";   //connect OleDbConnection _connection = new OleDbConnection(_conn_str); _connection.Open();   //disconnect _connection.Close();String _database_path = "path/to/database/file"; String _conn_str = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _database_path + ";Persist Security Info=False"; //connect OleDbConnection …

Apache, Linux

Retrieve useful information from Apache logs

Common locations where you can find Apache logs are /var/log/apache2 and /var/log/httpd/. You can extract valuable information from your apache logs. Here are some useful examples! Extract unique IP addresses: cat /var/log/apache2/access.log | awk ‘{print $1}’ | sort | uniqcat /var/log/apache2/access.log | awk ‘{print $1}’ | sort | uniq   Extract unique IP addresses with …