overwraith Posted June 2, 2014 Share Posted June 2, 2014 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 & Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted June 2, 2014 Share Posted June 2, 2014 Try piping that command to "at now" e.g: echo foobar > /tmp/test | at now Quote Link to comment Share on other sites More sharing options...
overwraith Posted June 2, 2014 Author Share Posted June 2, 2014 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. Quote Link to comment Share on other sites More sharing options...
wifi-stuff Posted June 26, 2014 Share Posted June 26, 2014 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. Quote Link to comment Share on other sites More sharing options...
fringes Posted June 28, 2014 Share Posted June 28, 2014 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.