find reports anything by default
This commit is contained in:
@@ -394,32 +394,34 @@ string BaseLoop::decodeMessage(const string& data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ct_find: {
|
case ct_find: {
|
||||||
bool verbose = false, withRead = true, withWrite = false, withPassive = false, first = true, withData = false;
|
bool verbose = false, withRead = true, withWrite = true, withPassive = true, first = true, onlyWithData = false;
|
||||||
string clazz;
|
string clazz;
|
||||||
while (args.size() > argPos && args[argPos][0] == '-') {
|
while (args.size() > argPos && args[argPos][0] == '-') {
|
||||||
if (args[argPos] == "-v")
|
if (args[argPos] == "-v")
|
||||||
verbose = true;
|
verbose = true;
|
||||||
else if (args[argPos] == "-r") {
|
else if (args[argPos] == "-r") {
|
||||||
if (first == true)
|
if (first == true) {
|
||||||
first = false;
|
first = false;
|
||||||
|
withWrite = withPassive = false;
|
||||||
|
}
|
||||||
withRead = true;
|
withRead = true;
|
||||||
}
|
}
|
||||||
else if (args[argPos] == "-w") {
|
else if (args[argPos] == "-w") {
|
||||||
if (first == true) {
|
if (first == true) {
|
||||||
first = false;
|
first = false;
|
||||||
withRead = false;
|
withRead = withPassive = false;
|
||||||
}
|
}
|
||||||
withWrite = true;
|
withWrite = true;
|
||||||
}
|
}
|
||||||
else if (args[argPos] == "-p") {
|
else if (args[argPos] == "-p") {
|
||||||
if (first == true) {
|
if (first == true) {
|
||||||
first = false;
|
first = false;
|
||||||
withRead = false;
|
withRead = withWrite = false;
|
||||||
}
|
}
|
||||||
withPassive = true;
|
withPassive = true;
|
||||||
}
|
}
|
||||||
else if (args[argPos] == "-d") {
|
else if (args[argPos] == "-d") {
|
||||||
withData = true;
|
onlyWithData = true;
|
||||||
}
|
}
|
||||||
else if (args[argPos] == "-c") {
|
else if (args[argPos] == "-c") {
|
||||||
argPos++;
|
argPos++;
|
||||||
@@ -454,7 +456,7 @@ string BaseLoop::decodeMessage(const string& data)
|
|||||||
if (dstAddress == SYN)
|
if (dstAddress == SYN)
|
||||||
continue;
|
continue;
|
||||||
time_t lastup = message->getLastUpdateTime();
|
time_t lastup = message->getLastUpdateTime();
|
||||||
if (withData == true && lastup == 0)
|
if (onlyWithData == true && lastup == 0)
|
||||||
continue;
|
continue;
|
||||||
if (found == true)
|
if (found == true)
|
||||||
result << endl;
|
result << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user