At what level is the Pact of the Chain spell, Find Familiar, cast by a Warlock?

In a detail that came up as I asked this question I’d like to know how find familiar works for a Warlock who casts spells at levels above first level.

Pact of the Chain

You learn the find familiar spell {a first level spell} and can cast it as a ritual. The spell doesn’t count against your number of spells known.

A Warlock at level 4 knows 5 spells, has two spell slots and all spell slots are at level 2. (PHB table “The Warlock”). The Pact of the Chain find familiar does not count against spells known.

  1. The Warlock gets this spell at third level after choosing Pact of the Chain. Is it a second level spell(per the table) or — since it doesn’t count against spells known and is cast as a ritual — does it remain a first level spell?

The Warlock table shows how many spell slots you have. The table also shows what the level of those slots is; all of your spell slots are the same level. {snip} … 5th level, you have two 3rd‑level spell slots. To cast the 1st-level spell Thunderwave, you must spend one of those slots, and you cast it as a 3rd‑level spell.

Is this Pact Boon outside of the limitations of the spells on the table?

Rules for spell casting, Rituals, includes this text:

The ritual version of a spell takes 10 minutes longer to cast than normal. *It also doesn’t expend a spell slot, which means *the ritual version of a spell can’t be cast at a higher level**.

This makes great sense for spells that have “at higher level.” Find familiar doesn’t have that feature, so I am not sure if this applies.

Since it doesn’t cost a spell slot, and is a ritual (not eligible to be cast at a higher level) would that Pact of the Chain boon remain a first level spell (regardless Warlock’s level who casts it), or does the Warlock table drive the spell level up?

The answer helps a question about how to fill up all of the spell slots in a Ring of Spell Storing. (If it stays at first level, this represents an exception to the general requirement that Warlock spell are always cast at the same level).

Hinge joints chain movement (2D)

I have some problems with hinge joint chain movement calculations…

