Where are the GATE (GATE – General Architecture of Text Engineering ) example files?

Just installed the Open Source software, GATE, with what appears to be the most recent stable version of GATE – Release 8.6 (June 10th 2019), using the “Platform Specific Installer for Windows”. The installation went smoothly and finished with a “Done Screen” that indicated, “Installation has completed successfully”.

I’ve run the application and followed some basic orientation tutorials. The application appears to be functioning as designed. Some later tutorials demonstrate opening the “Example” files used with these tutorials. I cannot find these example files. I’ve searched the application’s folders and there are no such files. Is there a separate folder located elsewhere for saving / opening the GATE files?

Anyone know about these files?

Link to the Gate website: https://gate.ac.uk/overview.html

Total number of WW, WR, RW conflicts in the given example?

+---+------+------+ |   | T1   | T2   | +---+------+------+ | 1 | W(A) |      | | 2 |      | R(A) | | 3 | W(A) |      | | 4 |      | R(A) | | 5 | W(A) |      | | 6 |      | W(A) | | 7 | W(A) |      | | 8 |      | W(A) | +---+------+------+ 

In the above scenario can someone tell me how many WW, WR, RW conflicts are there? Can we say that there is a WR(write read) conflict between transactions 1 and 2 from statement 1 to statement 4? As the A value is updated at statement 3, 4th statement read conflicts only with 3rd statement write but not 1st statement write. Can someone tell me in total how many WW, WR, RW conflicts are there between the two transactions?

What is an example of a schedule that is strict but not serial?

According to the definition of a strict schedule a value written by a transaction T is not read or overwritten by other transactions until T either aborts or commits.

Also, we say that the set of serial schedules is a proper subset of the set of strict schedules.

So what can be an example of a schedule that is strict but not serial? I am just not able to imagine one.


Example of two undecidable languages that cannot be reduced to each other

I want to find two undecidable languages $ A$ and $ B$ that $ A$ cannot reduce to $ B$ , $ B$ cannot reduce to $ A$ (Turing-reduce). One of my thought is to let $ A$ be the halting problem, let $ B$ be some non-Turing-recognizable language, then it is clear that $ B$ cannot reduce to $ A$ , but I don’t know which $ B$ can I pick to show that $ A$ cannot reduce to $ B$

Example of non-regular context free language L such that prefix(L) is regular

Suppose we have some non-regular context free language L. Suppose we also have language of all prefixes of words in L.

What can be an example of non-regular language L such that language of it’s prefixes is regular (Can be represented by a finite automaton)?

I don’t understand how language of prefixes can ever be regular, since the set of prefixes of a word include the word itself.

For example $ L= a^nb^n$ is my non-regular language. The language of it’s prefixes would include : $ \epsilon,a^n$ where $ n\ge 1$ ,$ a^nb$ where $ n\ge 1$ etc…

But what about b’s ? We need to know how many a’s there were in the first place. Therefore I don’t see how the language of prefixes can be regular.

How exactly works this SQL injection example related to the DVWA application?

I am a software developer converting do application security and I have some doubts about SQL injection example.

I am following a tutorial related the famous DVWA: http://www.dvwa.co.uk/

So I have the following doubt (probably pretty trivial).

I have this PHP code defining the query and the code to perform it:

<?php  if( isset( $  _GET[ 'Submit' ] ) ) {     // Get input     $  id = $  _GET[ 'id' ];      // Check database     $  getid  = "SELECT first_name, last_name FROM users WHERE user_id = '$  id';";     $  result = mysqli_query($  GLOBALS["___mysqli_ston"],  $  getid ); // Removed 'or die' to suppress mysql errors      // Get results     $  num = @mysqli_num_rows( $  result ); // The '@' character suppresses errors     if( $  num > 0 ) {         // Feedback for end user         $  html .= '<pre>User ID exists in the database.</pre>';     }     else {         // User wasn't found, so the page wasn't!         header( $  _SERVER[ 'SERVER_PROTOCOL' ] . ' 404 Not Found' );          // Feedback for end user         $  html .= '<pre>User ID is MISSING from the database.</pre>';     }      ((is_null($  ___mysqli_res = mysqli_close($  GLOBALS["___mysqli_ston"]))) ? false : $  ___mysqli_res); }  ?> 

As you can see the query is definied as string concatenation:

$  getid  = "SELECT first_name, last_name FROM users WHERE user_id = '$  id';"; 

So I can inject what I want into the $ id variable and perform extra SQL code as:

$  id = 1 OR 1=1 

that will be always true. Ok this is clear.

My doubt is different:

Inserting a valid value (such as 1) into the form) I obtain this URL: http://localhost/DVWA-master/vulnerabilities/sqli_blind/?id=1&Submit=Submit#

