web browser does not show image for sleuth game?

My teacher gave me this assignment for something called a sleuth game. I go to the website here: sleuth game

basically I go to this website and I download the puzzle and before I start working on it I try to open it in the browser yet all the web browsers firefox, Edge, Brave all of them show the same thing:

web browser hung on loading not doing anything

please help if I don’t work on this damn thing, I’ll fail

pgpool-II and Postgres docker image : automated failover and online recovery via rsa key

I’ve been following this documentation for pgpool-ii https://www.pgpool.net/docs/latest/en/html/example-cluster.html

I’m having a hard time setting up rsa on my postgres streaming cluster built in official docker image https://hub.docker.com/_/postgres.

I was able to do the streaming now i’m on the part of setting up failover.

part of the documentation says.

To use the automated failover and online recovery of Pgpool-II, the settings that allow passwordless SSH to all backend servers between Pgpool-II execution user (default root user) and postgres user and between postgres user and postgres user are necessary. Execute the following command on all servers to set up passwordless SSH. The generated key file name is id_rsa_pgpool.  
     [all servers]# cd ~/.ssh      [all servers]# ssh-keygen -t rsa -f id_rsa_pgpool      [all servers]# ssh-copy-id -i id_rsa_pgpool.pub postgres@server1      [all servers]# ssh-copy-id -i id_rsa_pgpool.pub postgres@server2      [all servers]# ssh-copy-id -i id_rsa_pgpool.pub postgres@server3       [all servers]# su - postgres      [all servers]$   cd ~/.ssh      [all servers]$   ssh-keygen -t rsa -f id_rsa_pgpool      [all servers]$   ssh-copy-id -i id_rsa_pgpool.pub postgres@server1      [all servers]$   ssh-copy-id -i id_rsa_pgpool.pub postgres@server2      [all servers]$   ssh-copy-id -i id_rsa_pgpool.pub postgres@server3 

Is it possible to set it up inside a container from postgre’s official image? I would like to get an idea on how to do it from some samples or existing solution.

Moreover, Since I can’t do the rsa thing as of the moment.

I decided to create a script that is using a psql command on my pgpool server to the new master

#!/bin/bash # This script is run by failover_command.  set -e  # Special values: #   %d = failed node id #   %h = failed node hostname #   %p = failed node port number #   %D = failed node database cluster path #   %m = new master node id #   %H = new master node hostname #   %M = old master node id #   %P = old primary node id #   %r = new master port number #   %R = new master database cluster path #   %N = old primary node hostname #   %S = old primary node port number #   %% = '%' character  FAILED_NODE_ID="$  1" FAILED_NODE_HOST="$  2" FAILED_NODE_PORT="$  3" FAILED_NODE_PGDATA="$  4" NEW_MASTER_NODE_ID="$  5" NEW_MASTER_NODE_HOST="$  6" OLD_MASTER_NODE_ID="$  7" OLD_PRIMARY_NODE_ID="$  8" NEW_MASTER_NODE_PORT="$  9" NEW_MASTER_NODE_PGDATA="$  {10}" OLD_PRIMARY_NODE_HOST="$  {11}" OLD_PRIMARY_NODE_PORT="$  {12}"  #set -o xtrace #exec > >(logger -i -p local1.info) 2>&1  new_master_host=$  NEW_MASTER_NODE_HOST ## If there's no master node anymore, skip failover. if [ $  NEW_MASTER_NODE_ID -lt 0 ]; then     echo "All nodes are down. Skipping failover."     exit 0 fi  ## Promote Standby node. echo "Primary node is down, promote standby node" $  {NEW_MASTER_NODE_HOST}.  PGPASSWORD=postgres psql -h $  {NEW_MASTER_NODE_HOST} -p 5432 -U postgres <<-EOSQL  select pg_promote(); EOSQL  #logger -i -p local1.info failover.sh: end: new_master_node_id=$  NEW_MASTER_NODE_ID started as the primary node #exit 0 

The above script is working if i simulate that my primary is down.

However, in my new primary this is the log

