Detect network traffic and execute command [on hold]

using kind of a dial-up connection, I was wondering if there is any option using Linux (Raspberry Pi as router) to detect incoming traffic on interface wlan0 (and maybe a specific device) so that a command can be executed:

I have two network interfaces on my Pi. One is used for the local WiFi network to be accessed by all my devices, while the traffic is routed to the second interface to the external gateway. That works fine. The issue is that it requires a login from time to time, which is an issue for Alexa devices and bothers me in general. Therefore, I need to execute a script, when a client (of wlan0) wants to use the internet. Any suggestions?

What happens if you use detect thoughts on a person while they are sleeping?

I recently asked this question about how to scan someone’s memories while sleeping. The consensus of the answers was that the best way to do this was to not have them be asleep but instead wake them up, interrogate them, and wipe their memory.

This leads me to the question of what happens if someone casts detect thoughts on a sleeping creature. The spell description states (emphasis mine):

[…] You initially learn the surface thoughts of the creature – what is most on its mind in that moment. As an action, you can either shift your attention to another creature’s thoughts or attempt to probe deeper into the same creature’s mind. If you probe deeper, the target must make a Wisdom saving throw. If it fails, you gain Insight into its reasoning (if any), its emotional state, and something that looms large in its mind (such as something it worries over, loves, or hates). […] [T]he target knows that you are probing into its mind[…]

For the “surface thoughts”, I would imagine that this is related to whatever dream the target is having, or no surface thoughts if in deep sleep. If probing deeper, does the sleeping target still get to make the Wisdom saving throw, and do they wake up on either success or failure?

Do I need to hold an actual copper piece in order to cast Detect Thoughts?

The “Detect Thoughts” spell has as its material component “a copper piece”. (Yet another in the long list of punny material components.) The rules for material components say,

Casting some spells requires particular objects, specified in parentheses in the component entry. A character can use a component pouch or a spellcasting focus (found in “Equipment”) in place of the components specified for a spell. But if a cost is indicated for a component, a character must have that specific component before he or she can cast the spell.

Does requiring “a copper piece” mean that a “cost is indicated” and so it requires one to actually be holding a coin, rather than just using a spellcasting focus or component pouch? Usually a cost being indicated is worded like “something worth at least 25 gp”, so since this isn’t phrased as “a copper piece worth 1 cp” or even “a one-cp coin” I’m not sure that it means that a “cost is indicated”. It seems to more just be describing a random object associated with the spell like other “normal” spell material components. But then again, I can see a good argument that a coin used for currency would be the most straightforward way of indicating a cost that there is.

Obviously in general adventurers won’t usually have a lot of trouble finding a copper piece during their travels, but I could imagine some circumstances where it would be inconvenient for a spellcaster to need to dig a coin out of their pouch while their spellcasting focus is already in hand.

GRUB Doesn’t detect windows: Disk is MBR but booting via UEFI

I dun goofed. I thought my Windows was booting using UEFI, and I installed Ubuntu using UEFI. But now I think my Windows was booting using MBR, and GRUB can’t detect it.

I’m confident the disk is MBR:

> sudo gdisk -l /dev/sdb GPT fdisk (gdisk) version 1.0.3  Partition table scan:   MBR: MBR only   BSD: not present   APM: not present   GPT: not present 

and that I’m booting via UEFI:

> ls /sys/firmware/efi/ config_table  fw_platform_size  runtime      systab efivars       fw_vendor         runtime-map  vars 

How can I fix my GRUB so that it boots using MBR instead of UEFI?

I’ve tried:

  • Running os-prober and update-grub
  • Running boot-repair

Neither gave me a GRUB menu with Windows listed.

Does WRT invariant detect hyperelliptic involution on the genus 2 surface?

The Witten-Reshetikhin-Turaev invariant cannot detect the hyperelliptic involution on the genus 1 surface, and that if $ M_U$ is the mapping torus for a mapping class group element $ U\in \mathrm{Mod}(\Sigma_1)$ , then $ $ Z(M_U) = Z(M_{-U})$ $ where $ -I\in \mathrm{Mod}(\Sigma_1)$ is the hyperelliptic involution.

