tags 369030 + patch thanks Here's a patch to fix the GCC 4.2 build failures:
--- ./nepenthes-core/src/EventManager.cpp~ 2006-08-24 13:17:52.000000000 +0200 +++ ./nepenthes-core/src/EventManager.cpp 2006-08-25 10:04:57.251849016 +0200 @@ -206,7 +206,7 @@ * @return true on success ( no collisions in number & name) * else false */ -bool EventManager::registerInternalEvent(char *name, uint16_t number) +bool EventManager::registerInternalEvent(const char *name, uint16_t number) { // check name and number are uniq list<EventRegistration *>::iterator it; @@ -236,7 +236,7 @@ * * @return returns the Events Number */ -uint16_t EventManager::registerEvent(char *name) +uint16_t EventManager::registerEvent(const char *name) { // FIXME int32_t retval = rand()%EVENT_HANDLER_BITSET_SIZE; while(registerInternalEvent(name,retval) == false) --- ./nepenthes-core/src/Nepenthes.cpp~ 2006-08-24 13:19:55.000000000 +0200 +++ ./nepenthes-core/src/Nepenthes.cpp 2006-08-24 13:24:22.000000000 +0200 @@ -172,9 +172,9 @@ bool verbose=false; char *filecheckarg =NULL; - char *confpath = SYSCONFDIR "/nepenthes/nepenthes.conf"; + char *confpath = (char *)SYSCONFDIR "/nepenthes/nepenthes.conf"; char *basedir; - char *workingdir = PREFIX; + char *workingdir = (char *)PREFIX; char *chUser = NULL; char *chGroup = NULL; char *chRoot = NULL; @@ -1638,10 +1638,10 @@ { typedef struct { - char *m_shortOpt; - char *m_longOpt; - char *m_Description; - char *m_Default; + const char *m_shortOpt; + const char *m_longOpt; + const char *m_Description; + const char *m_Default; } helpstruct; helpstruct myopts[]= --- ./nepenthes-core/src/Download.cpp~ 2006-08-24 14:03:00.000000000 +0200 +++ ./nepenthes-core/src/Download.cpp 2006-08-24 14:03:08.000000000 +0200 @@ -45,7 +45,7 @@ * @param callback the DownloadCallback (if used) * @param obj the additional data (if used) */ -Download::Download(uint32_t localhost, char *url,uint32_t address,char *triggerline,DownloadCallback *callback, void *obj) +Download::Download(uint32_t localhost, char *url,uint32_t address,const char *triggerline,DownloadCallback *callback, void *obj) { m_Url = url; m_TriggerLine = triggerline; --- ./nepenthes-core/src/DialogueFactoryManager.cpp~ 2006-08-24 13:40:27.000000000 +0200 +++ ./nepenthes-core/src/DialogueFactoryManager.cpp 2006-08-24 13:40:40.000000000 +0200 @@ -89,7 +89,7 @@ return true; } -DialogueFactory *DialogueFactoryManager::getFactory(char *factoryname) +DialogueFactory *DialogueFactoryManager::getFactory(const char *factoryname) { list <DialogueFactory *>::iterator diaf; for (diaf = m_Factories.begin();diaf != m_Factories.end();diaf++) --- ./nepenthes-core/src/DownloadManager.cpp~ 2006-08-24 13:49:49.000000000 +0200 +++ ./nepenthes-core/src/DownloadManager.cpp 2006-08-24 14:01:33.000000000 +0200 @@ -405,7 +405,7 @@ * * @return returns downloadUrl(Download *) return value */ -bool DownloadManager::downloadUrl(uint32_t localhost, char *url, uint32_t address, char *triggerline, uint8_t downloadflags, DownloadCallback *callback, void *obj) +bool DownloadManager::downloadUrl(uint32_t localhost, char *url, uint32_t address, const char *triggerline, uint8_t downloadflags, DownloadCallback *callback, void *obj) { Download *down = new Download(localhost, url,address,triggerline, callback,obj); down->addDownloadFlags(downloadflags); --- ./nepenthes-core/src/TCPSocket.cpp~ 2006-08-24 14:38:26.000000000 +0200 +++ ./nepenthes-core/src/TCPSocket.cpp 2006-08-24 14:38:53.000000000 +0200 @@ -747,7 +747,7 @@ * * @return returns the queues size if the socket is allowed to send at this point of time, else -1 */ -int32_t TCPSocket::doWrite(char *msg, uint32_t len) +int32_t TCPSocket::doWrite(const char *msg, uint32_t len) { logPF(); if (m_CanSend == false) @@ -826,7 +826,7 @@ } -bool TCPSocket::doRespond(char *msg, uint32_t len) +bool TCPSocket::doRespond(const char *msg, uint32_t len) { logPF(); if (doWrite(msg, len) > 0) --- ./nepenthes-core/src/Packet.cpp~ 2006-08-24 14:39:04.000000000 +0200 +++ ./nepenthes-core/src/Packet.cpp 2006-08-24 14:45:35.000000000 +0200 @@ -33,7 +33,7 @@ using namespace nepenthes; -Packet::Packet(char *data, uint32_t len) +Packet::Packet(const char *data, uint32_t len) { m_Data = (char *)malloc(len*sizeof(char)); memcpy(m_Data,data,len); @@ -68,7 +68,7 @@ // some extensions we will need for bound udp sockets -UDPPacket::UDPPacket(uint32_t ip, uint16_t port, char *data,uint32_t len) : Packet(data,len) +UDPPacket::UDPPacket(uint32_t ip, uint16_t port, const char *data,uint32_t len) : Packet(data,len) { m_Host = ip; m_Port = port; --- ./nepenthes-core/src/UDPSocket.cpp~ 2006-08-24 14:39:48.000000000 +0200 +++ ./nepenthes-core/src/UDPSocket.cpp 2006-08-24 14:40:15.000000000 +0200 @@ -375,7 +375,7 @@ return iLength; } -int32_t UDPSocket::doWrite(char *msg, uint32_t len) +int32_t UDPSocket::doWrite(const char *msg, uint32_t len) { // logPF(); if (m_CanSend == false) @@ -388,7 +388,7 @@ return m_TxPackets.size(); } -int32_t UDPSocket::doWriteTo(uint32_t ip, uint16_t port, char *msg, uint32_t len) +int32_t UDPSocket::doWriteTo(uint32_t ip, uint16_t port, const char *msg, uint32_t len) { // logPF(); if (m_CanSend == false) @@ -466,7 +466,7 @@ } -bool UDPSocket::doRespond(char *msg, uint32_t len) +bool UDPSocket::doRespond(const char *msg, uint32_t len) { return doWrite(msg,len); } --- ./nepenthes-core/src/POLLSocket.cpp~ 2006-08-24 14:40:20.000000000 +0200 +++ ./nepenthes-core/src/POLLSocket.cpp 2006-08-24 14:40:29.000000000 +0200 @@ -112,12 +112,12 @@ } -int32_t POLLSocket::doWrite(char *msg, uint32_t len) +int32_t POLLSocket::doWrite(const char *msg, uint32_t len) { return 0; } -bool POLLSocket::doRespond(char *msg, uint32_t len) +bool POLLSocket::doRespond(const char *msg, uint32_t len) { return false; } --- ./nepenthes-core/src/FILESocket.cpp~ 2006-08-24 14:40:34.000000000 +0200 +++ ./nepenthes-core/src/FILESocket.cpp 2006-08-24 14:40:42.000000000 +0200 @@ -127,7 +127,7 @@ } return readbytes; } -int32_t FILESocket::doWrite(char *msg, uint32_t len) +int32_t FILESocket::doWrite(const char *msg, uint32_t len) { return 0; } @@ -142,7 +142,7 @@ return false; } -bool FILESocket::doRespond(char *msg, uint32_t len) +bool FILESocket::doRespond(const char *msg, uint32_t len) { return false; } --- ./nepenthes-core/src/UploadResult.cpp~ 2006-08-24 15:07:52.000000000 +0200 +++ ./nepenthes-core/src/UploadResult.cpp 2006-08-24 15:07:55.000000000 +0200 @@ -50,7 +50,7 @@ * @param size payload size * @param obj additional data (taken from UploadQuery for the upload) */ -UploadResult::UploadResult(char *result, uint32_t size, void *obj) +UploadResult::UploadResult(const char *result, uint32_t size, void *obj) { m_Data = (char *)malloc(size); memcpy(m_Data,result,size); --- ./nepenthes-core/include/EventManager.hpp~ 2006-08-24 13:18:45.000000000 +0200 +++ ./nepenthes-core/include/EventManager.hpp 2006-08-25 10:04:43.197248063 +0200 @@ -71,11 +71,11 @@ bool Init(); bool Exit(); - virtual uint16_t registerEvent(char *name); -// virtual int32_t getEventbyName(char *name); + virtual uint16_t registerEvent(const char *name); +// virtual int32_t getEventbyName(const char *name); private: - bool registerInternalEvent(char *name, uint16_t number); + bool registerInternalEvent(const char *name, uint16_t number); list <EventHandler *> m_EventHandlers; --- ./nepenthes-core/include/Packet.hpp~ 2006-08-24 14:39:31.000000000 +0200 +++ ./nepenthes-core/include/Packet.hpp 2006-08-24 14:45:21.000000000 +0200 @@ -45,7 +45,7 @@ class Packet { public: - Packet(char *pszData,uint32_t iLen); + Packet(const char *pszData,uint32_t iLen); ~Packet(); char *getData(); uint32_t getSize(); @@ -62,7 +62,7 @@ class UDPPacket : public Packet { public: - UDPPacket(uint32_t ip, uint16_t port, char *pszData,uint32_t iLen); + UDPPacket(uint32_t ip, uint16_t port, const char *pszData,uint32_t iLen); ~UDPPacket(); uint32_t getHost(); uint16_t getPort(); --- ./nepenthes-core/include/DownloadManager.hpp~ 2006-08-24 14:01:55.000000000 +0200 +++ ./nepenthes-core/include/DownloadManager.hpp 2006-08-24 14:02:07.000000000 +0200 @@ -82,7 +82,7 @@ virtual ~DownloadManager(); bool isLocalAddress(uint32_t ulAddress); virtual bool downloadUrl(Download *down); - virtual bool downloadUrl(uint32_t localhost, char *url, uint32_t address, char *triggerline, uint8_t downloadflags, DownloadCallback *callback=NULL, void *obj=NULL); + virtual bool downloadUrl(uint32_t localhost, char *url, uint32_t address, const char *triggerline, uint8_t downloadflags, DownloadCallback *callback=NULL, void *obj=NULL); virtual bool downloadUrl(uint32_t localhost, char *proto, char *user, char *pass, char *host, char *port, char *file, uint32_t address, uint8_t downloadflags); virtual bool registerDownloadHandler(DownloadHandler * handler, const char * protocol); --- ./nepenthes-core/include/Download.hpp~ 2006-08-24 14:03:15.000000000 +0200 +++ ./nepenthes-core/include/Download.hpp 2006-08-24 14:03:22.000000000 +0200 @@ -56,7 +56,7 @@ class Download //: public EvCID { public: - Download(uint32_t localhost, char *pszUri, uint32_t ulAddress, char *triggerline, DownloadCallback *callback=NULL, void *obj=NULL); + Download(uint32_t localhost, char *pszUri, uint32_t ulAddress, const char *triggerline, DownloadCallback *callback=NULL, void *obj=NULL); virtual ~Download(); virtual void setUrl(string *url); virtual string getUrl(); --- ./nepenthes-core/include/TCPSocket.hpp~ 2006-08-24 14:41:14.000000000 +0200 +++ ./nepenthes-core/include/TCPSocket.hpp 2006-08-24 14:41:00.000000000 +0200 @@ -52,10 +52,10 @@ int32_t doSend(); int32_t doRecv(); - int32_t doWrite(char *msg, uint32_t len); + int32_t doWrite(const char *msg, uint32_t len); bool checkTimeout(); bool handleTimeout(); - bool doRespond(char *msg, uint32_t len); + bool doRespond(const char *msg, uint32_t len); void setStatus(socket_state i); protected: --- ./nepenthes-core/include/POLLSocket.hpp~ 2006-08-24 14:41:21.000000000 +0200 +++ ./nepenthes-core/include/POLLSocket.hpp 2006-08-24 14:41:32.000000000 +0200 @@ -53,10 +53,10 @@ virtual int32_t doSend(); virtual int32_t doRecv(); - int32_t doWrite(char *msg, uint32_t len); + int32_t doWrite(const char *msg, uint32_t len); virtual bool checkTimeout(); virtual bool handleTimeout(); - bool doRespond(char *msg, uint32_t len); + bool doRespond(const char *msg, uint32_t len); }; } --- ./nepenthes-core/include/UDPSocket.hpp~ 2006-08-24 14:41:33.000000000 +0200 +++ ./nepenthes-core/include/UDPSocket.hpp 2006-08-24 14:41:45.000000000 +0200 @@ -51,12 +51,12 @@ int32_t doSend(); int32_t doRecv(); - int32_t doWrite(char *msg, uint32_t len); - int32_t doWriteTo(uint32_t ip, uint16_t port, char *msg, uint32_t len); + int32_t doWrite(const char *msg, uint32_t len); + int32_t doWriteTo(uint32_t ip, uint16_t port, const char *msg, uint32_t len); bool checkTimeout(); bool handleTimeout(); - bool doRespond(char *msg, uint32_t len); + bool doRespond(const char *msg, uint32_t len); private: list <UDPPacket *> m_TxPackets; }; --- ./nepenthes-core/include/Responder.hpp~ 2006-08-24 14:41:50.000000000 +0200 +++ ./nepenthes-core/include/Responder.hpp 2006-08-24 14:41:55.000000000 +0200 @@ -39,7 +39,7 @@ { public: virtual ~Responder() {}; - virtual bool doRespond(char *msg, uint32_t len)=0; + virtual bool doRespond(const char *msg, uint32_t len)=0; }; --- ./nepenthes-core/include/UDSSocket.hpp~ 2006-08-24 14:42:00.000000000 +0200 +++ ./nepenthes-core/include/UDSSocket.hpp 2006-08-24 14:42:07.000000000 +0200 @@ -46,9 +46,9 @@ int32_t send(); int32_t recv(); - int32_t write(char *msg, uint32_t len); + int32_t write(const char *msg, uint32_t len); bool checkTimeout(); bool handleTimeout(); - bool doRespond(char *msg, uint32_t len); + bool doRespond(const char *msg, uint32_t len); }; } --- ./nepenthes-core/include/FILESocket.hpp~ 2006-08-24 14:42:11.000000000 +0200 +++ ./nepenthes-core/include/FILESocket.hpp 2006-08-24 14:42:18.000000000 +0200 @@ -53,10 +53,10 @@ int32_t doSend(); int32_t doRecv(); - int32_t doWrite(char *msg, uint32_t len); + int32_t doWrite(const char *msg, uint32_t len); bool checkTimeout(); bool handleTimeout(); - bool doRespond(char *msg, uint32_t len); + bool doRespond(const char *msg, uint32_t len); private: string m_FilePath; int32_t m_Flags; --- ./nepenthes-core/include/Socket.hpp~ 2006-08-24 14:44:10.000000000 +0200 +++ ./nepenthes-core/include/Socket.hpp 2006-08-24 14:44:18.000000000 +0200 @@ -110,7 +110,7 @@ virtual int32_t doSend()=0; virtual int32_t doRecv()=0; - virtual int32_t doWrite(char *msg,uint32_t len)=0; + virtual int32_t doWrite(const char *msg,uint32_t len)=0; virtual bool checkTimeout()=0; virtual bool handleTimeout()=0; --- ./nepenthes-core/include/UploadResult.hpp~ 2006-08-24 15:08:01.000000000 +0200 +++ ./nepenthes-core/include/UploadResult.hpp 2006-08-24 15:08:05.000000000 +0200 @@ -40,7 +40,7 @@ class UploadResult { public: - UploadResult(char *result, uint32_t size, void *obj); + UploadResult(const char *result, uint32_t size, void *obj); virtual ~UploadResult(); virtual void *getObject(); virtual char *getData(); --- ./modules/download-ftp/CTRLDialogue.cpp~ 2006-08-24 13:26:05.000000000 +0200 +++ ./modules/download-ftp/CTRLDialogue.cpp 2006-08-24 14:47:14.000000000 +0200 @@ -366,7 +366,7 @@ void CTRLDialogue::sendType() { - char *nmsg = "TYPE I\r\n"; + const char *nmsg = "TYPE I\r\n"; m_Socket->doRespond(nmsg,strlen(nmsg)); logDebug("FTPSEND: '%s'\n",nmsg); } @@ -502,7 +502,7 @@ void CTRLDialogue::sendQuit() { - char *nmsg = "QUIT\r\n"; + const char *nmsg = "QUIT\r\n"; logDebug("FTPSEND: '%s'\n",nmsg); m_Socket->doRespond(nmsg,strlen(nmsg)); --- ./modules/download-nepenthes/DownloadNepenthesDialogue.cpp~ 2006-08-24 13:28:57.000000000 +0200 +++ ./modules/download-nepenthes/DownloadNepenthesDialogue.cpp 2006-08-25 09:47:44.554170041 +0200 @@ -130,7 +130,7 @@ logInfo("client wants to send us a new file (%.*s), going on\n",32,msg->getMsg()); m_Socket->doRespond("SENDFILE\r\n",strlen("SENDFILE\r\n")); m_State = DOWN_N_FILE; - m_Download = new Download(0,"nepenthes://",0,"nepenthes interfile transferr"); + m_Download = new Download(0,(char *)"nepenthes://",0,"nepenthes interfile transferr"); }else { logInfo("we already know file %.*s, so we wont get it again\n",32,msg->getMsg()); --- ./modules/download-rcp/RCPDialogue.cpp~ 2006-08-24 13:31:14.000000000 +0200 +++ ./modules/download-rcp/RCPDialogue.cpp 2006-08-25 09:53:02.850132775 +0200 @@ -93,14 +93,14 @@ m_Buffer = new Buffer(1024); char zerobyte = 0; - char *request ="rcp -f "; + const char *request = "rcp -f "; m_Socket->doWrite((char *)&zerobyte,1); m_Buffer->add((void *)m_Download->getDownloadUrl()->getUser().c_str(),m_Download->getDownloadUrl()->getUser().size()); m_Buffer->add(&zerobyte,1); m_Buffer->add((void *)m_Download->getDownloadUrl()->getUser().c_str(),m_Download->getDownloadUrl()->getUser().size()); m_Buffer->add(&zerobyte,1); - m_Buffer->add(request,strlen(request)); + m_Buffer->add((void *)request,strlen(request)); m_Buffer->add((void *)m_Download->getDownloadUrl()->getPath().c_str(),m_Download->getDownloadUrl()->getPath().size()); m_Buffer->add(&zerobyte,1); --- ./modules/upload-http/HTTPUPDialogue.cpp~ 2006-08-24 13:31:45.000000000 +0200 +++ ./modules/upload-http/HTTPUPDialogue.cpp 2006-08-25 09:56:18.411580267 +0200 @@ -104,7 +104,7 @@ m_Buffer->cut((uint32_t)(end-start)+2); if ( m_UploadQuery->getCallback() != NULL ) { - UploadResult *result = new UploadResult((char *)m_Buffer->getData(),m_Buffer->getSize(),m_UploadQuery->getObject()); + UploadResult *result = new UploadResult((const char *)m_Buffer->getData(),m_Buffer->getSize(),m_UploadQuery->getObject()); m_UploadQuery->getCallback()->uploadSuccess(result); delete result; } --- ./modules/log-irc/IrcDialogue.cpp~ 2006-08-24 13:33:08.000000000 +0200 +++ ./modules/log-irc/IrcDialogue.cpp 2006-08-24 13:33:17.000000000 +0200 @@ -340,7 +340,7 @@ struct FlagMapping { int32_t m_LogFlag; - char *m_ColorFlag; + const char *m_ColorFlag; }; --- ./modules/shellcode-generic/sch_generic_url.cpp~ 2006-08-24 13:44:17.000000000 +0200 +++ ./modules/shellcode-generic/sch_generic_url.cpp 2006-08-24 13:44:27.000000000 +0200 @@ -126,7 +126,7 @@ logInfo("Detected generic prepended unencoded URL Shellcode: \"%s\"\n", pUrl); - g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),(char *)pUrl,(*msg)->getRemoteHost(),"generic url decoder",0); + g_Nepenthes->getDownloadMgr()->downloadUrl((*msg)->getLocalHost(),(char *)pUrl,(*msg)->getRemoteHost(),(char *)"generic url decoder",0); pcre_free_substring(pUrl); bMatch = true; } --- ./modules/shellcode-generic/sch_generic_xor.hpp~ 2006-08-24 13:45:02.000000000 +0200 +++ ./modules/shellcode-generic/sch_generic_xor.hpp 2006-08-24 13:45:10.000000000 +0200 @@ -39,8 +39,8 @@ { struct XORPcreHelper { - char *m_PCRE; - char *m_Name; + const char *m_PCRE; + const char *m_Name; uint16_t m_Options; // will use this later }; --- ./modules/shellemu-winnt/VFSDir.cpp~ 2006-08-24 14:08:13.000000000 +0200 +++ ./modules/shellemu-winnt/VFSDir.cpp 2006-08-24 14:13:33.000000000 +0200 @@ -40,7 +40,7 @@ using namespace nepenthes; -VFSDir::VFSDir(VFSNode *parentnode, char *name) +VFSDir::VFSDir(VFSNode *parentnode, const char *name) { m_ParentNode = parentnode; m_Name = name; @@ -71,14 +71,14 @@ -VFSDir* VFSDir::createDirectory(char *dirname) +VFSDir* VFSDir::createDirectory(const char *dirname) { VFSDir *dir = new VFSDir(this,dirname); m_Nodes.push_back(dir); return dir; } -VFSDir* VFSDir::getDirectory(char *dirname) +VFSDir* VFSDir::getDirectory(const char *dirname) { list <VFSNode *>::iterator it; for (it = m_Nodes.begin();it != m_Nodes.end();it++) @@ -92,14 +92,14 @@ } -VFSFile *VFSDir::createFile(char *name,char *data, uint32_t len) +VFSFile *VFSDir::createFile(const char *name, char *data, uint32_t len) { VFSFile *file = new VFSFile(this,name,data,len); m_Nodes.push_back(file); return file; } -VFSFile* VFSDir::getFile(char *filename) +VFSFile* VFSDir::getFile(const char *filename) { list <VFSNode *>::iterator it; for (it = m_Nodes.begin();it != m_Nodes.end();it++) --- ./modules/shellemu-winnt/VFSDir.hpp~ 2006-08-24 14:08:34.000000000 +0200 +++ ./modules/shellemu-winnt/VFSDir.hpp 2006-08-24 14:13:42.000000000 +0200 @@ -45,13 +45,13 @@ class VFSDir: public VFSNode { public: - VFSDir(VFSNode *parentnode, char *name); + VFSDir(VFSNode *parentnode, const char *name); ~VFSDir(); - virtual VFSDir* getDirectory(char *dirname); - virtual VFSDir *createDirectory(char *dirname); - virtual VFSFile *getFile(char *filename); + virtual VFSDir* getDirectory(const char *dirname); + virtual VFSDir *createDirectory(const char *dirname); + virtual VFSFile *getFile(const char *filename); - virtual VFSFile *createFile(char *name, char *data, uint32_t len); + virtual VFSFile *createFile(const char *name, char *data, uint32_t len); virtual list <VFSNode *> *getList(); virtual VFSCommand *createCommand(VFSCommand *command); }; --- ./modules/shellemu-winnt/VFSFile.cpp~ 2006-08-24 14:11:14.000000000 +0200 +++ ./modules/shellemu-winnt/VFSFile.cpp 2006-08-24 14:12:40.000000000 +0200 @@ -42,7 +42,7 @@ using namespace nepenthes; using namespace std; -VFSFile::VFSFile(VFSNode *parentnode, char *name, char *data, uint32_t len) +VFSFile::VFSFile(VFSNode *parentnode, const char *name, char *data, uint32_t len) { m_ParentNode = parentnode; if (len == 0) --- ./modules/shellemu-winnt/VFSFile.hpp~ 2006-08-24 14:11:42.000000000 +0200 +++ ./modules/shellemu-winnt/VFSFile.hpp 2006-08-24 14:12:50.000000000 +0200 @@ -42,7 +42,7 @@ class VFSFile : public VFSNode { public: - VFSFile(VFSNode *parentnode, char *name, char *data, uint32_t len); + VFSFile(VFSNode *parentnode, const char *name, char *data, uint32_t len); ~VFSFile(); virtual uint32_t addData(char *data,uint32_t len); virtual char *getData(); --- ./modules/shellemu-winnt/VFSCommandFTP.cpp~ 2006-08-24 14:15:44.000000000 +0200 +++ ./modules/shellemu-winnt/VFSCommandFTP.cpp 2006-08-24 14:16:43.000000000 +0200 @@ -432,7 +432,7 @@ }else { g_Nepenthes->getDownloadMgr()->downloadUrl( localhost, - "ftp", + (char *)"ftp", (char *)user.c_str(), (char *)pass.c_str(), (char *)host.c_str(), --- ./modules/shellemu-winnt/VFSCommandREDIR.cpp~ 2006-08-24 14:17:18.000000000 +0200 +++ ./modules/shellemu-winnt/VFSCommandREDIR.cpp 2006-08-24 14:17:26.000000000 +0200 @@ -81,7 +81,7 @@ } file->addData((char *)m_VFS->getStdOut()->c_str(),m_VFS->getStdOut()->size()); - file->addData("\n",1); + file->addData((char *)"\n",1); logDebug("file is '%.*s' \n",file->getSize(),(char *)file->getData()); m_VFS->freeStdout(); --- ./modules/shellemu-winnt/VFSCommandRREDIR.cpp~ 2006-08-24 14:17:57.000000000 +0200 +++ ./modules/shellemu-winnt/VFSCommandRREDIR.cpp 2006-08-24 14:18:04.000000000 +0200 @@ -78,7 +78,7 @@ } file->addData((char *)m_VFS->getStdOut()->c_str(),m_VFS->getStdOut()->size()); - file->addData("\n",1); + file->addData((char *)"\n",1); logDebug("file is '%.*s' \n",file->getSize(),(char *)file->getData()); m_VFS->freeStdout(); --- ./modules/vuln-bagle/BagleDialogue.cpp~ 2006-08-24 14:19:25.000000000 +0200 +++ ./modules/vuln-bagle/BagleDialogue.cpp 2006-08-25 09:48:30.892854363 +0200 @@ -156,7 +156,7 @@ m_FileSize = ntohs (*(uint32_t *)msg->getMsg()); logInfo("Unexpected but detected: Bagle Binary Stream (%i bytes)\n",m_FileSize); m_State = BAGLE_BINARY; - m_Download = new Download(m_Socket->getRemoteHost(),"bagle://",m_Socket->getRemoteHost(),"bagle://foo/bar"); + m_Download = new Download(m_Socket->getRemoteHost(),(char *)"bagle://",m_Socket->getRemoteHost(),"bagle://foo/bar"); m_Download->getDownloadBuffer()->addData(msg->getMsg()+4,msg->getSize()-4); } } --- ./modules/vuln-kuang2/Kuang2Dialogue.cpp~ 2006-08-24 14:21:25.000000000 +0200 +++ ./modules/vuln-kuang2/Kuang2Dialogue.cpp 2006-08-24 14:22:52.000000000 +0200 @@ -130,7 +130,7 @@ m_FileName = kmsg->sdata; logInfo("Kuang2 File upload requested %s %i\n",m_FileName.c_str(),m_FileSize); m_State = KUANG2_FILETRANSFERR; - m_Download = new Download(msg->getLocalHost(),"kuang2://foo/bar",msg->getRemoteHost(),"some triggerline"); + m_Download = new Download(msg->getLocalHost(),(char *)"kuang2://foo/bar",msg->getRemoteHost(),"some triggerline"); m_Buffer->clear(); } else --- ./modules/vuln-lsass/LSASSDialogue.cpp~ 2006-08-24 14:23:27.000000000 +0200 +++ ./modules/vuln-lsass/LSASSDialogue.cpp 2006-08-24 14:24:07.000000000 +0200 @@ -144,7 +144,7 @@ logDebug("Valid LSASS HOD Stage #3 (%i)\n",sizeof(lsass_hod_req3)); m_State = LSASS_HOD_STAGE4; m_Buffer->clear(); - char *osversion = "W i n d o w s 5 . 1 "; + const char *osversion = "W i n d o w s 5 . 1 "; memcpy(reply+48,osversion,strlen(osversion)); msg->getResponder()->doRespond(reply,256); return CL_ASSIGN; --- ./modules/vuln-mydoom/MydoomDialogue.cpp~ 2006-08-24 14:25:32.000000000 +0200 +++ ./modules/vuln-mydoom/MydoomDialogue.cpp 2006-08-24 14:25:39.000000000 +0200 @@ -117,7 +117,7 @@ m_State = MYDOOM_FILETRANSFERR; m_Buffer->cut(strlen(MydoomTrailor)); - m_Download = new Download(msg->getRemoteHost(),"mydoom://foo/bar",msg->getRemoteHost(),"some triggerline"); + m_Download = new Download(msg->getRemoteHost(),(char *)"mydoom://foo/bar",msg->getRemoteHost(),"some triggerline"); m_Download->getDownloadBuffer()->addData((char *)m_Buffer->getData(),m_Buffer->getSize()); m_Buffer->clear(); return CL_ASSIGN; --- ./modules/vuln-optix/OPTIXDownloadDialogue.cpp~ 2006-08-24 14:27:02.000000000 +0200 +++ ./modules/vuln-optix/OPTIXDownloadDialogue.cpp 2006-08-25 10:03:28.764361410 +0200 @@ -133,7 +133,7 @@ msg->getResponder()->doRespond("+OK REDY",strlen("+OK REDY")); m_State = OPTIX_DL_FILETRANSFERR; - m_Download = new Download(msg->getRemoteHost(),"optix://foo/bar",msg->getRemoteHost(),"some triggerline"); + m_Download = new Download(msg->getRemoteHost(),(char *)"optix://foo/bar",msg->getRemoteHost(),"some triggerline"); } break; } --- ./modules/vuln-optix/OPTIXShellDialogue.cpp~ 2006-08-24 14:27:56.000000000 +0200 +++ ./modules/vuln-optix/OPTIXShellDialogue.cpp 2006-08-25 09:50:15.604881311 +0200 @@ -116,7 +116,7 @@ // this will just open the optix downloadmanagers bind socket it its closed - g_Nepenthes->getDownloadMgr()->downloadUrl(msg->getLocalHost(),"optix://localhost:500/file",msg->getRemoteHost(),"optix foobar",0); + g_Nepenthes->getDownloadMgr()->downloadUrl(msg->getLocalHost(),(char *)"optix://localhost:500/file",msg->getRemoteHost(),"optix foobar",0); } } break; --- ./modules/vuln-sub7/SUB7Dialogue.cpp~ 2006-08-24 14:29:53.000000000 +0200 +++ ./modules/vuln-sub7/SUB7Dialogue.cpp 2006-08-25 09:50:48.315952557 +0200 @@ -143,7 +143,7 @@ m_FileSize = atoi(filesize); m_State = SUB7_FILETRANSFERR; m_Buffer->clear(); - m_Download = new Download(msg->getRemoteHost(),"sub7://foo/bar",msg->getRemoteHost(),"some triggerline"); + m_Download = new Download(msg->getRemoteHost(),(char *)"sub7://foo/bar",msg->getRemoteHost(),"some triggerline"); free(filesize); } break; --- ./modules/vuln-ftpd/vuln-ftpd.cpp~ 2006-08-24 14:34:06.000000000 +0200 +++ ./modules/vuln-ftpd/vuln-ftpd.cpp 2006-08-24 15:03:51.000000000 +0200 @@ -175,7 +175,7 @@ m_ConsumeLevel = CL_ASSIGN; m_Shellcode = new Buffer(4096); m_Buffer = new Buffer(4096); - char * banner1 = "220 ---freeFTPd 1.0---warFTPd 1.65---\r\n"; + const char * banner1 = "220 ---freeFTPd 1.0---warFTPd 1.65---\r\n"; m_Socket->doRespond(banner1, strlen(banner1)); m_state = FTP_NULL; } @@ -196,16 +196,16 @@ */ ConsumeLevel FTPdDialogue::incomingData(Message *msg) { - char* s_quit = "221-Quit.\r\n221 Goodbye!\r\n"; - char* s_user_ok = "331 User OK, Password required\r\n"; - //char* s_unknown_command = "500-Unknown Command\r\n"; - char* s_server_error = "501 Server Error\r\n"; - char* s_not_logged_in = "530 You are not logged in\r\n"; - char* s_auth_failed = "530 Authentication failed, sorry\r\n"; - - char* cmd_user = "USER"; - char* cmd_pass = "PASS"; - char* cmd_quit = "QUIT"; + const char* s_quit = "221-Quit.\r\n221 Goodbye!\r\n"; + const char* s_user_ok = "331 User OK, Password required\r\n"; + //const char* s_unknown_command = "500-Unknown Command\r\n"; + const char* s_server_error = "501 Server Error\r\n"; + const char* s_not_logged_in = "530 You are not logged in\r\n"; + const char* s_auth_failed = "530 Authentication failed, sorry\r\n"; + + const char* cmd_user = "USER"; + const char* cmd_pass = "PASS"; + const char* cmd_quit = "QUIT"; uint32_t threshold = 40; @@ -440,7 +440,7 @@ // warFTPd 1.65 exploit // Win32 Opcode List - char* opcodes[3] = {"\xe2\x31\x02\x75", "\x54\x1d\xab\x71", "\x72\x93\xab\x71"}; + const char* opcodes[3] = {"\xe2\x31\x02\x75", "\x54\x1d\xab\x71", "\x72\x93\xab\x71"}; if ( line.size() > 500 ) { --- ./nepenthes-core/include/DialogueFactoryManager.hpp~ 2006-08-25 10:17:11.438003524 +0200 +++ ./nepenthes-core/include/DialogueFactoryManager.hpp 2006-08-25 10:17:21.208726107 +0200 @@ -62,7 +62,7 @@ virtual bool registerFactory(DialogueFactory *diaf); virtual bool unregisterFactory(DialogueFactory *diaf); - virtual DialogueFactory *getFactory(char *factoryname); + virtual DialogueFactory *getFactory(const char *factoryname); protected: list <DialogueFactory *> m_Factories; }; --- ./modules/submit-xmlrpc/XMLRPCDialogue.hpp~ 2006-08-25 10:20:56.848603519 +0200 +++ ./modules/submit-xmlrpc/XMLRPCDialogue.hpp 2006-08-25 10:22:04.335687382 +0200 @@ -56,7 +56,7 @@ public: HTTPHeader(char *header, uint32_t size); ~HTTPHeader(); - const char *getValue(char *name); + const char *getValue(const char *name); string getHeader(); private: --- ./modules/submit-xmlrpc/XMLRPCParser.cpp~ 2006-08-25 10:20:59.679523142 +0200 +++ ./modules/submit-xmlrpc/XMLRPCParser.cpp 2006-08-25 10:21:56.598907049 +0200 @@ -61,7 +61,7 @@ // the wrapper class -XMLRPCParser::XMLRPCParser(char *s) +XMLRPCParser::XMLRPCParser(const char *s) { m_tree = parseXMLString(s); } @@ -71,7 +71,7 @@ freeXMLTree(m_tree); } -const char *XMLRPCParser::getValue(char *key) +const char *XMLRPCParser::getValue(const char *key) { return getXMLValue(key, m_tree); } --- ./modules/submit-xmlrpc/XMLRPCDialogue.cpp~ 2006-08-25 10:21:04.252393306 +0200 +++ ./modules/submit-xmlrpc/XMLRPCDialogue.cpp 2006-08-25 10:21:39.552391045 +0200 @@ -101,7 +101,7 @@ m_HeaderValues.clear(); } -const char *HTTPHeader::getValue(char *name) +const char *HTTPHeader::getValue(const char *name) { list <HTTPHeaderValue>::iterator it; for(it=m_HeaderValues.begin();it!=m_HeaderValues.end();it++) --- ./modules/submit-xmlrpc/XMLRPCParser.hpp~ 2006-08-25 10:21:08.599269886 +0200 +++ ./modules/submit-xmlrpc/XMLRPCParser.hpp 2006-08-25 10:21:25.306795516 +0200 @@ -44,9 +44,9 @@ class XMLRPCParser { public: - XMLRPCParser(char *s); + XMLRPCParser(const char *s); ~XMLRPCParser(); - const char *getValue(char *key); + const char *getValue(const char *key); private: Node *m_tree; }; -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]