Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 31, 2012, 04:32 AM   #26
nelly22
Thread Starter
macrumors regular
 
Join Date: Sep 2009
Quote:
Originally Posted by Q-chan View Post
Snort, the de-facto standard network intrusion tool will serve your needs. You can get it from http://www.snort.org but you have to build it from source. The other caveat is the learning curve. As with most high-power tools, it takes some good study time to make it do what you want.
All that unix stuff in Snort looks scary. I have never build anything from source, but it seems to have other features i'm also interested.

Quote:
Originally Posted by Q-chan View Post
Good tool, but the OP needs text (text file ?) output, not X11 screens....
Yes, text file.

Quote:
Originally Posted by ipsychedelic View Post
You're right, I was quick on the response but didn't really bothered to read the whole topic (somebody had suggested Wireshark before anyway).

I think wireshark can be called from the command line, or one can use TShark. But my usage has always been in the GUI.
TShark is one possibility.

Quote:
Originally Posted by pitaya View Post
You might want to pipe it through tee, or just append it to a log file:

Code:
sudo /Users/Nelly/Desktop/test_fs.sh | tee -a urls.log
Code:
sudo /Users/Nelly/Desktop/test_fs.sh >> urls.log
Your code works.

What pros/cons there is between piping thru tee or appending?

I learned alot unix stuff from that long script posted by pitaya, but it creates very long rows which has many folder paths.

I wonder if there is easy way to use Snort or TShark.

Did i understand correctly, there is no text logging in Wireshark?

What is proper way to quit this kind of script (using AppleScript). There is tcpdump, sh and bash running now in Activity Monitor.

Thanks again

Last edited by nelly22; Jan 1, 2013 at 03:40 AM.
nelly22 is offline   0 Reply With Quote
Old Dec 31, 2012, 02:39 PM   #27
pitaya
macrumors member
 
Join Date: Jun 2012
Quote:
Originally Posted by nelly22 View Post
All that unix stuff in Snort looks scary. I have never build anything from source, but it seems to have other features i'm also interested.
It's in macports as well. If you go that route, you'll need to install Xcode. Via the xcode preferences you'll need to install the command line tools. You'll find instructions and a macports installation package at http://www.macports.org. I've not tried homebrew.

Quote:
What pros/cons there is between piping thru tee and or appending?
Nothing major. It's a matter of preference. tee is just one way to watch the output as you write out the log file. This is a simple solution using a loop in a bash script--it may be good enough, and it's easy to modify, but it's neither perfect nor the most performant.

Quote:
I learned alot unix stuff from that long script posted by pitaya, but it creates very long rows which has many folder paths.
You can change/shorten the date format, to start with (e.g., date +"%Y/%m/%d %H:%M"). Aside from that, I'll point you towards a few relevant manual pages:

Code:
man date
man sed
man grep
man re_format
man tcpdump
pitaya is offline   0 Reply With Quote
Old Dec 31, 2012, 09:47 PM   #28
ipsychedelic
macrumors 6502a
 
ipsychedelic's Avatar
 
Join Date: Mar 2012
Location: Cali, Colombia
Quote:
Originally Posted by nelly22 View Post
I wonder if there is easy way to use Snort or TShark.
I never used TShark but seeing as it's the "commandline Wireshark" then I guess it's real easy, plus there is a man page on their site and google is your friend anyway.

Quote:
Originally Posted by nelly22 View Post
Did i understand correctly, there is no text logging in Wireshark?
There is only "Text exporting".
ipsychedelic is offline   0 Reply With Quote
Old Jan 1, 2013, 01:22 PM   #29
nelly22
Thread Starter
macrumors regular
 
Join Date: Sep 2009
What MacPorts GUIs are for Mountain Lion and which is best/easiest?
nelly22 is offline   0 Reply With Quote
Old Jan 1, 2013, 04:42 PM   #30
pitaya
macrumors member
 
Join Date: Jun 2012
Quote:
Originally Posted by nelly22 View Post
What MacPorts GUIs are for Mountain Lion and which is best/easiest?
I've never heard of one. I'd be surprised if one exists!

edit: Googled it for you: http://trac.macports.org/wiki/MacPortsGUI

Last edited by pitaya; Jan 1, 2013 at 04:49 PM.
pitaya is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Embedded URLS and Georiot SaSaSushi Site and Forum Feedback 3 Mar 5, 2014 12:38 PM
Shortened URLs in iOS 7? jason2811 iOS 7 4 Dec 24, 2013 10:57 AM
Email sigs come out as URLs? hakr100 iOS 6 6 Oct 15, 2012 10:32 AM
download locations from different URLs wootalicious Mac OS X 10.7 Lion 4 Sep 5, 2012 12:38 PM
Messages.app URLs? tarryweather OS X 10.8 Mountain Lion 0 Jul 30, 2012 02:28 PM

Forum Jump

All times are GMT -5. The time now is 10:44 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC