Jump to content

Ken

Inactive Member
  • Posts

    726
  • Joined

  • Last visited

  • Days Won

    44
  • Feedback

    0%

Posts posted by Ken

  1. On 1/4/2016 at 11:39 AM, wezt said:

    Hi, yes you're right.

    I've made some changes in code, now this bug should be fixed, also it doesn't use m_list_iplist anymore:

      Hide contents

    In char.cpp

        if (GetMapIndex() == OXEVENT_MAP_INDEX)
        {
            COXEventManager::instance().RemoveFromList(GetPlayerID());
        }

     

    In OXEvent.h

    Change "void RemoveFromList(const char* gelenip);" to "void RemoveFromList(DWORD pidm);"

    And "void CheckIpAdr(DWORD pidm);" to "bool CheckIpAdr(DWORD pidm);"

    In OXEvent.cpp

    Replace:

    void COXEventManager::RemoveFromIpList(const char* gelenip){
        std::string silinecekip = gelenip;
        m_list_iplist.erase(silinecekip);
    }

    With this:

    void COXEventManager::RemoveFromList(DWORD pidm)
    {
        m_map_attender.erase(pidm);
    }

    Then change "bool COXEventManager::EnterAttender(LPCHARACTER pkChar)" to:

    bool COXEventManager::EnterAttender(LPCHARACTER pkChar)
    {
        DWORD pid = pkChar->GetPlayerID();

        if(CheckIpAdr(pid))
        {
            m_map_char.insert(std::make_pair(pid, pid));
            m_map_attender.insert(std::make_pair(pid, pid));
            return true;
        }
        return false;
    }

    And "bool COXEventManager::CheckIpAdr(DWORD pidm)" to:

    bool COXEventManager::CheckIpAdr(DWORD pidm)
    {
        LPCHARACTER pkMyChar = CHARACTER_MANAGER::instance().FindByPID(pidm);

        char pkMyChrIP[250];
        snprintf(pkMyChrIP, sizeof(pkMyChrIP), "%s", pkMyChar->GetDesc()->GetHostName());

        itertype(m_map_attender) iter = m_map_attender.begin();
        
        for (; iter != m_map_attender.end(); ++iter)
        {
            LPCHARACTER pkChar = CHARACTER_MANAGER::instance().FindByPID(iter->second);
            if(pkChar!=NULL)
            {
                char pkChrIP[250];
                snprintf(pkChrIP, sizeof(pkChrIP), "%s", pkChar->GetDesc()->GetHostName());
                if(!strcmp(pkMyChrIP, pkChrIP) && quest::CQuestManager::instance().GetEventFlag("oxevent_chk_ip") == 1 && pkChar->GetMapIndex() == OXEVENT_MAP_INDEX && pkMyChar->GetMapIndex() == OXEVENT_MAP_INDEX)
                {
                    pkMyChar->ChatPacket(CHAT_TYPE_INFO, "Multi IP detected!");
                    sys_err("COXEventManager Multi IP detected %s",pkMyChar->GetName());
                    BYTE bEmpire = pkMyChar->GetEmpire();
                    pkMyChar->WarpSet( g_start_position[bEmpire][0], g_start_position[bEmpire][1] );
                    return false;
                }
            }
        }
        return true;
    }

    Regards

    You shouldn't follow the long way and Koray too.

    Open OXEvent.h, find GetAttenderCount() and add those things under that line.

    	// Ox-event IP-Checker
    	public:
    		bool CheckIpAddress(LPCHARACTER ch);
    		void RemoveFromAttenderList(DWORD dwPID);

     

    Open OXEvent.cpp, add those lines after COxEventManager::LogWinner()

    bool COXEventManager::CheckIpAddress(LPCHARACTER ch)
    {
    	for (itertype(m_map_attender) it = m_map_attender.begin(); it != m_map_attender.end(); ++it)
    	{
    		LPCHARACTER tch = CHARACTER_MANAGER::Instance().FindByPID(it->second);
    		if (!tch || !tch->GetDesc())
    			continue;
    
    		if (!strcmp(ch->GetDesc()->GetHostName(), tch->GetDesc()->GetHostName()) && ch->GetMapIndex() == tch->GetMapIndex())
    		{
    			LogManager::Instance().HackLog("MULTI_IP_OX", ch);
    			ch->GoHome();
    			return false;
    		}
    	}
    
    	return true;
    }
    
    
    void COXEventManager::RemoveFromAttenderList(DWORD dwPID)
    {
    	m_map_attender.erase(dwPID);
    }

     

    bool COXEventManager::EnterAttender(LPCHARACTER pkChar)
    {
    	DWORD pid = pkChar->GetPlayerID();
    	
    	if (CheckIpAddress(pkChar))
    	{
    		m_map_char.insert(std::make_pair(pid, pid));
    		m_map_attender.insert(std::make_pair(pid, pid));
    		return true;
    	}
    
    	return false;
    }

     

    char.cpp

    	if (GetMapIndex() == OXEVENT_MAP_INDEX)
    		COXEventManager::Instance().RemoveFromAttenderList(GetPlayerID());

     

    Best Regards

    Ken

    • Love 4
  2. @ds_aim

    At first, you're really out of your mind with visual studio 2015. The best method to find the error is put breakpoint all the time. You just need to attach your process into visual studio, put your breakpoint and test the header.

    Wireshark is not the one program for packet analyze.

    https://en.wikipedia.org/wiki/Packet_analyzer - Here is a list for everyone.

    @bumxd

    The problem is not about the header. The problem is about the struct of the header. If the server can't send the same size of the struct to the client, the client is always rejecting this and give the error to you.

    This problem is often see with the static packets.

    Best Regards

    Ken

  3. 38 minutes ago, bumxd said:

    HI,i need ask.. i can copy all content in packet.h (client)- to packet.h (game src)?.. and compile.. it will work?

    Spoiler

    7bxdGw.png

     

    At first, this method is totally wrong. You just need to check the static packets if you have any problem with unknown header.

    Best Regards

    Ken

  4. 10 minutes ago, ds_aim said:

    Or? Use cryptopp 5.6.3

    1

    Maybe you just need to make a compare between the old version and the newest version. I'm using the last version for my project too. However, don't think yourself like everyone. As I said, if you continue to remove everything when you get any error from the compiler, you must remove the programming world.

    Best Regards

    Ken

    • Love 2
  5. 2 minutes ago, ds_aim said:

    seckbloc.h

     

    delete CheckSize

    Try this. Also, if you plan to remove everything when you get any error from the compiler, you must remove the programming world.

    	static void CheckSize(size_t n)
    	{
    		if (n > ~size_t(0) / sizeof(T))
    			throw InvalidArgument("AllocatorBase: requested size would cause integer overflow");
    	}

     

    Kind Regards ~ Ken

    • Love 1
  6. 11 minutes ago, BackPlayer said:

    if srcItemVNum == player.GetItemIndex(dstSlotPos):
                if player.GetItemCount(dstSlotPos) < 200:
                    return TRUE

     
    if (player.GetItemIndex(dstSlotPos) == srcItemVNum and player.GetItemCount(dstSlotPos) < 200):
    	return True # Python 2.7 is using True & False                                                                                             

    We shouldn't rather the long way :)

    Kind Regards ~ Ken

    • Love 2
  7. CXi25uCVAAAvv5s.png
     
    Following in the footsteps of Twitter, Facebook and Google, Microsoft promises to notify users of its e-mail (Outlook) and cloud storage (OneDrive) services if government hackers may have targeted their accounts.
     
    The company already notifies users if an unauthorized person tries to access their Outlook or OneDrive accounts. But from now on, the company will also inform if it suspects government-sponsored hackers.
     

    Ex-Employee: Microsoft Didn't Notify When China Spied Tibetans Leaders

     
    The move could be taken in the wake of the claims made by Microsoft's former employees that several years ago Chinese government hacked into more than a thousand Hotmail email accounts of international leaders of Tibetan and Uighur minorities, but the company decided not to tell the victims, allowing the hackers to continue their campaign.
     
    Instead of alerting those leaders of the hacking attempts, Microsoft simply recommended them to change their passwords without disclosing the reason, after an internal debate in 2011, Reutersreported.
     
    However, Microsoft announced Wednesday that if the company strongly suspects that your account is being hijacked or targeted by hackers working in the interest of a nation-state, it will notify you via an email.
     
    Here's what Microsoft Vice President Scott Charney writes:
    "We're taking this additional step of specifically letting you know if we have evidence that the attacker may be 'state-sponsored' because it is likely that the attack could be more sophisticated or more sustained than attacks from cybercriminals and others. These notifications do not mean that Microsoft's own systems have in any way been compromised."
     
    Just last week, Yahoo promised to alert its users whom it suspected were being spied on by state-sponsored hackers. Other big tech companies including Twitter, Facebook and Google, had previously assured their users that they would notify them of any potential government spying.
     
    And now Microsoft is the latest company to join the list.
     

    Government: We'll Sue You if You Do That!

     
    This is a good news for Microsoft users, but it seems that the United Kingdom is not happy with this decision by all the major tech firms, because the country seeks access to personal communications in order to fight terrorism and protect national security.
     
    The UK government is pushing a new Investigatory Powers Bill that will take the bosses of any company that warns its users that security organizations, such as GCHQ (the Government Communications Headquarters), MI5 and MI6, are spying on them.
     
    Specifically, UK ministers want to make it a criminal offence for Twitter, Google and other tech firms under which they could face up to two years in prison.
  8. char * PyString_AsString2(PyObject * pObj)
    {
    	if (!pObj)
    #ifdef __cplusplus > 199711L
    		return nullptr;
    #else
    		return NULL;
    #endif
    	
    #ifdef __cplusplus > 199711L
    	char * pszResult2 = nullptr;
    #else
    	char * pszResult2 = NULL;
    #endif
    
    	PyObject * pNewObj = PyUnicode_AsUTF8String(pObj);
    	char * pszResult = PyBytes_AsString(pNewObj);
    	pszResult2 = strdup(pszResult);
    	Py_DecRef(pNewObj);
    
    	return pszResult2;
    }

    I didn't test it. I just encode it and tried to retrieve as PyBytes_AsString. If you want to be sure totally, you can check PyBytes_AsString. It's returning NULL (in the last version it's returning nullptr)

    Kind Regards ~ Ken

    • Love 1
  9.  

    	def DragonSoulGiveQuilification(self):
    		self.DRAGON_SOUL_IS_QUALIFIED = True
    		if (self.wndExpandedTaskBar): # Just call SetToolTipText If self.wndExpandedTaskbar is not None
    			self.wndExpandedTaskBar.SetToolTipText(uiTaskBar.ExpandedTaskBar.BUTTON_DRAGON_SOUL, uiScriptLocale.TASKBAR_DRAGON_SOUL)
    
     

    Kind Regards ~ Ken

    • Love 4
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.