Changeset 467
- Timestamp:
- 04/03/06 22:55:06 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/modules/shellcode-signatures/y.tab.c
r462 r467 1 /* A Bison parser, made by GNU Bison 1.875d. */1 /* A Bison parser, made by GNU Bison 2.0. */ 2 2 3 3 /* Skeleton parser for Yacc-like parsing with Bison, … … 197 197 198 198 199 /* Line 21 4of yacc.c. */199 /* Line 213 of yacc.c. */ 200 200 #line 201 "y.tab.c" 201 201 … … 213 213 # ifdef YYSTACK_USE_ALLOCA 214 214 # if YYSTACK_USE_ALLOCA 215 # define YYSTACK_ALLOC alloca216 # endif217 # else218 # if defined (alloca) || defined (_ALLOCA_H)219 # define YYSTACK_ALLOC alloca220 # else221 215 # ifdef __GNUC__ 222 216 # define YYSTACK_ALLOC __builtin_alloca 217 # else 218 # define YYSTACK_ALLOC alloca 223 219 # endif 224 220 # endif … … 388 384 static const unsigned short int yyrline[] = 389 385 { 390 0, 53, 53, 55, 59, 8 3, 92, 97, 102, 107,391 11 2, 117, 122, 127, 132, 137, 142, 147, 153, 155,392 1 59, 163, 164, 165, 169, 176, 180, 183, 185, 193,393 19 7, 201, 205, 209, 213, 217, 221, 225, 229, 233,394 23 7, 241, 245, 252, 260, 262386 0, 53, 53, 55, 59, 84, 93, 98, 103, 108, 387 113, 118, 123, 128, 133, 138, 143, 148, 154, 156, 388 160, 164, 165, 166, 170, 177, 181, 184, 186, 194, 389 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 390 238, 242, 246, 253, 261, 263 395 391 }; 396 392 #endif … … 578 574 while (0) 579 575 576 580 577 #define YYTERROR 1 581 578 #define YYERRCODE 256 582 579 583 /* YYLLOC_DEFAULT -- Compute the default location (before the actions 584 are run). */ 585 580 581 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 582 If N is 0, then set CURRENT to the empty location which ends 583 the previous symbol: RHS[0] (always defined). */ 584 585 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 586 586 #ifndef YYLLOC_DEFAULT 587 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 588 ((Current).first_line = (Rhs)[1].first_line, \ 589 (Current).first_column = (Rhs)[1].first_column, \ 590 (Current).last_line = (Rhs)[N].last_line, \ 591 (Current).last_column = (Rhs)[N].last_column) 592 #endif 587 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 588 do \ 589 if (N) \ 590 { \ 591 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 592 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 593 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 594 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 595 } \ 596 else \ 597 { \ 598 (Current).first_line = (Current).last_line = \ 599 YYRHSLOC (Rhs, 0).last_line; \ 600 (Current).first_column = (Current).last_column = \ 601 YYRHSLOC (Rhs, 0).last_column; \ 602 } \ 603 while (0) 604 #endif 605 606 607 /* YY_LOCATION_PRINT -- Print the location on the stream. 608 This macro was not mandated originally: define only if we know 609 we won't break user code: when these are the locations we know. */ 610 611 #ifndef YY_LOCATION_PRINT 612 # if YYLTYPE_IS_TRIVIAL 613 # define YY_LOCATION_PRINT(File, Loc) \ 614 fprintf (File, "%d.%d-%d.%d", \ 615 (Loc).first_line, (Loc).first_column, \ 616 (Loc).last_line, (Loc).last_column) 617 # else 618 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 619 # endif 620 #endif 621 593 622 594 623 /* YYLEX -- calling `yylex' with the right arguments. */ … … 614 643 } while (0) 615 644 616 # define YYDSYMPRINT(Args) \ 617 do { \ 618 if (yydebug) \ 619 yysymprint Args; \ 620 } while (0) 621 622 # define YYDSYMPRINTF(Title, Token, Value, Location) \ 645 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 623 646 do { \ 624 647 if (yydebug) \ … … 626 649 YYFPRINTF (stderr, "%s ", Title); \ 627 650 yysymprint (stderr, \ 628 T oken, Value); \651 Type, Value); \ 629 652 YYFPRINTF (stderr, "\n"); \ 630 653 } \ … … 693 716 #else /* !YYDEBUG */ 694 717 # define YYDPRINTF(Args) 695 # define YYDSYMPRINT(Args) 696 # define YYDSYMPRINTF(Title, Token, Value, Location) 718 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 697 719 # define YY_STACK_PRINT(Bottom, Top) 698 720 # define YY_REDUCE_PRINT(Rule) … … 711 733 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 712 734 evaluated with infinite-precision integer arithmetic. */ 713 714 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0715 # undef YYMAXDEPTH716 #endif717 735 718 736 #ifndef YYMAXDEPTH … … 797 815 798 816 if (yytype < YYNTOKENS) 799 { 800 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 801 # ifdef YYPRINT 802 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 803 # endif 804 } 817 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 805 818 else 806 819 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 807 820 821 822 # ifdef YYPRINT 823 if (yytype < YYNTOKENS) 824 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 825 # endif 808 826 switch (yytype) 809 827 { … … 821 839 #if defined (__STDC__) || defined (__cplusplus) 822 840 static void 823 yydestruct ( int yytype, YYSTYPE *yyvaluep)841 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 824 842 #else 825 843 static void 826 yydestruct (yytype, yyvaluep) 844 yydestruct (yymsg, yytype, yyvaluep) 845 const char *yymsg; 827 846 int yytype; 828 847 YYSTYPE *yyvaluep; … … 831 850 /* Pacify ``unused variable'' warnings. */ 832 851 (void) yyvaluep; 852 853 if (!yymsg) 854 yymsg = "Deleting"; 855 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 833 856 834 857 switch (yytype) … … 859 882 860 883 861 /* The look ahead symbol. */884 /* The look-ahead symbol. */ 862 885 int yychar; 863 886 864 /* The semantic value of the look ahead symbol. */887 /* The semantic value of the look-ahead symbol. */ 865 888 YYSTYPE yylval; 866 889 … … 898 921 /* Number of tokens to shift before error messages enabled. */ 899 922 int yyerrstatus; 900 /* Look ahead token as an internal (translated) token number. */923 /* Look-ahead token as an internal (translated) token number. */ 901 924 int yytoken = 0; 902 925 … … 949 972 yyvsp = yyvs; 950 973 974 975 yyvsp[0] = yylval; 951 976 952 977 goto yysetstate; … … 1039 1064 1040 1065 /* Do appropriate processing given the current state. */ 1041 /* Read a look ahead token if we need one and don't already have one. */1066 /* Read a look-ahead token if we need one and don't already have one. */ 1042 1067 /* yyresume: */ 1043 1068 1044 /* First try to decide what to do without reference to look ahead token. */1069 /* First try to decide what to do without reference to look-ahead token. */ 1045 1070 1046 1071 yyn = yypact[yystate]; … … 1048 1073 goto yydefault; 1049 1074 1050 /* Not known => get a look ahead token if don't already have one. */1051 1052 /* YYCHAR is either YYEMPTY or YYEOF or a valid look ahead symbol. */1075 /* Not known => get a look-ahead token if don't already have one. */ 1076 1077 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1053 1078 if (yychar == YYEMPTY) 1054 1079 { … … 1065 1090 { 1066 1091 yytoken = YYTRANSLATE (yychar); 1067 YY DSYMPRINTF("Next token is", yytoken, &yylval, &yylloc);1092 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1068 1093 } 1069 1094 … … 1085 1110 YYACCEPT; 1086 1111 1087 /* Shift the look ahead token. */1088 YY DPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));1112 /* Shift the look-ahead token. */ 1113 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1089 1114 1090 1115 /* Discard the token being shifted unless it is eof. */ … … 1147 1172 printf("\tmap "); 1148 1173 1174 int i; 1149 1175 for( i = 0; i < shellcodes->map_items; i++ ) 1150 1176 { … … 1160 1186 1161 1187 case 5: 1162 #line 8 4"parser.y"1163 { 1164 shellcodes->nspace = yyvsp[-3];1188 #line 85 "parser.y" 1189 { 1190 shellcodes->nspace = (yyvsp[-3]); 1165 1191 shellcodes->name = strndup(string_get_buffer(), string_get_len()); 1166 1192 string_reset(); … … 1169 1195 1170 1196 case 6: 1171 #line 9 3"parser.y"1172 { 1173 yyval= sc_xor;1197 #line 94 "parser.y" 1198 { 1199 (yyval) = sc_xor; 1174 1200 } 1175 1201 break; 1176 1202 1177 1203 case 7: 1178 #line 9 8"parser.y"1179 { 1180 yyval= sc_linkxor;1204 #line 99 "parser.y" 1205 { 1206 (yyval) = sc_linkxor; 1181 1207 } 1182 1208 break; 1183 1209 1184 1210 case 8: 1185 #line 10 3"parser.y"1186 { 1187 yyval= sc_konstanzxor;1211 #line 104 "parser.y" 1212 { 1213 (yyval) = sc_konstanzxor; 1188 1214 } 1189 1215 break; 1190 1216 1191 1217 case 9: 1192 #line 10 8"parser.y"1193 { 1194 yyval= sc_leimbachxor;1218 #line 109 "parser.y" 1219 { 1220 (yyval) = sc_leimbachxor; 1195 1221 } 1196 1222 break; 1197 1223 1198 1224 case 10: 1199 #line 11 3"parser.y"1200 { 1201 yyval= sc_bindshell;1225 #line 114 "parser.y" 1226 { 1227 (yyval) = sc_bindshell; 1202 1228 } 1203 1229 break; 1204 1230 1205 1231 case 11: 1206 #line 11 8"parser.y"1207 { 1208 yyval= sc_connectbackshell;1232 #line 119 "parser.y" 1233 { 1234 (yyval) = sc_connectbackshell; 1209 1235 } 1210 1236 break; 1211 1237 1212 1238 case 12: 1213 #line 12 3"parser.y"1214 { 1215 yyval= sc_connectbackfiletransfer;1239 #line 124 "parser.y" 1240 { 1241 (yyval) = sc_connectbackfiletransfer; 1216 1242 } 1217 1243 break; 1218 1244 1219 1245 case 13: 1220 #line 12 8"parser.y"1221 { 1222 yyval= sc_execute;1246 #line 129 "parser.y" 1247 { 1248 (yyval) = sc_execute; 1223 1249 } 1224 1250 break; 1225 1251 1226 1252 case 14: 1227 #line 13 3"parser.y"1228 { 1229 yyval= sc_download;1253 #line 134 "parser.y" 1254 { 1255 (yyval) = sc_download; 1230 1256 } 1231 1257 break; 1232 1258 1233 1259 case 15: 1234 #line 13 8"parser.y"1235 { 1236 yyval= sc_url;1260 #line 139 "parser.y" 1261 { 1262 (yyval) = sc_url; 1237 1263 } 1238 1264 break; 1239 1265 1240 1266 case 16: 1241 #line 14 3"parser.y"1242 { 1243 yyval= sc_bindfiletransfer;1267 #line 144 "parser.y" 1268 { 1269 (yyval) = sc_bindfiletransfer; 1244 1270 } 1245 1271 break; 1246 1272 1247 1273 case 17: 1248 #line 14 8"parser.y"1249 { 1250 yyval= sc_base64;1274 #line 149 "parser.y" 1275 { 1276 (yyval) = sc_base64; 1251 1277 } 1252 1278 break; 1253 1279 1254 1280 case 24: 1255 #line 17 0"parser.y"1281 #line 171 "parser.y" 1256 1282 { 1257 1283 printf("flags none...\n"); … … 1260 1286 1261 1287 case 28: 1262 #line 18 6"parser.y"1288 #line 187 "parser.y" 1263 1289 { 1264 1290 if( shellcodes->map_items < (MAP_MAX - 1) ) 1265 shellcodes->map[shellcodes->map_items++] = yyvsp[-2];1291 shellcodes->map[shellcodes->map_items++] = (yyvsp[-1]); 1266 1292 } 1267 1293 break; 1268 1294 1269 1295 case 29: 1270 #line 19 4"parser.y"1271 { 1272 yyval= sc_key;1296 #line 195 "parser.y" 1297 { 1298 (yyval) = sc_key; 1273 1299 } 1274 1300 break; 1275 1301 1276 1302 case 30: 1277 #line 19 8"parser.y"1278 { 1279 yyval= sc_subkey;1303 #line 199 "parser.y" 1304 { 1305 (yyval) = sc_subkey; 1280 1306 } 1281 1307 break; 1282 1308 1283 1309 case 31: 1284 #line 20 2"parser.y"1285 { 1286 yyval= sc_size;1310 #line 203 "parser.y" 1311 { 1312 (yyval) = sc_size; 1287 1313 } 1288 1314 break; 1289 1315 1290 1316 case 32: 1291 #line 20 6"parser.y"1292 { 1293 yyval= sc_sizeinvert;1317 #line 207 "parser.y" 1318 { 1319 (yyval) = sc_sizeinvert; 1294 1320 } 1295 1321 break; 1296 1322 1297 1323 case 33: 1298 #line 21 0"parser.y"1324 #line 211 "parser.y" 1299 1325 { 1300 yyval= sc_port;1326 (yyval) = sc_port; 1301 1327 } 1302 1328 break; 1303 1329 1304 1330 case 34: 1305 #line 21 4"parser.y"1306 { 1307 yyval= sc_host;1331 #line 215 "parser.y" 1332 { 1333 (yyval) = sc_host; 1308 1334 } 1309 1335 break; 1310 1336 1311 1337 case 35: 1312 #line 21 8"parser.y"1313 { 1314 yyval= sc_command;1338 #line 219 "parser.y" 1339 { 1340 (yyval) = sc_command; 1315 1341 } 1316 1342 break; 1317 1343 1318 1344 case 36: 1319 #line 22 2"parser.y"1320 { 1321 yyval= sc_uri;1345 #line 223 "parser.y" 1346 { 1347 (yyval) = sc_uri; 1322 1348 } 1323 1349 break; 1324 1350 1325 1351 case 37: 1326 #line 22 6"parser.y"1327 { 1328 yyval= sc_pcre;1352 #line 227 "parser.y" 1353 { 1354 (yyval) = sc_pcre; 1329 1355 } 1330 1356 break; 1331 1357 1332 1358 case 38: 1333 #line 23 0"parser.y"1334 { 1335 yyval= sc_pre;1359 #line 231 "parser.y" 1360 { 1361 (yyval) = sc_pre; 1336 1362 } 1337 1363 break; 1338 1364 1339 1365 case 39: 1340 #line 23 4"parser.y"1341 { 1342 yyval= sc_post;1366 #line 235 "parser.y" 1367 { 1368 (yyval) = sc_post; 1343 1369 } 1344 1370 break; 1345 1371 1346 1372 case 40: 1347 #line 23 8"parser.y"1348 { 1349 yyval= sc_none;1373 #line 239 "parser.y" 1374 { 1375 (yyval) = sc_none; 1350 1376 } 1351 1377 break; 1352 1378 1353 1379 case 41: 1354 #line 24 2"parser.y"1355 { 1356 yyval= sc_hostkey;1380 #line 243 "parser.y" 1381 { 1382 (yyval) = sc_hostkey; 1357 1383 } 1358 1384 break; 1359 1385 1360 1386 case 42: 1361 #line 24 6"parser.y"1362 { 1363 yyval= sc_portkey;1387 #line 247 "parser.y" 1388 { 1389 (yyval) = sc_portkey; 1364 1390 } 1365 1391 break; 1366 1392 1367 1393 case 43: 1368 #line 25 3"parser.y"1394 #line 254 "parser.y" 1369 1395 { 1370 1396 shellcodes->pattern = strndup(string_get_buffer(), string_get_len()); … … 1377 1403 } 1378 1404 1379 /* Line 10 10of yacc.c. */1380 #line 1 381"y.tab.c"1405 /* Line 1037 of yacc.c. */ 1406 #line 1407 "y.tab.c" 1381 1407 1382 1408 yyvsp -= yylen; … … 1478 1504 if (yyerrstatus == 3) 1479 1505 { 1480 /* If just tried and failed to reuse look ahead token after an1506 /* If just tried and failed to reuse look-ahead token after an 1481 1507 error, discard it. */ 1482 1508 … … 1488 1514 for (;;) 1489 1515 { 1516 1490 1517 YYPOPSTACK; 1491 1518 if (yyssp == yyss) 1492 1519 YYABORT; 1493 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);1494 yydestruct (yystos[*yyssp], yyvsp);1520 yydestruct ("Error: popping", 1521 yystos[*yyssp], yyvsp); 1495 1522 } 1496 1523 } 1497 1524 else 1498 1525 { 1499 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); 1500 yydestruct (yytoken, &yylval); 1526 yydestruct ("Error: discarding", yytoken, &yylval); 1501 1527 yychar = YYEMPTY; 1502 1503 1528 } 1504 1529 } 1505 1530 1506 /* Else will try to reuse look ahead token after shifting the error1531 /* Else will try to reuse look-ahead token after shifting the error 1507 1532 token. */ 1508 1533 goto yyerrlab1; … … 1521 1546 #endif 1522 1547 1523 yyvsp -= yylen;1548 yyvsp -= yylen; 1524 1549 yyssp -= yylen; 1525 1550 yystate = *yyssp; … … 1551 1576 YYABORT; 1552 1577 1553 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 1554 yydestruct ( yystos[yystate], yyvsp);1578 1579 yydestruct ("Error: popping", yystos[yystate], yyvsp); 1555 1580 YYPOPSTACK; 1556 1581 yystate = *yyssp; … … 1561 1586 YYACCEPT; 1562 1587 1563 YYDPRINTF ((stderr, "Shifting error token, "));1564 1565 1588 *++yyvsp = yylval; 1566 1589 1590 1591 /* Shift the error token. */ 1592 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 1567 1593 1568 1594 yystate = yyn; … … 1581 1607 `-----------------------------------*/ 1582 1608 yyabortlab: 1609 yydestruct ("Error: discarding lookahead", 1610 yytoken, &yylval); 1611 yychar = YYEMPTY; 1583 1612 yyresult = 1; 1584 1613 goto yyreturn; … … 1603 1632 1604 1633 1605 #line 26 5"parser.y"1634 #line 266 "parser.y" 1606 1635 1607 1636 nepenthes/trunk/modules/shellcode-signatures/y.tab.h
r462 r467 1 /* A Bison parser, made by GNU Bison 1.875d. */1 /* A Bison parser, made by GNU Bison 2.0. */ 2 2 3 3 /* Skeleton parser for Yacc-like parsing with Bison,
