A flag (indicator) that shows for each row which conditions was used to select it

Suppose I have the table foo. I want to filter the rows of this table using different conditions (cond_1, cond_2, …, cond_nthe order is important) combined in a disjunction, i.e.:

SELECT * FROM foo WHERE cond_1 OR cond_2 OR ... OR cond_n; 
  1. Is it possible (in PostgreSQL 13) to distinguish for each row which condition cond_i was used to select it? Since I stated that the order is important the question may be reformulated as – I want to know the first cond_i that selected the row, for each row.

Now consider that I have in foo a column for this purpose, e.g. selected_by.

  1. Is it possible to distinguish for each row which condition cond_i was used to select it and store it in selected_by? (the same as 1st question but for an UPDATE statement)

Two things are important: the order of conditions (as it was highlighted earlier); performance (i.e. table foo may have many rows, the number of conditions is small, up to 5-10).

How can I make the flag to be true and false but each time only once?

using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine;  public class UnlockCrate : MonoBehaviour {     public Animation anim;     public IKControl ikControl;     public GameObject securityKeyPad;     public CinemachineVirtualCamera virtualCam;     public CinemachineFreeLook freeLookCam;     public CamerasControl camerasContorl;      private bool playAnimOnce = false;      private void Update()     {          if (!playAnimOnce)         {             if (ikControl.handFinishedMove == true)             {                 securityKeyPad.SetActive(true);                 virtualCam.enabled = true;                 freeLookCam.enabled = false;                 Cursor.visible = true;                 camerasContorl.enabled = false;                             }              playAnimOnce = true;         }         else if (playAnimOnce)         {             securityKeyPad.SetActive(false);             virtualCam.enabled = false;             freeLookCam.enabled = true;             Cursor.visible = false;             camerasContorl.enabled = true;             playAnimOnce = false;         }     } } 

The problem is that the playAnimOnce flag is false then true then false then true all the time. I want that if it’s false do something and then only if it’s true do something else.0

Should I use another flag helper and how ?

How can I hide a flag from `strings` command

I want to create RE CTF, that the user needs to discover which string he need to write in order to execute a function that will print the flag, but, with a simple strings command in shell, we can discover the flag in the printf function. So, how can we make this not to happen?

#include <stdio.h>  void print_flag() {     printf("secret_string discovered. flag: {eAsy_p3asy}"); }  int main() {     int c;     c = getchar();     while (c != 'secret_string') {         putchar(c);         c = getchar();     }     print_flag();     return 0; } 

strings output: I include only the flag. I don’t want the flag to be visible like this, it makes no sense.

secret_string discovered. flag: {eAsy_p3asy} 

Does Nmap use only one of the DNS servers specified in the –dns-server flag per host?

When I’m scanning with Nmap, I make an effort to get proper hostnames associated with the target IPs. To do this, I scan UDP 53 on the targets to identify DNS servers and then run something like the following for each identified DNS server:

nmap -sL -v4 --dns-servers DNSSERVER TARGETS 

I have to review the results for each tested DNS server to see how many of the targets it can resolve, and also determine if the resolved targets differ.

The docs seem to imply that if you specify multiple servers in the --dns-servers flag, that it will choose one at random (or round robin). This interpretation comes from the "is often faster" part.

The problem I have is that my scan targets may not all be supported by the same DNS server. In my case, I’d rather specify all identified DNS servers in --dns-servers and have it fail over until it finds one that returns a response. If only one of the specified servers is used, to get accurate results I would need to perform multiple scans, each with a single DNS server specified.

My question is, is it true that the --dns-server flag will use only one of the specified DNS servers, and not try them all?

Investigating header and cookie flag issues

I am working on issues reported by Nessus. Most of the issue types are missing headers and cookie flags.

The tricky part here is these issues have been reported at different port numbers, for example 443, 8008 and 8080.

Can anyone please help on how to check the request and response on these port numbers or how to check whether the security headers and cookie flags are set on different port numbers?

Flag Finding in Penetration Test

Need a bit of help in reagards to flag finding.

I have gained access to a custom Target mahine on VMware to find 3 flags.

all the flags start with word “flag” and some of them are encrypted. I could only find 1 broken link to 1 flag but when i try to open it, it just prints out some weired data. Could anyone please guide me how to:

  1. open the contents of this found flag.

  2. how to find other 2 flags.


enter image description here

Datapump not working with parallel and flag %U? (AIX)

Some minutes ago I’ve tried to do a export but I get the following erro (AIX system):

Additional information: 3 ORA-31693: Table data object "XX"."TABLE_NAME" failed to load/unload and is being skipped due to error: ORA-31617: unable to open dump file "/dir/back/dump/dump_xx_04.dmp" for write ORA-19505: failed to identify file "/dir/back/dump/dump_xx_04.dmp" ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or directory 

But without the %U in dumpfile name it worked..

What can be the reason? I’ve seen it in some blog that to use just parallel=N without %U actually become the export slower? that is true?

Urgent Flag of TCP, Computer Networks

The Urgent Flag(URG) is set whenever the sender’s Application Layer wants to send some urgent data to the receiver. In this case, the Transport Layer does not wait for enough data to achieve maximum segment size. Now, my question is how do the routers in between recognize that the packet needs to be forwarded urgently(they do not have the transport layer)?

Retrieving a flag from vim commands by reading through strace output [CTF]

So, to clarify, I’m currently working on a CTF challenge that consists of running an strace over on a bash script that is running vim commands using commands like vim -c “:!cat flag.txt” inside of a bash script. For some clarity, this idea was heavily inspired by a CTF I did recently and here’s a writeup of what it looked like and did if you’d like to see what I’m really going for(https://github.com/Dvd848/CTFs/blob/master/2019_36C3_Junior/tracer.md). I’m not quite sure how to get the proper output from the vim commands to obfuscate the flag. I’d like it to recognize each keypress as reads and writes, but haven’t found a solid approach to accomplish this cleanly. Any suggestions would be highly appreciated. Essentially there would be an strace output where the flag could be seen being written using vim. I’m not 100% sure this can even be done properly through bash, so any suggestions would be very helpful!

Do I need to enable Trace Flag 1117 for equally sized data files?

I was reading about fill proportional algorithm in SQL Server and then I recalled TF1117. BOL states:

When a file in the filegroup meets the autogrow threshold, all files in the filegroup grow. This trace flag affects all databases and is recommended only if every database is safe to be grow all files in a filegroup by the same amount.

What I can’t understand is if data files are filling proportionally, won’t they auto-grow proportionally either? In that case we can’t omit using TF1117.