2020-10-07 20:25:31.924 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:25:31.924 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:25:32.939 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:25:32.939 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history 2020-10-07 20:25:32.939 UTC [1165] WARNING:  archiving write-ahead log file "00000002.history" failed too many times, will try again later cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:26:33.003 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:26:33.003 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:26:34.012 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:26:34.012 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:26:35.026 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:26:35.026 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history 2020-10-07 20:26:35.026 UTC [1165] WARNING:  archiving write-ahead log file "00000002.history" failed too many times, will try again later cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:27:35.096 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:27:35.096 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:27:36.110 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:27:36.110 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:27:37.123 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:27:37.123 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history 2020-10-07 20:27:37.123 UTC [1165] WARNING:  archiving write-ahead log file "00000002.history" failed too many times, will try again later cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:28:37.177 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:28:37.177 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:28:38.221 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:28:38.221 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history cp: cannot create regular file '/archives/00000002.history': No such file or directory 2020-10-07 20:28:39.230 UTC [1165] LOG:  archive command failed with exit code 1 2020-10-07 20:28:39.230 UTC [1165] DETAIL:  The failed archive command was: cp pg_wal/00000002.history /archives/00000002.history 2020-10-07 20:28:39.230 UTC [1165] WARNING:  archiving write-ahead log file "00000002.history" failed too many times, will try again later 

still trying to execute the WAL part.

moreover, on my other standby it is still looking for the old master.

2020-10-07 20:29:07.818 UTC [1365] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:12.827 UTC [1367] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:17.832 UTC [1369] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:22.835 UTC [1371] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:27.826 UTC [1373] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:32.836 UTC [1375] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:37.836 UTC [1377] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:42.850 UTC [1379] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:47.857 UTC [1381] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 2020-10-07 20:29:52.855 UTC [1383] FATAL:  could not connect to the primary server: could not translate host name "pg-1" to address: Name or service not known 

and dealing with this I think is more complicated than setting up the rsa part so that i could utilize the existing fail_command script that pgpool has.

Thanks for the response.

Segmenting a binary image into three parts

I am trying to segment a binary image into three parts, head, body, and tail. The binary image is a stack tiff file of a moving fruit fly larvae. I was able to do this initially by removing points within a certain distance of the centroid:

enter image description here

However, this broke down if the larvae’s head moved too close to the centroid, because the head points would then be removed:

enter image description here

I have been looking for creative solutions to this problem. Trying to fit it to a curved ellipsoid and get the vertice points that make up the tail and the head. However, I have not been very successful! I was curious if anyone had any insight into this problem or a suggestion for a creative solution? Thank you! 🙂

Here are the raw binary images:

1)

enter image description here

2)

enter image description here

Upload Image Remotely from Rest API using JWT Authorization INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE

Trying to upload images into my media gallery programatically from my local machine to webserver.

Using this function here to get the JWT token along with the
WordPress REST API Authentication plugin to initialize JWT:

