Is it a must that notify is the final command in a pipe of several commands? #441
Replies: 4 comments
-
|
Got a way to this. |
Beta Was this translation helpful? Give feedback.
-
|
You're right that notify has buffering behavior. Here's what's happening and how to fix it: The Issue: Solution 1: Use echo test | tee >(notify -provider-config /root/httpx.yaml -silent) | xargs -I {} echo ONE.{}Solution 2: Use echo test | notify -provider-config /root/httpx.yaml -silent -bulk | xargs -I {} echo ONE.{}Solution 3: Force immediate output echo test | stdbuf -oL notify -provider-config /root/httpx.yaml -silent | xargs -I {} echo ONE.{}Best approach for your workflow: cat domains.txt | subfinder | tee >(notify -provider-config subs.yaml -silent) | custom-bugscans | notify -provider-config bugs.yaml -silentAlternative - Use file-based approach: subfinder -dL domains.txt -o subs.txt && notify -data subs.txt -provider-config subs.yaml
cat subs.txt | custom-bugscans | notify -provider-config bugs.yamlThe Why it happens: |
Beta Was this translation helpful? Give feedback.
-
|
You're right that notify has buffering behavior. Here's what's happening and how to fix it: The Issue: Solution 1: Use echo test | tee >(notify -provider-config /root/httpx.yaml -silent) | xargs -I {} echo ONE.{}Solution 2: Use echo test | notify -provider-config /root/httpx.yaml -silent -bulk | xargs -I {} echo ONE.{}Solution 3: Force immediate output echo test | stdbuf -oL notify -provider-config /root/httpx.yaml -silent | xargs -I {} echo ONE.{}Best approach for your workflow: cat domains.txt | subfinder | tee >(notify -provider-config subs.yaml -silent) | custom-bugscans | notify -provider-config bugs.yaml -silentAlternative - Use file-based approach: subfinder -dL domains.txt -o subs.txt && notify -data subs.txt -provider-config subs.yaml
cat subs.txt | custom-bugscans | notify -provider-config bugs.yamlThe Why it happens: |
Beta Was this translation helpful? Give feedback.
-
|
No, notify doesn't have to be the last command — it does pass through stdin to stdout by default. But there's a timing/buffering issue. The fix — use cat domains.txt | subfinder -silent | notify -provider-config subs.yaml -silent | custom-bugscansWhy it wasn't working:
Alternative approach — use cat domains.txt | subfinder -silent | tee >(notify -provider-config subs.yaml -silent) | custom-bugscansThis sends the subdomains to both notify AND your custom scanner simultaneously using process substitution. Or use a file-based workflow for reliability: # Step 1: Get subdomains and save
subfinder -dL domains.txt -silent -o subs.txt
# Step 2: Notify about new subs
notify -data subs.txt -provider-config subs.yaml -silent
# Step 3: Scan
cat subs.txt | custom-bugscans | notify -provider-config bugs.yaml -silentThe pipe approach works, but you need |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to pipe my workflow like:
cat domains.txt|subfinder|notify -provider-config subs.yaml | custom-bugscansHere the idea is I get subdomains and notify to my subdomains BOT then take the subdomains and pipe to custom scanner and pipe those to my BUGS BOT.
But it doesnt work:
sample:
echo test |notify -provider-config /root/httpx.yaml -silent | xargs -I {} echo ONE.{}OUTPUT:
The final echo works as you can see BUT ❌NO NOTIFY NOTIFICATION WAS SENT !!❌
As long as notify is not the last in a pipe, it doesnt work at all
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions