Changeset 451
- Timestamp:
- 03/30/06 01:55:02 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/modules/shellcode-signatures/y.tab.c
r449 r451 146 146 #include <memory.h> 147 147 #include <errno.h> 148 148 149 #include "config.h" 149 150 #include "parser.h" 151 150 152 151 153 inline void string_reset(); … … 190 192 191 193 /* Line 213 of yacc.c. */ 192 #line 19 3"y.tab.c"194 #line 195 "y.tab.c" 193 195 194 196 #if ! defined (yyoverflow) || YYERROR_VERBOSE … … 376 378 static const unsigned char yyrline[] = 377 379 { 378 0, 4 5, 45, 47, 51, 76, 84, 89, 94, 99,379 10 4, 109, 114, 119, 124, 129, 134, 139, 145, 147,380 15 1, 155, 156, 157, 161, 168, 172, 175, 177, 181,381 18 5, 189, 193, 197, 201, 205, 209, 213, 217, 221,382 22 5, 229, 233, 241, 249, 251380 0, 47, 47, 49, 53, 78, 86, 91, 96, 101, 381 106, 111, 116, 121, 126, 131, 136, 141, 147, 149, 382 153, 157, 158, 159, 163, 170, 174, 177, 179, 183, 383 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 384 227, 231, 235, 243, 251, 253 383 385 }; 384 386 #endif … … 1153 1155 { 1154 1156 case 4: 1155 #line 5 2"parser.y"1157 #line 54 "parser.y" 1156 1158 { 1157 1159 int i; … … 1178 1180 1179 1181 case 5: 1180 #line 7 7"parser.y"1182 #line 79 "parser.y" 1181 1183 { 1182 1184 shellcodes->name = strndup(string_get_buffer(), string_get_len()); … … 1186 1188 1187 1189 case 6: 1188 #line 8 5"parser.y"1190 #line 87 "parser.y" 1189 1191 { 1190 1192 shellcodes->nspace = sc_xor; … … 1193 1195 1194 1196 case 7: 1195 #line 9 0"parser.y"1197 #line 92 "parser.y" 1196 1198 { 1197 1199 shellcodes->nspace = sc_linkxor; … … 1200 1202 1201 1203 case 8: 1202 #line 9 5"parser.y"1204 #line 97 "parser.y" 1203 1205 { 1204 1206 shellcodes->nspace = sc_konstanzxor; … … 1207 1209 1208 1210 case 9: 1209 #line 10 0"parser.y"1211 #line 102 "parser.y" 1210 1212 { 1211 1213 shellcodes->nspace = sc_leimbachxor; … … 1214 1216 1215 1217 case 10: 1216 #line 10 5"parser.y"1218 #line 107 "parser.y" 1217 1219 { 1218 1220 shellcodes->nspace = sc_bindshell; … … 1221 1223 1222 1224 case 11: 1223 #line 11 0"parser.y"1225 #line 112 "parser.y" 1224 1226 { 1225 1227 shellcodes->nspace = sc_connectbackshell; … … 1228 1230 1229 1231 case 12: 1230 #line 11 5"parser.y"1232 #line 117 "parser.y" 1231 1233 { 1232 1234 shellcodes->nspace = sc_connectbackfiletransfer; … … 1235 1237 1236 1238 case 13: 1237 #line 12 0"parser.y"1239 #line 122 "parser.y" 1238 1240 { 1239 1241 shellcodes->nspace = sc_execute; … … 1242 1244 1243 1245 case 14: 1244 #line 12 5"parser.y"1246 #line 127 "parser.y" 1245 1247 { 1246 1248 shellcodes->nspace = sc_download; … … 1249 1251 1250 1252 case 15: 1251 #line 13 0"parser.y"1253 #line 132 "parser.y" 1252 1254 { 1253 1255 shellcodes->nspace = sc_url; … … 1256 1258 1257 1259 case 16: 1258 #line 13 5"parser.y"1260 #line 137 "parser.y" 1259 1261 { 1260 1262 shellcodes->nspace = sc_bindfiletransfer; … … 1263 1265 1264 1266 case 17: 1265 #line 14 0"parser.y"1267 #line 142 "parser.y" 1266 1268 { 1267 1269 shellcodes->nspace = sc_base64; … … 1270 1272 1271 1273 case 24: 1272 #line 16 2"parser.y"1274 #line 164 "parser.y" 1273 1275 { 1274 1276 printf("flags none...\n"); … … 1277 1279 1278 1280 case 29: 1279 #line 18 2"parser.y"1281 #line 184 "parser.y" 1280 1282 { 1281 1283 shellcodes->map[shellcodes->map_items++] = sc_key; … … 1284 1286 1285 1287 case 30: 1286 #line 18 6"parser.y"1288 #line 188 "parser.y" 1287 1289 { 1288 1290 shellcodes->map[shellcodes->map_items++] = sc_subkey; … … 1291 1293 1292 1294 case 31: 1293 #line 19 0"parser.y"1295 #line 192 "parser.y" 1294 1296 { 1295 1297 shellcodes->map[shellcodes->map_items++] = sc_size; … … 1298 1300 1299 1301 case 32: 1300 #line 19 4"parser.y"1302 #line 196 "parser.y" 1301 1303 { 1302 1304 shellcodes->map[shellcodes->map_items++] = sc_sizeinvert; … … 1305 1307 1306 1308 case 33: 1307 #line 198"parser.y"1309 #line 200 "parser.y" 1308 1310 { 1309 1311 shellcodes->map[shellcodes->map_items++] = sc_port; … … 1312 1314 1313 1315 case 34: 1314 #line 20 2"parser.y"1316 #line 204 "parser.y" 1315 1317 { 1316 1318 shellcodes->map[shellcodes->map_items++] = sc_host; … … 1319 1321 1320 1322 case 35: 1321 #line 20 6"parser.y"1323 #line 208 "parser.y" 1322 1324 { 1323 1325 shellcodes->map[shellcodes->map_items++] = sc_command; … … 1326 1328 1327 1329 case 36: 1328 #line 21 0"parser.y"1330 #line 212 "parser.y" 1329 1331 { 1330 1332 shellcodes->map[shellcodes->map_items++] = sc_uri; … … 1333 1335 1334 1336 case 37: 1335 #line 21 4"parser.y"1337 #line 216 "parser.y" 1336 1338 { 1337 1339 shellcodes->map[shellcodes->map_items++] = sc_pcre; … … 1340 1342 1341 1343 case 38: 1342 #line 2 18"parser.y"1344 #line 220 "parser.y" 1343 1345 { 1344 1346 shellcodes->map[shellcodes->map_items++] = sc_pre; … … 1347 1349 1348 1350 case 39: 1349 #line 22 2"parser.y"1351 #line 224 "parser.y" 1350 1352 { 1351 1353 shellcodes->map[shellcodes->map_items++] = sc_post; … … 1354 1356 1355 1357 case 40: 1356 #line 22 6"parser.y"1358 #line 228 "parser.y" 1357 1359 { 1358 1360 shellcodes->map[shellcodes->map_items++] = sc_none; … … 1361 1363 1362 1364 case 41: 1363 #line 23 0"parser.y"1365 #line 232 "parser.y" 1364 1366 { 1365 1367 shellcodes->map[shellcodes->map_items++] = sc_hostkey; … … 1368 1370 1369 1371 case 42: 1370 #line 23 4"parser.y"1372 #line 236 "parser.y" 1371 1373 { 1372 1374 shellcodes->map[shellcodes->map_items++] = sc_portkey; … … 1375 1377 1376 1378 case 43: 1377 #line 24 2"parser.y"1379 #line 244 "parser.y" 1378 1380 { 1379 1381 shellcodes->pattern = strndup(string_get_buffer(), string_get_len()); … … 1387 1389 1388 1390 /* Line 1037 of yacc.c. */ 1389 #line 139 0"y.tab.c"1391 #line 1392 "y.tab.c" 1390 1392 1391 1393 yyvsp -= yylen; … … 1615 1617 1616 1618 1617 #line 25 4"parser.y"1619 #line 256 "parser.y" 1618 1620 1619 1621 1620 1622 #ifndef HAVE_STRNDUP 1621 // from http://www.unixpapa.com/incnote/string.html 1622 char *strndup(const char *str, size_t len) 1623 { 1624 char *dup= (char *)malloc( len+1 ); 1625 if (dup) { 1626 strncpy(dup,str,len); 1627 dup[len]= '\0'; 1628 } 1629 return dup; 1630 } 1623 // from http://www.unixpapa.com/incnote/string.html 1624 char *strndup(const char *str, size_t len) 1625 { 1626 char *dup= (char *)malloc( len+1 ); 1627 if ( dup ) 1628 { 1629 strncpy(dup,str,len); 1630 dup[len]= '\0'; 1631 } 1632 return dup; 1633 } 1631 1634 #endif /* HAVE_STRNDUP */ 1632 1635