What about the genus 2 case? If $ -I\in \mathrm{Mod}(\Sigma_2)$ is the hyperelliptic involution on the genus 2 surface, then is there any $ U\in \mathrm{Mod}(\Sigma_2)$ , for which the following does not hold? $ $ Z(M_U) \stackrel{?}{=} Z(M_{-U})$ $

HTML form – detect when user taps down arrow next input button using JavaScript?

I am trying to create a custom HTML form. Is there a way in iOS using JavaScript to detect when the user taps the “down arrow” icon button to move to the next input?

I’ve attached a screenshot of the button I’m referring to. It doesn’t trigger a keydown event.

Screenshot of iOS down arrow button

Web Application Firewall with based on an external decision to detect anomaly

I have a theoretical knowledge about WAF but I do not have knowledge of the tools in the market. I wonder if there are any WAFs that base their decision making through a response from an external resource (true or false) when sorting an anomalous traffic.

My idea was to create a Machine Learning based for for example to make this decision and the WAF would just consult it.


Add SCNNode or UIView to the center of SCNView in order to detect other SCNNodes

I am trying to center a UIView to the center of my SCNView in Order to detect the other added SCNTorus nodes in my scene.

I tried two ways :

1 –

    func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {          DispatchQueue.main.async { [weak self] in              guard let strongSelf = self else { return }              if !strongSelf.inEditMode { return }              for node in strongSelf.selectionRingsNodes {                  let projectedPoint = renderer.projectPoint(node.position)                 let projectedCGPoint = CGPoint(x: CGFloat(projectedPoint.x), y: CGFloat(projectedPoint.y))                  let distance = projectedCGPoint.distance(to: strongSelf.focusPoint)                   if distance < 20 {                     print(                 }              }         }     } 

2 –

    func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {          DispatchQueue.main.async { [weak self] in              guard let strongSelf = self else { return }              if !strongSelf.inEditMode { return }              for node in strongSelf.selectionRingsNodes {                  let (min, max) = node.boundingBox                 let projectedMinPoint = renderer.projectPoint(min)                 let projectedMinCGPoint = CGPoint(x: CGFloat(projectedMinPoint.x), y: CGFloat(projectedMinPoint.y))                  let projectedMaxPoint = renderer.projectPoint(max)                 let projectedMaxCGPoint = CGPoint(x: CGFloat(projectedMaxPoint.x), y: CGFloat(projectedMaxPoint.y))                  let minX = CGFloat(projectedMinCGPoint.x)                 let maxX = CGFloat(projectedMaxCGPoint.x)                 let minY = CGFloat(projectedMinCGPoint.y)                 let maxY = CGFloat(projectedMaxCGPoint.y)                  let nodeRect = CGRect(x: minX, y: minY, width: maxX - minX, height: maxY - minY)                  if nodeRect.contains(strongSelf.focusPoint) {                     print(                 }             }         }     } 

These two methods return the wrong results, a very big distance, and very big x and y.

Can a non-magical “Detect Magic” trait sense magic when used within an Antimagic Field

If you have a non-magical “Sense Magic” ability, e.g. the Chuul’s, but you are inside an antimagic field, can you detect magic (from a source that is outside the field)? The ability states:

The chuul senses magic within 120 feet of it at will. This trait otherwise works like the detect magic spell but isn’t itself magical.

So that means that this trait would not be nullified by an antimagic field.

Detect magic itself has 2 parts, first “sensing the magic”, and secondly seeing it’s aura:

For the Duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any.

The spell can penetrate most barriers, but is blocked by 1 foot of stone, 1 inch of Common metal, a thin sheet of lead, or 3 feet of wood or dirt.

Now, Antimagic Field (the spell) states that:

This area is divorced from the magical energy that suffuses the multiverse. Within the Sphere, Spells can’t be cast, summoned creatures disappear, and even Magic Items become mundane.

Spells and other magical effects, except those created by an artifact or a deity, are suppressed in the Sphere and can’t protrude into it.

So would the magical auras, which Detect Magic allows you to see, even be able to reach you while you are within the field? I couldn’t really find a RAW or RAI definition of whether these auras count as a “magical effect”, or if they are, essentially, just a non-magical energy emission that you can’t normally see, and detect magic simply expands you visual range to encompass it.

And the first part, that of sensing the magic in the first place, is left completely up to our imagination, but there most likely must again be some kind of emanation that has to reach your player, so the same question arises.