function get_jwt_token_wp(): ?string {     $  request_url = 'https://example.com/wp-json/api/v1/token';      $  api = curl_init();      $  username = 'admin';     $  password = 'password';     //set the url, POST data     curl_setopt( $  api, CURLOPT_URL, $  request_url );     curl_setopt( $  api, CURLOPT_POST, 1 );     curl_setopt( $  api, CURLOPT_POSTFIELDS, "username=$  username&password=$  password" );     curl_setopt( $  api, CURLOPT_VERBOSE, 1);     curl_setopt( $  api, CURLOPT_RETURNTRANSFER, 1 );      $  server_output = curl_exec ($  api);     printr(curl_getinfo($  api));     if ($  server_output === false) {         die('Error getting JWT token on WordPress for API integration.');     }     $  server_output = json_decode($  server_output);      if ($  server_output === null && json_last_error() !== JSON_ERROR_NONE) {         die('Invalid response getting JWT token on WordPress for API integration.');     }      if (!empty($  server_output->jwt_token)) {         $  jwt_token = $  server_output->jwt_token;         curl_close ($  api);         return $  jwt_token;     } else {         die('Invalid response getting JWT token on WordPress for API integration.');     }     return null; } 

and this function to upload the image

function upload_image_wp( $  path ): array {     $  request_url = 'https://example.com/wp-json/wp/v2/media';      $  image = file_get_contents( $  path );     $  mime_type = mime_content_type( $  path );      $  api = curl_init();      $  username = 'admin';     $  password = 'password';      $  httpheader = array( 'Content-Type: ' . $  mime_type, 'Content-Disposition: attachment; filename="' . basename($  path) . '"', 'Authorization' => 'Bearer ' . WOO_JWT_KEY );      curl_setopt( $  api, CURLOPT_URL, $  request_url );     curl_setopt( $  api, CURLOPT_POST, 1 );     curl_setopt( $  api, CURLOPT_POSTFIELDS, $  image );     curl_setopt( $  api, CURLOPT_HTTPHEADER, $  httpheader );     curl_setopt( $  api, CURLOPT_VERBOSE, 1);     curl_setopt( $  api, CURLOPT_RETURNTRANSFER, 1 );     curl_setopt( $  api, CURLOPT_USERPWD, $  username . ':' . $  password );     $  result = curl_exec( $  api );     printr(curl_getinfo($  api));     curl_close( $  api );     return json_decode( $  result ); } 

with my headers looking something like this:

Array (     [0] => Content-Type: image/gif     [1] => Content-Disposition: attachment; filename="user_loggedin_avatar.gif"     [Authorization] => Bearer eyJhbGciOiJIU..................................... ) 

Is my format wrong? Am I doing something else wrong? I have never worked with JWT authentication before so this has all been new to me.

This is the error I am getting on the return of my call.

object(stdClass)[3]   public 'status' => string 'error' (length=5)   public 'error' => string 'INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE' (length=39)   public 'code' => string '401' (length=3)   public 'error_description' => string 'Authorization header must be type of Bearer Token.' (length=50) 

Unfortunately google isn’t showing much of anything regarding why this error pops up, so I am a bit stuck. Any help greatly appreciated!

For an email signature, what is the “ideal” CDN image hosting provider? [closed]

Email signatures typically have an image of a logo or a profile picture. My question is, what is your recommended image hosting URL/service? Are some URL’s trusted over others?

I am not sure where to host these images hence the question.

I guess some ISP’s and email clients determine the "trustworthiness" of an image URL?

All experience greatly appreciated!

Can I “High Five” my duplicates from the Mirror Image spell?

The text for Mirror Image says:

the duplicates move with you and mimic your actions […] If an attack hits a duplicate, the duplicate is destroyed.

Does this mean that my warlock can cast Mirror Image, slay an opponent in the first two rounds, then spend the remaining eight rounds giving himself one high five after another? Then wave goodbye to the three images when the spell duration expires normally?

Or does one high five from the caster destroy his own duplicate? One destroyed image with each flat palm slap?

Assume that at the end of round two, no opponent has hit a duplicate, and the three original duplicates are still present when celebratory hand gestures commence.

Potential vulnerability in JSON response returning base 64 encoded image data, with the response being vulnerable to MIME sniffing

A JSON response in the API of a webapp is returning the base64 of a user-uploaded image, and there’s no X-Content-Type-Options Header to prevent MIME sniffing.

Could this be a potential vulnerability such as an XSS for the webapp by using steganography to edit the image with a payload, uploading it, and then MIME sniffing the JSON response? (or by any other means?)

peace of code hidden inside stegano image [closed]

I’m trying to decipher a stegano file, a jpg image. I am new to so pleace dont get mad if my question seems to be a simple one.

I friend of mine send me a jpg image. I have tried steghide to unhide the hidden file without any luck. My password guesses seem to keep failing.

An other approach was one I found on youtube.

Here I do not seem to get further then the first few steps where this man finds the (binairy) string he uses to decypher. In my case there is a large string at the end of the file but its hidden, which means I can not see the characters used but still seem to be able to copy and paste this peace. When I use python to decypher this string it says that there is a "^" placed inside it. Now I can not follow the method in the youtube clip either.

Can somebody help me out here?