The query is performed correctly and I am obtaining the following message result: User ID exists in the database.

If I try to insert a totally wrong ID in the form, for example “ABC” I am obtaining the following message error: User ID is MISSING from the database.. Ok, and this is ok

But if I try to insert a “wrong” value such as 1′ in the form, the following URL is generated: http://localhost/DVWA-master/vulnerabilities/sqli_blind/?id=1%27&Submit=Submit#

And I obtain a valid message: User ID is MISSING from the database.

So it seems that the query was correctly executed searching for the user with ID=1.

Why the char is not brocking the query? I was thinking that it have to search a user with ID=1′ that is not existing in the database (as the case of ID=ABC).

Why? What am I missing? Probably it is a trivial question but I want to understand it in deep

How does the HTTPS server know where to get public or private key in following example

I was going through the following tutorial https://www.youtube.com/watch?v=8ptiZlO7ROs to set up an HTTPS connection, and noticed that it seems the code only makes use of server.crt and server.key (I’m not sure if server.key is the public or private key in the RSA key pair). But shouldn’t two keys be needed for HTTPS? (both public and private keys?).

Altogether, the tutorial covers generation of the following files:

ca.crt ca.key ca.srl client.crt client.csr client.key server.crt server.csr server.key  

But the node.js code only seems to make use of server.crt and server.key:

const express = require('express') const fs = require('fs') const https = require('https') const path = require('path')  const app = express() const directoryToServe = 'client'  const port = 3443  app.use('/', express.static(path.join(__dirname,'..',directoryToServe)))  const httpsOptions = {     cert: fs.readFileSync(path.join(__dirname,'ssl','server.crt')),     key: fs.readFileSync(path.join(__dirname,'ssl','server.key')) }  https.createServer(httpsOptions,app)     .listen(port, function() {         console.log(`Serving the '$  {directoryToServe}' directory at localhost:$  {port}`)     })   

My understanding of HTTPS is that:

  1. The server sends the client a public key
  2. The client returns a symmetric key encrypted with the public key
  3. the server decrypts the symmetric key using the private key
  4. the client and server communicate using the symmetric key

But as the code above uses only one key server.key (which I assume is the public key?), how does the HTTPS communication work since I assume both assymetric keys should be needed (public and private) to negotiate the symmetric key exchange?

Here is the code to generate the keys/certificates:

#!/bin/bash  # set values for certificate DNs # note: CN is set to different values in the sections below ORG="000_Test_Certificates"  # set values that the commands will share VALID_DAYS=360 CA_KEY=ca.key CA_CERT=ca.crt CLIENT_KEY=client.key CLIENT_CERT=client.crt CLIENT_CSR=client.csr CLIENT_P12=client.p12 SERVER_KEY=server.key SERVER_CERT=server.crt SERVER_CSR=server.csr KEY_BITS=2048  echo echo "Create CA certificate..." CN="Test CA" openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:$  KEY_BITS -out $  CA_KEY openssl req -new -x509 -days $  VALID_DAYS -key $  CA_KEY -subj "//CN=$  CN\O=$  ORG" -out $  CA_CERT echo "Done."  echo echo "Creating Server certificate..." CN="localhost" openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:$  KEY_BITS -out $  SERVER_KEY openssl req -new -key $  SERVER_KEY -subj "//CN=$  CN\O=$  ORG" -out $  SERVER_CSR openssl x509 -days $  VALID_DAYS -req -in $  SERVER_CSR -CAcreateserial -CA $  CA_CERT -CAkey $  CA_KEY -out $  SERVER_CERT echo "Done."  echo echo "Creating Client certificate..." CN="Test User 1" USER_ID="testuser1" P12_PASSWORD= openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:$  KEY_BITS -out $  CLIENT_KEY openssl req -new -key $  CLIENT_KEY -subj "//CN=$  CN\O=$  ORG\UID=$  USER_ID" -out $  CLIENT_CSR openssl x509 -days $  VALID_DAYS -req -in $  CLIENT_CSR -CAcreateserial -CA $  CA_CERT -CAkey $  CA_KEY -out $  CLIENT_CERT openssl pkcs12 -in $  CLIENT_CERT -inkey $  CLIENT_KEY -export -password pass:$  P12_PASSWORD -out $  CLIENT_P12 echo "Done."  echo echo "----- Don't forget to open your browser and install your $  CA_CERT and $  CLIENT_P12 certificates -----" echo 

Thank you in advance!