Changeset 485
- Timestamp:
- 04/07/06 04:00:42 (3 years ago)
- Files:
-
- library/trunk/library-core/include/Library.hpp (modified) (10 diffs)
- library/trunk/library-core/src/Library.cpp (modified) (47 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
library/trunk/library-core/include/Library.hpp
r484 r485 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 43 43 typedef unsigned char byte; 44 44 45 /* nepenthesspecific log tags */45 /* library specific log tags */ 46 46 #define l_crit 0x00000001 47 47 #define l_warn 0x00000002 … … 75 75 76 76 //#define __PRETTY_FUNCTION__ "FOO 77 #define logWrite(mask, format, ...) g_ Nepenthes->getLogMgr()->logf(mask,format, __VA_ARGS__)77 #define logWrite(mask, format, ...) g_Library->getLogMgr()->logf(mask,format, __VA_ARGS__) 78 78 79 79 #define logSpam(format, ...) logWrite(l_spam | STDTAGS , format, __VA_ARGS__) … … 89 89 90 90 #ifndef DEBUG 91 #define logWrite(mask, format, ...) g_ Nepenthes->getLogMgr()->logf(mask,format, __VA_ARGS__)91 #define logWrite(mask, format, ...) g_Library->getLogMgr()->logf(mask,format, __VA_ARGS__) 92 92 #else 93 #define logWrite(mask, format, ...) printf("%s:%i ",__FILE__,__LINE__); g_ Nepenthes->getLogMgr()->logf(mask,format, __VA_ARGS__)93 #define logWrite(mask, format, ...) printf("%s:%i ",__FILE__,__LINE__); g_Library->getLogMgr()->logf(mask,format, __VA_ARGS__) 94 94 #endif 95 95 … … 100 100 #define logCrit(format, ...) logWrite(l_crit | STDTAGS , format, __VA_ARGS__) 101 101 #define logPF() logSpam("<in %s>\n", __PRETTY_FUNCTION__) 102 102 //#define logPF() 103 103 #endif 104 104 105 namespace nepenthes105 namespace library 106 106 { 107 107 108 108 class Config; 109 class DownloadManager;110 109 class EventManager; 111 class LuaInterface;112 110 class LogManager; 113 111 class ModuleManager; 114 class ShellcodeManager;115 class SubmitManager;116 112 class SocketManager; 117 113 class Utilities; 118 class DialogueFactoryManager;119 114 class DNSManager; 120 115 class Message; 121 116 class GeoLocationManager; 122 class UploadManager;117 class SQLManager; 123 118 124 119 125 120 /** 126 * the Nepenthesmain class (singleton).121 * the Library main class (singleton). 127 122 * 128 * all in all Nepenthesdoes nothing, he got plenty Managers to do something123 * all in all Library does nothing, he got plenty Managers to do something 129 124 * 130 125 */ 131 126 132 class Nepenthes127 class Library 133 128 { 134 129 public: 135 Nepenthes();136 virtual ~ Nepenthes();130 Library(); 131 virtual ~Library(); 137 132 138 133 virtual Config *getConfig(); 139 virtual DownloadManager *getDownloadMgr();140 134 virtual EventManager *getEventMgr(); 141 virtual LuaInterface *getLua();142 135 virtual LogManager *getLogMgr(); 143 136 virtual ModuleManager *getModuleMgr(); 144 virtual ShellcodeManager *getShellcodeMgr();145 virtual SubmitManager *getSubmitMgr();146 137 virtual SocketManager *getSocketMgr(); 138 virtual DNSManager *getDNSMgr(); 147 139 virtual Utilities *getUtilities(); 148 virtual DialogueFactoryManager *getFactoryMgr();149 virtual DNSManager *getDNSMgr();150 140 151 141 #ifdef HAVE_GEOLOCATION 152 142 virtual GeoLocationManager *getGeoMgr(); 153 143 #endif 154 155 virtual UploadManager *getUploadMgr(); 144 virtual SQLManager *getSQLMgr(); 156 145 157 146 virtual bool doLoop(); … … 162 151 private: 163 152 Config *m_Config; 164 DialogueFactoryManager *m_DialogueFactoryManager;165 DownloadManager *m_DownloadManager;166 153 DNSManager *m_DNSManager; 167 154 EventManager *m_EventManager; … … 169 156 GeoLocationManager *m_GeoLocationManager; 170 157 #endif 171 LuaInterface *m_Lua;172 158 LogManager *m_LogManager; 173 159 ModuleManager *m_ModuleManager; 174 ShellcodeManager *m_ShellcodeManager;175 SubmitManager *m_SubmitManager;176 160 SocketManager *m_SocketManager; 177 UploadManager *m_UploadManager;178 161 Utilities *m_Utilities; 162 SQLManager *m_SQLManager; 179 163 180 164 … … 187 171 gid_t m_GID; 188 172 protected: 189 bool fileCheckMain(char *filecheckarg,int32_t argc, int32_t opti, char **argv);190 uint8_t fileCheckPrinter(const char *filename, uint8_t options);191 int32_t fileCheck(const char *filename, Message **Msg);192 173 193 174 bool changeUser(char *user); … … 202 183 } 203 184 204 extern nepenthes::Nepenthes *g_Nepenthes;185 extern library::Library *g_Library; 205 186 206 187 void show_help(bool defaults); library/trunk/library-core/src/Library.cpp
r484 r485 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 50 50 #endif 51 51 52 #include " Nepenthes.hpp"52 #include "Library.hpp" 53 53 #include "SocketManager.hpp" 54 54 #include "EventManager.hpp" 55 #include "DownloadManager.hpp"56 55 #include "LogManager.hpp" 57 56 #include "ConsoleLogger.hpp" … … 59 58 #include "RingFileLogger.hpp" 60 59 #include "ModuleManager.hpp" 61 #include "ShellcodeManager.hpp"62 #include "SubmitManager.hpp"63 60 #include "Config.hpp" 64 61 #include "Utilities.hpp" 65 #include "DialogueFactoryManager.hpp"66 62 #include "DNSManager.hpp" 67 63 #include "GeoLocationManager.hpp" 68 #include "UploadManager.hpp" 69 70 #include "Message.hpp" 64 #include "SQLManager.hpp" 71 65 72 66 … … 76 70 #endif 77 71 78 using namespace nepenthes;72 using namespace library; 79 73 80 74 enum ColorSetting { colorAuto, colorAlways, colorNever }; 81 75 82 Nepenthes *g_Nepenthes;76 Library *g_Library; 83 77 /** 84 78 * the constructor … … 87 81 * inits all managers 88 82 */ 89 Nepenthes::Nepenthes()90 { 91 g_ Nepenthes= this;83 Library::Library() 84 { 85 g_Library = this; 92 86 m_running = true; 93 87 94 88 m_Config = NULL; 95 m_DialogueFactoryManager = NULL;96 89 m_DNSManager = NULL; 97 m_DownloadManager = NULL;98 90 m_EventManager = NULL; 99 91 #ifdef HAVE_GEOLOCATION … … 102 94 m_LogManager = NULL; 103 95 m_ModuleManager = NULL; 104 m_ShellcodeManager = NULL;105 96 m_SocketManager = NULL; 106 m_SubmitManager = NULL;107 97 m_Utilities = NULL; 108 98 … … 112 102 113 103 /** 114 * Nepenthesdestuctor115 */ 116 Nepenthes::~Nepenthes()104 * Library destuctor 105 */ 106 Library::~Library() 117 107 { 118 108 if ( m_SocketManager != NULL ) 119 109 delete m_SocketManager; 120 110 121 if (m_DownloadManager != NULL )122 delete m_DownloadManager;123 124 111 if (m_EventManager != NULL) 125 112 delete m_EventManager; 126 113 127 if (m_SubmitManager != NULL)128 {129 m_SubmitManager->Exit();130 delete m_SubmitManager;131 }132 133 114 if (m_ModuleManager != NULL) 134 115 delete m_ModuleManager; 135 116 136 if (m_ShellcodeManager != NULL)137 delete m_ShellcodeManager;138 139 117 if (m_Utilities != NULL) 140 118 delete m_Utilities; 141 142 if (m_DialogueFactoryManager != NULL)143 delete m_DialogueFactoryManager;144 119 145 120 #ifdef HAVE_GEOLOCATION … … 157 132 158 133 /** 159 * start nepenthes, using command line arguments.134 * start library, using command line arguments. 160 135 * 161 136 * @param argc number of arguments. … … 165 140 */ 166 141 167 int32_t Nepenthes::run(int32_t argc, char **argv)142 int32_t Library::run(int32_t argc, char **argv) 168 143 { 169 144 bool run=true; … … 173 148 174 149 char *filecheckarg =NULL; 175 char *confpath = SYSCONFDIR "/ nepenthes/nepenthes.conf";150 char *confpath = SYSCONFDIR "/library/library.conf"; 176 151 char *basedir; 177 152 char *workingdir = PREFIX; … … 407 382 if ( run == true || filecheck == true) 408 383 { 409 m_DialogueFactoryManager = new DialogueFactoryManager(this);410 411 m_DownloadManager = new DownloadManager(this);412 384 m_EventManager = new EventManager(this); 413 385 … … 416 388 #endif 417 389 418 m_UploadManager = new UploadManager(this);419 // m_Lua = new Lua420 390 m_ModuleManager = new ModuleManager(this); 421 m_ShellcodeManager = new ShellcodeManager(this);422 391 m_SocketManager = new SocketManager(this); 423 m_SubmitManager = new SubmitManager(this);424 392 m_Utilities = new Utilities(); 425 393 m_DNSManager = new DNSManager(this); 394 m_SQLManager = new SQLManager(this); 426 395 } 427 396 } … … 447 416 448 417 m_Config = new Config; 449 logInfo("Trying to load NepenthesConfiguration from %s \n",confpath);418 logInfo("Trying to load Library Configuration from %s \n",confpath); 450 419 try 451 420 { 452 421 m_Config->load(confpath); 453 logInfo("Done loading NepenthesConfiguration from %s \n",confpath);422 logInfo("Done loading Library Configuration from %s \n",confpath); 454 423 } catch ( LoadError e ) 455 424 { … … 476 445 try 477 446 { 478 rlpath = m_Config->getValString(" nepenthes.logmanager.ring_logging_file");447 rlpath = m_Config->getValString("library.logmanager.ring_logging_file"); 479 448 } catch ( ... ) 480 449 { 481 logCrit("%s","Could not find nepenthes.logmanager.ring_logging_file in Config\n");450 logCrit("%s","Could not find library.logmanager.ring_logging_file in Config\n"); 482 451 run = false; 483 452 } … … 499 468 try 500 469 { 501 flpath = m_Config->getValString(" nepenthes.logmanager.file_logging_file");470 flpath = m_Config->getValString("library.logmanager.file_logging_file"); 502 471 } catch ( ... ) 503 472 { 504 logCrit("%s","Could not find nepenthes.logmanager.file_logging_file in Config\n");473 logCrit("%s","Could not find library.logmanager.file_logging_file in Config\n"); 505 474 run = false; 506 475 } … … 552 521 if (run == true ) 553 522 { 554 run = m_DownloadManager->Init(); 555 m_DownloadManager->doList(); 523 m_EventManager->doList(); 556 524 } 557 525 558 526 if (run == true ) 559 527 { 560 run = m_UploadManager->Init(); 561 m_UploadManager->doList(); 562 } 528 run = m_SQLManager->Init(); 529 m_SQLManager->doList(); 530 } 531 563 532 564 533 if (run == true ) 565 534 { 566 m_EventManager->doList();567 }568 569 if (run == true )570 {571 m_ShellcodeManager->doList();572 }573 574 if (run == true )575 {576 535 m_SocketManager->doList(); 577 536 } 578 537 579 if (run == true ) 580 { 581 run = m_SubmitManager->Init(); 582 m_SubmitManager->doList(); 583 } 584 585 if (run == true ) 586 { 587 m_DialogueFactoryManager->doList(); 588 } 589 590 591 if (filecheck == true ) 592 { 593 if (run == true) 594 { 595 run = false; 596 }else 597 { 598 filecheck = false; 599 } 600 } 538 601 539 } 602 540 … … 750 688 } 751 689 752 if (filecheck)753 {754 show_version();755 fileCheckMain(filecheckarg,argc,optind,argv);756 }757 690 if( run == true ) 758 691 { … … 771 704 772 705 /** 773 * the Nepenthesmainloop706 * the Library mainloop 774 707 * 775 708 * @return should never return ;) 776 709 */ 777 bool Nepenthes::doLoop()710 bool Library::doLoop() 778 711 { 779 712 … … 789 722 790 723 791 #define FC_DO_NONOP 0x001 792 #define FC_RM_NONOP 0x002 793 #define FC_RM_KNOWN 0x004 794 795 #define FC_IS_KNOWN 0x008 796 #define FC_IS_NONOP 0x010 797 798 799 bool Nepenthes::fileCheckMain(char *optval, int32_t argc, int32_t opti, char **argv) 800 { 801 if ( opti >= argc ) 802 { 803 return true; 804 } 805 806 807 uint8_t options=0; 808 if (optval != NULL) 809 { 810 if (strstr(optval,"rmnonop") != NULL) 811 { 812 options |= FC_RM_NONOP; 813 } 814 if (strstr(optval,"rmknown") != NULL) 815 { 816 options |= FC_RM_KNOWN; 817 } 818 if (strstr(optval,"dononop") != NULL) 819 { 820 options |= FC_DO_NONOP; 821 } 822 } 823 824 printf ("Checking Files: \n"); 825 for ( ; opti < argc && m_running == true; ) 826 { 827 828 struct stat fileinfo; 829 if ( stat((const char*)argv[opti],&fileinfo) != 0 ) 830 { 831 printf("failed\n"); 832 return -1; 833 } 834 835 if ( S_ISREG(fileinfo.st_mode) ) 836 { 837 838 uint8_t result = fileCheckPrinter(argv[opti],options); 839 840 if ( 841 (options & FC_RM_KNOWN && result & FC_IS_KNOWN) || 842 (options & FC_RM_NONOP && result & FC_IS_NONOP) 843 ) 844 845 { 846 unlink(argv[opti]); 847 } 848 849 }else 850 if ( S_ISDIR(fileinfo.st_mode) ) 851 { 852 DIR *bindir = opendir(argv[opti]); 853 struct dirent *dirnode; 854 string basepath = argv[opti]; 855 856 while ( (dirnode = readdir(bindir)) != NULL && m_running == true ) 857 { 858 859 #if !defined(CYGWIN) && !defined(CYGWIN32) &&!defined(__CYGWIN__) || !defined(__CYGWIN32__) 860 if ( dirnode->d_type == 8 ) 861 #else 862 if (1) 863 #endif 864 { 865 string filepath = basepath + "/" + dirnode->d_name; 866 uint8_t result = fileCheckPrinter(filepath.c_str(),options); 867 868 if ( 869 (options & FC_RM_KNOWN && result & FC_IS_KNOWN) || 870 (options & FC_RM_NONOP && result & FC_IS_NONOP) 871 ) 872 873 { 874 unlink(filepath.c_str()); 875 } 876 } 877 } 878 closedir(bindir); 879 } 880 881 opti++; 882 } 883 return true; 884 } 885 886 uint8_t Nepenthes::fileCheckPrinter(const char *filename, uint8_t options) 887 { 888 uint8_t result=0; 889 890 Message *Msg=NULL; 891 892 printf("\t %s\t",filename); 893 switch ( fileCheck(filename,&Msg) ) 894 { 895 case -1: 896 printf("could not open file"); 897 break; 898 899 case 0: 900 if ( m_ShellcodeManager->fileCheck(&Msg) == SCH_DONE ) 901 { 902 result |= FC_IS_KNOWN; 903 printf("\033[32;1mKNOWN\033[0m"); 904 } else 905 { 906 printf("\033[31;1mFAILED\033[0m"); 907 } 908 delete Msg; 909 break; 910 911 case 1: 912 913 result |= FC_IS_NONOP; 914 915 if ( options & FC_DO_NONOP ) 916 { 917 if ( m_ShellcodeManager->fileCheck(&Msg) == SCH_DONE ) 918 { 919 result |= FC_IS_KNOWN; 920 printf("\033[32;1mKNOWN\033[0m"); 921 } else 922 { 923 printf("\033[31;1mFAILED\033[0m"); 924 } 925 } else 926 { 927 printf("NONOP"); 928 } 929 930 931 delete Msg; 932 break; 933 } 934 printf("\n"); 935 return result; 936 } 937 938 939 /** 940 * 941 * @param filename 942 * @param Msg 943 * 944 * @return -1 cound not open file 945 * 0 cool 946 * 1 no nop slide 947 */ 948 int32_t Nepenthes::fileCheck(const char *filename, Message **Msg) 949 { 950 logPF(); 951 uint32_t filesize=0; 952 unsigned char *buffer=NULL; 953 struct stat fileinfo; 954 int32_t retval = -1; 955 956 if (stat((const char*)filename,&fileinfo) != 0) 957 { 958 return -1; 959 } 960 961 filesize=fileinfo.st_size; 962 printf("%5i\t",filesize); 963 buffer = (unsigned char *)malloc(fileinfo.st_size); 964 965 FILE *f; 966 if ( (f = fopen((const char *)filename,"rb")) == NULL ) 967 { 968 return -1; 969 } else 970 { 971 fread(buffer,1,filesize,f); 972 fclose(f); 973 974 uint32_t i; 975 bool nopslide=false; 976 for ( i=0;i<filesize;i++ ) 977 { 978 if ( buffer[i] == 0x90 ) 979 { 980 nopslide = true; 981 break; 982 } 983 } 984 if ( nopslide ) 985 { 986 *Msg = new Message((char *)buffer, filesize, 0, 0, 0, 0, NULL, NULL); 987 retval = 0; 988 } else 989 { 990 *Msg = new Message((char *)buffer, filesize, 0, 0, 0, 0, NULL, NULL); 991 retval = 1; 992 } 993 } 994 free(buffer); 995 return retval; 996 } 997 998 999 1000 /** 1001 * get nepenthes Config 1002 * 1003 * @return returns pointer to nepenthes Config 1004 */ 1005 Config *Nepenthes::getConfig() 724 725 726 727 /** 728 * get library Config 729 * 730 * @return returns pointer to library Config 731 */ 732 Config *Library::getConfig() 1006 733 { 1007 734 return m_Config; 1008 735 } 1009 736 1010 /**1011 * get DownloadManager1012 *1013 * @return returns pointer to the DownloadManager1014 */1015 DownloadManager *Nepenthes::getDownloadMgr()1016 {1017 return m_DownloadManager;1018 }1019 737 1020 738 /** … … 1023 741 * @return returns EventManager 1024 742 */ 1025 EventManager * Nepenthes::getEventMgr()743 EventManager *Library::getEventMgr() 1026 744 { 1027 745 return m_EventManager; … … 1033 751 * @return returns LogManager 1034 752 */ 1035 LogManager * Nepenthes::getLogMgr()753 LogManager *Library::getLogMgr() 1036 754 { 1037 755 return m_LogManager; 1038 756 } 1039 757 1040 LuaInterface *Nepenthes::getLua()1041 {1042 return m_Lua;1043 }1044 758 1045 759 /** … … 1048 762 * @return returns ModuleManager 1049 763 */ 1050 ModuleManager * Nepenthes::getModuleMgr()764 ModuleManager *Library::getModuleMgr() 1051 765 { 1052 766 return m_ModuleManager; … … 1054 768 1055 769 1056 /**1057 * get ShellcodeManager1058 *1059 * @return returns ShellcodeManager1060 */1061 ShellcodeManager *Nepenthes::getShellcodeMgr()1062 {1063 return m_ShellcodeManager;1064 }1065 770 1066 771 /** … … 1069 774 * @return returns SocketManager 1070 775 */ 1071 SocketManager * Nepenthes::getSocketMgr()776 SocketManager *Library::getSocketMgr() 1072 777 { 1073 778 return m_SocketManager; … … 1075 780 1076 781 1077 /**1078 * get SubmitManager1079 *1080 * @return returns SubmitManager1081 */1082 SubmitManager *Nepenthes::getSubmitMgr()1083 {1084 return m_SubmitManager;1085 }1086 782 1087 783 /** … … 1090 786 * @return returns the Utilities 1091 787 */ 1092 Utilities * Nepenthes::getUtilities()788 Utilities *Library::getUtilities() 1093 789 { 1094 790 return m_Utilities; 1095 791 } 1096 792 1097 /**1098 * get the DialogueFactoryManager1099 *1100 * @return returns the DialogueFactoryManager1101 */1102 DialogueFactoryManager *Nepenthes::getFactoryMgr()1103 {1104 return m_DialogueFactoryManager;1105 }1106 793 1107 794 /** … … 1110 797 * @return returns the DNSManager 1111 798 */ 1112 DNSManager * Nepenthes::getDNSMgr()799 DNSManager *Library::getDNSMgr() 1113 800 { 1114 801 return m_DNSManager; … … 1122 809 * @return returns the GeoLocationManager 1123 810 */ 1124 GeoLocationManager * Nepenthes::getGeoMgr()811 GeoLocationManager *Library::getGeoMgr() 1125 812 { 1126 813 return m_GeoLocationManager; … … 1129 816 #endif 1130 817 1131 /** 1132 * get the UploadManager 1133 * 1134 * @return returns the UploadManager 1135 */ 1136 UploadManager *Nepenthes::getUploadMgr() 1137 { 1138 return m_UploadManager; 1139 } 1140 1141 /** 1142 * stop the nepenthes 818 819 SQLManager *Library::getSQLMgr() 820 { 821 return m_SQLManager; 822 } 823 824 /** 825 * stop the library 1143 826 * 1144 827 * @return returns true if running, else false 1145 828 */ 1146 bool Nepenthes::stop()829 bool Library::stop() 1147 830 { 1148 831 if(m_running) … … 1158 841 * 1159 842 * FIXME does not work 1160 * exits nepenthes843 * exits library 1161 844 * 1162 845 * @return returns false 1163 846 */ 1164 bool Nepenthes::reloadConfig()847 bool Library::reloadConfig() 1165 848 { 1166 849 bool retval=true; … … 1184 867 * else false 1185 868 */ 1186 bool Nepenthes::changeUser(char *user)869 bool Library::changeUser(char *user) 1187 870 { 1188 871 passwd * pass; … … 1217 900 * @return true if the userid was changed successfully, else false 1218 901 */ 1219 bool Nepenthes::changeUser()902 bool Library::changeUser() 1220 903 { 1221 904 #ifdef HAVE_SETRESUID … … 1274 957 * @return returns true on success, else false 1275 958 */ 1276 bool Nepenthes::changeGroup(char *gruppe)959 bool Library::changeGroup(char *gruppe) 1277 960 { 1278 961 struct group *grp; … … 1306 989 * @return true if change worked, else false 1307 990 */ 1308 bool Nepenthes::changeGroup()991 bool Library::changeGroup() 1309 992 { 1310 993 … … 1374 1057 * else false 1375 1058 */ 1376 bool Nepenthes::changeRoot(char *path)1059 bool Library::changeRoot(char *path) 1377 1060 { 1378 1061 if ( chroot(path) < 0) … … 1389 1072 1390 1073 1391 bool Nepenthes::setCapabilties()1074 bool Library::setCapabilties() 1392 1075 { 1393 1076 logPF(); … … 1449 1132 case SIGHUP: 1450 1133 logCrit("%s\n", "Got SIGHUP\nRereading Config File!\n"); 1451 g_ Nepenthes->reloadConfig();1134 g_Library->reloadConfig(); 1452 1135 break; 1453 1136 1454 1137 case SIGINT: 1455 1138 logCrit("%s\n", "Got SIGINT\nStopping NOW!\n"); 1456 g_ Nepenthes->stop();1139 g_Library->stop(); 1457 1140 break; 1458 1141 … … 1467 1150 break; 1468 1151 1152 case SIGWINCH: 1153 printf("window change\n"); 1154 break; 1155 1469 1156 default: 1470 1157 logCrit("Exit 'cause of %i\n", iSignal); 1471 g_ Nepenthes->stop();1472 } 1473 } 1474 1475 /** 1476 * show the nepentheslogo1158 g_Library->stop(); 1159 } 1160 } 1161 1162 /** 1163 * show the library logo 1477 1164 */ 1478 1165 void show_logo(); … … 1569 1256 #endif 1570 1257 // signal(SIGLOST, SignalHandler); // -,-,- Term File lock lost 1571 signal(SIGWINCH, SIG_IGN ); // 28,28,20 Ign Window resize signal (4.3 BSD, Sun) 1258 // signal(SIGWINCH, SIG_IGN ); // 28,28,20 Ign Window resize signal (4.3 BSD, Sun) 1259 signal(SIGWINCH, SignalHandler); // 28,28,20 Ign Window resize signal (4.3 BSD, Sun) 1572 1260 #ifdef HAVE_SIGUNUSED 1573 1261 signal(SIGUNUSED,SignalHandler); // -,31,- Term Unused signal (will be SIGSYS) … … 1575 1263 #endif 1576 1264 1577 Nepenthes nepenthes;1578 return nepenthes.run(argc, argv);1265 Library library; 1266 return library.run(argc, argv); 1579 1267 } 1580 1268 … … 1583 1271 puts("# #\n" \ 1584 1272 " \n" \ 1585 " !Š..,(' \n" \ 1586 " !!..,Š, \n" \ 1587 " !*'.,!* \n" \ 1588 " *!'.,!Š \n" \ 1589 " '!'.,!Š \n" \ 1590 " .Š,',*Š,,. \n" \ 1591 " ,#=%(#%#%%#%%%C \n" \ 1592 " .#%C=,:::::::,,5%#. \n" \ 1593 " (#!!,,,,,,,,,,,J7#' \n" \ 1594 " =#!(=,,,,,,,,:==(7! ,%###!##%'. \n" \ 1595 " .=#(CJ3$#%C7==Š((77 ,%##%%!#%%%#%* \n" \ 1596 " .#(#J#A3#$==7=J=!Š(=3' ,%##%%::::,,::%#%, '!(====((!,'. \n" \ 1597 " ######$@53C=(ŠŠŠŠ==(Š=C7 %##(::::,,,,,::%##A$$3$CCJ3CJC(7C!\n" \ 1598 " #(###3#'JÐ%J(Š!!!*!!J(((=J' ,##(:::,,,,,:::%##5%C' . \n" \ 1599 " .#3#3#$#. C5$C7Š!=ŠŠŠ!7=(Š(7= ;##(:,,,,,,,::%###%. \n" \ 1600 " '####*. 7AJC7Š!7Š(ŠŠ!Š((=7C. |###((,,,,,,,)%##%=C, .*Š(7! \n" \ 1601 " (%7C77!(==!Š!ŠŠ=7=C! ((%############%!(CCŠ.,ŠJAA%3C' \n" \ 1602 " Š$C7C7=Š(=ŠŠŠ((=(=J= ,:%%@M;%%;.77C7(=C!Š!*!Š=!ŠC(777J3$3=!,'. \n" \ 1603 " ,%CJJ=C(7(((((=((=JC 7####::###CC=(CC=(=Š(*!=!=Š=7=77JJ, \n" \ 1604 " .%J337J==(=7==C=C7C3,##J!::::77#%J=CJ==ŠŠŠ=!=Š===(7C7C* \n" \ 1605 " C$33C3C7=7C777CJJJ%7##C:,,,,,:#$3CJC==(=7(ŠŠŠ(=C(J$CJ* \n" \ 1606 " '%$333CCC3CCCCCJ%3%#%#$C:,,,:3#AJJ3C7=JC=(((((7C7C3J3! \n" \ 1607 " (#$$3JJJ%3J$J33$$AA33#5J:,,:A#$$$JC7CJCC7=(=(CJ$CJJ$, \n" \ 1608 " J#%$$%33%$5$A#$%#%CJ3#A%:35#%J3$3JJCCC$C7J77JC$J33$' \n" \ 1609 " .75AA%%%$AA%#A%5#%CJC#J###3#J$%3$JJCCJCC3J33$33$$A. \n" \ 1610 " =5555A%AA5#5@%,%CJC3J###ACJJ$5$33JJJJJJJJ%%%3%%A% \n" \ 1611 " .3@55##A5###='!AJCJJ3###ACJ3A#$$$%$$33333$%%%AA5! \n" \ 1612 " %3J%5Ð5$J=' '533CC3###ACJ$#@A%%%AA$A%$$A%AA55Š \n" \ 1613 " A=(3$A'. 3A3J33###%CJ$Ð#AA55AA%5#AA%%5#5Š \n" \ 1614 " .AC=Š$J 'A%$J$A##A33AAÐ555###55#5555#A! \n" \ 1615 &nbs
