- Timestamp:
- 05/22/07 02:20:09 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
tags/REL-0.0.9beta/trunk/tool/renetcolGUI_0_0_7.py
r37 r38 152 152 global firstParseValue, checkUpValues, tpl_def 153 153 res = 1 154 ctrl = 0 155 portS = 0 156 portD = 0 154 157 for i in range (0, len(tpl_def[self.flow[0]])): 155 158 f = tpl_def[self.flow[0]][i][0] … … 158 161 elif ( i==27 or i==28 ): 159 162 pass 163 elif ( f==7 ) and ( checkUpValues[f]==1 ): 164 if (ctrl == 1): 165 res = res & (((self.flow[1][i] >= firstParseValue[f])&(self.flow[1][i] <= firstParseValue[11])) or ((portD >= firstParseValue[f])&(portD <= firstParseValue[11]))) 166 else: 167 ctrl = 1 168 portS = self.flow[1][i] 169 elif ( f==11 ) and ( checkUpValues[f]==1 ): 170 if (ctrl == 1): 171 res = res & (((self.flow[1][i] <= firstParseValue[f])&(self.flow[1][i] >= firstParseValue[7])) or ((portS >= firstParseValue[7])&(portS <= firstParseValue[f]))) 172 else: 173 ctrl = 1 174 portD = self.flow[1][i] 160 175 elif (checkUpValues[f]==1): 161 176 res = res & (self.flow[1][i] == firstParseValue[f]) … … 915 930 if ( entry_text==""): 916 931 checkUpValues[7] = 0 932 checkUpValues[11] = 0 917 933 else: 918 934 port_list = string.split(entry_text) … … 923 939 firstParseValue[11] = int(port_list[1]) 924 940 checkUpValues[7] = 1 941 checkUpValues[11] = 1 925 942 if id == 11: ## tcp flags 926 943 if ( entry_text==""): … … 1139 1156 hbox.pack_start(tbbox, False, True, 5) 1140 1157 create_entry(2, "Required Format : a number less than 99", tbbox, "Time :", 8) 1141 create_entry(11, " Required Format : a range, each number less than 65535 and space as separator: \"6881 6889\"", tbbox, "Port :", 9)1158 create_entry(11, "Port Source or Destination selection, required Format : a range, each number less than 65535 and space as separator: \"6881 6889\"", tbbox, "Port :", 9) 1142 1159 #create_entry(5, "Required Format : a number less than 65535", tbbox, "Dst port :", 10) 1143 1160 create_entry(3, "Required Format : a number less than 255", tbbox, "TCP Flag :", 11)