Here is my algorithm for segments location/rotation adjustments after a previous segment update (C#):

void AdjustLocation() {     float halfWidth = size.Width / 2;      // Translations     Vector parentBack = PrevSegment.Center - (halfWidth * new Vector(Cos(PrevSegment.Rotation), Sin(PrevSegment.Rotation))); // Green on the pic     Vector front = this.Center + (halfWidth * new Vector(Cos(this.Rotation), Sin(this.Rotation))); // Blue on the pic      // Const spacing between segments     float spacing = *some_value*;      Vector dv = parentBack - front;     float k = spacing / dv.Length;      // New front location     front = parentBack - (dv * k);     // New rotation     dv = front - this.Center;     this.Rotation = Atan2(dv.Y, dv.X);      // Translate back to the center     this.Center = front - (halfWidth * new Vector(Cos(this.Rotation), Sin(this.Rotation)));      NextSegment?.AdjustLocation(); } 

It’s working (partially), but it seems I’m missing something as it doesn’t behave like a chain. Segments always move one towards another although they should not always do this. Also overlapped sections of a long chain form a “knot” going all the way to the end of the chain before its “untangling”. What am I missing?

Btw: everything screws up with negative spacing values.

P.S. Tried to visualize the algorithm on the picture: img

Is the Pact of the chain is as bad as it look? or did I just missed something?

The warlock’s pact of the chain look really bad in comparison with other pacts options. You just can have better familiar than other peoples.

One the other hand, you have pact of the blade (aka I litteraly have a subclass based one me pact, and almost all my invocations are at least super usefull), and the pact of the tome (aka pact of the chain that come later but less good with an invocation + all rituals of the game + 3 cantrips – with Book of ancient secrets). Unless you are the group tank and you want the “An healing spell always make me full life” invocation – Gift of the Ever-living Ones – it’s look like an always bad choice.

Am I missing the point, or did this pact option is just a bad option?

Is a +1 chain shirt strictly inferior to a breastplate?

My character really likes chain shirts. He much prefers them to other armor like for instance a breastplate.

I thought maybe I could make up for his tastes with a piece of magical armor, since usually magic items are considered stronger than mundane ones. But I’m realising that it’s still not quite as good. There are two benefits to mundane armor that I can find, and no benefits to magic armor (besides the AC bonus).

  1. Magic items can be suppressed by the antimagic field spell, and there seems to be no way to make magic armor not work that wouldn’t also work on magic armor. With mundane weapons some creatures will be able to resist, so magic on weapons is great. Not so with magical armor, as far as I know.

  2. A Forge Cleric can use their Blessing of the Forge ability on nonmagical armor, but can’t use it on magical armor.

At 1st level, you gain the ability to imbue magic into a weapon or armor. At the end of a long rest, you can touch one nonmagical object that is a suit of armor or a simple or martial weapon. Until the end of your next long rest or until you die, the object becomes a magic item, granting a +1 bonus to AC if it’s armor or a +1 bonus to attack and damage rolls if it’s a weapon.

Is there anything a +1 chain shirt has that a mundane breastplate doesn’t have?

Cannot build a ROP chain

My ROP exploit crashes with segmentation fault for unknown reason. This is a vulnerable code (compiled via command gcc h2.c -no-pie -fno-stack-protector -m32 -o h2):

#include <stdio.h> #include <string.h> #include <stdlib.h>  char string[100]; void exec_string() {     system(string); }  void add_bin(int magic) {     if (magic == 0xdeadbeef) {         strcat(string, "/bin");     } }  void add_sh(int magic1, int magic2) {     if (magic1 == 0xcafebabe && magic2 == 0x0badf00d) {         strcat(string, "/sh");     } }  void vulnerable_function(char* string) {     char buffer[100];     strcpy(buffer, string); }  int main(int argc, char** argv) {     string[0] = 0;     vulnerable_function(argv[1]);     return 0; } 

I followed this example: https://medium.com/@nikhilh20/return-oriented-programming-rop-chaining-def0677923ad

In addition, there are no suitable gadgets of pop pop ret pattern (actually, there are, but pop [some reg] pop ebp ret, which messes up the stack as well as gadgets with leave instruction).

I’ve tried two different stack paddings for an exploit: the first one is identical to the primer in the link I provided above. The second one is (top – higher addresses, bottom – lower addresses):

address of exec_string garbage value 0x0badf00d 0xcafebabe add esp 8; pop ebx; ret <-- gadget address of add_sh 0xdeadbeef pop; ret gadget <-- gadget address of add_bin <-- compromised instruction pointer after BoF AAAA .... 112 'A's to overflow the buffer and overwrite ebp (108 + 4) .... AAAA 

Let me explain the add esp, 8; pop ebx; ret gadget. There are no gadgets like pop [some reg]; pop [some reg, not ebp]; ret for chaining calls from add_sh to exec_string functions, so I’ve tried to make a little hack. I’ve chosen add esp, 8; pop ebx; ret gadget to pop out 0xcafebabe and 0x0badf00d via add esp,8 then pop out garbage unreferenced value via pop ebx and then ret to exec_string. Does it suppose to work at all? Correct me if I wrong.

Moreover, when I’ve started debugging, it results with:

Cool, it looks like I owned an instruction pointer, I need to replace it with add_bin function address to jump to it and start a ROP chain.

But…

SIGSEGV in 0x91c2b1c2? I’ve entered a correct add_bin address, ASLR, PIE and canaries are disabled. I thought that maybe there is an undefined reference to string that vulnerable_function gets, but in primer in the link provided above it was ignored, so it confused me a lot.

verification of certificate chain using openssl verify command

When attempting to verify google server’s certificate chain using openssl, I am getting error.

Extract google’s server and intermediate certificates:

$ echo | openssl s_client -showcerts -connect www.google.com:443 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > /tmp/server_certs.crt

Extract google’s root CA from jdk:

$ pwd

/cygdrive/c/Program Files/Java/jdk1.8.0_231/jre/lib/security

$ keytool -export -keystore cacerts -storepass changeit -alias ‘globalsignr2ca [jdk]’ -file /cygwin64/tmp/google_root.der

$ openssl x509 -in /tmp/google_root.der -out /tmp/google_root.pem -inform der

Also extracted google’s root certificate from chrome browser to /tmp/google-chrome-root.pem. Doing a diff between chrome’s root certificate and jdk extracted root certificate, there is no difference

$ diff /tmp/google_root.pem /tmp/google-chrome-root.pem

$ Based on this, I know, I am using the right root certificate.

Invoke openssl verify

$ openssl verify -CAfile /tmp/google_root.pem /tmp/server_certs.crt

C = US, ST = California, L = Mountain View, O = Google LLC, CN = www.google.com

error 20 at 0 depth lookup: unable to get local issuer certificate error /tmp/server_certs.crt: verification failed

I know verification through

$ openssl s_client -showcerts -servername www.google.com -connect www.google.com:443

is successful

CONNECTED(00000005) depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O = Google Trust Services, CN = GTS CA 1O1 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google LLC, CN = www.google.com verify return:1 

and was expecting a similar successful result through the openssl verify command as well.

I am doing this exercise in windows 10 and cygwin.

Can you twin Counterspell in response to a Counterspell counter chain?

Scenario:

Four spellcasters: 2v2 (Notation 1A 1B vs 2A 2B)

  • 1A tries to cast a spell
  • 2A uses his reaction to cast Counterspell to counter that spell
  • 1B uses his reaction to cast Counterspell to counter 2A’s Counterspell

Can 2B twin Counterspell to counter both 1A’s spell and 1B’s Counterspell? I can’t think of a use for doing this, other than if 1B got some advantage from successfully countering a spell.

Matrix chain multiplication: Greedy approach

Edit; some suggested a thread in which the algorithm multiplies the 2 matrices with lowest values first. Mine is different: it divides by parenthesis the 2 matrices. And continues to the next section.

I have tried so many ways to disprove this one. This algorithm works like this: A= 5×2 B= 2×7 C= 7×3

First, find the lowest number in the lines / rows column. Then divide the sequence to 2: (A)(B•C) Then repeat the process for the 2 parts. Stop when you have 1 (or 2) matrices in the sequence. Is this algorithm optimal? It has to be better than N^3 (the usual algorithm)

When does a Chain Familiar’s attack occur using the new UA Eldritch Invocation: Chain Master’s Fury?

  1. The familiar attacks immediately using the Warlock’s bonus action.
  2. The familiar attacks immediately, using the familiar’s reaction.
  3. The familiar attacks, on the familiar’s turn, using the familiar’s reaction.

Eldritch Invocation: Chain Master’s Fury Prerequisite: 9th level, Pact of the Chain feature. As a bonus action, you can command your familiar to make one attack.