Jump to content

Recommended Posts

  • Active+ Member

Hello comunity,

This is a API script for Metin2 - PHP version TCP to P2P Connection.
Thanks @ Gurgarath for explain how metin2 works ?

 

Screenshot-12.png

This is the hidden content, please

Alternative download links → 

This is the hidden content, please

  • Metin2 Dev 87
  • Eyes 3
  • Flame 1
  • Not Good 1
  • Think 1
  • Good 18
  • Love 3
  • Love 45
Link to comment
https://metin2.dev/topic/32209-metin2api-php-script-mutulic/
Share on other sites

  • 2 weeks later...
On 2/20/2024 at 12:40 PM, Mutulic said:

Hello comunity,

This is a API script for Metin2 - PHP version TCP to P2P Connection.
Thanks @ Gurgarath for explain how metin2 works ?

 

Screenshot-12.png

This is the hidden content, please

Alternative download links → 

This is the hidden content, please

 

Thanks bro

one question, It is possible to add more server-side functions to Metin?

  • Good 1
  • Active+ Member
8 hours ago, leunam0830 said:

 

Thanks bro

one question, It is possible to add more server-side functions to Metin?

Sure, you can add by game source and using my php code to access it

Hi, i changed the details but it keeps loading. Which port this script uses? i use martysama files.

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

  • Active+ Member
5 hours ago, Jimmermania said:

Hi, i changed the details but it keeps loading. Which port this script uses? i use martysama files.

i'm not sure, i think 13000 or 13001

18 hours ago, Mutulic said:

i'm not sure, i think 13000 or 13001

No it doesnt work. Which port should be there? auth or ch1 ?

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

  • 5 months later...

Hardcoded Credentials:

Storing sensitive information like $password directly in the code is risky. If the file is exposed due to a misconfiguration, anyone can see and use your password.

Recommendation: Store sensitive data outside of your web root, or use environment variables for better security.

Input Validation and Sanitization:

User inputs (playername, playernamemute, and notice) are directly used in socket commands without any validation or sanitization, leading to potential command injection attacks.

Recommendation: Implement input validation, ensuring that user inputs are properly sanitized and conform to expected formats.

Error Handling:

The code exits on errors without proper handling, potentially exposing the server environment or command errors to the user.

Recommendation: Use proper error handling mechanisms (like logging errors) instead of abruptly terminating script execution.

Command Injection Risk:

Users can inject unwanted commands by manipulating the input fields.

Recommendation: Validate commands against a whitelist of allowed commands or use prepared statements if applicable.

CSRF Vulnerability:

The form submissions are susceptible to Cross-Site Request Forgery (CSRF) attacks.

Recommendation: Implement CSRF tokens in form submissions.

Socket Communication Exposure:

If the socket communication is exposed without proper security measures, such as encryption (TLS/SSL), sensitive information can be intercepted.

Recommendation: Consider implementing secure communication channels (like SSL) for socket connections.

  • Not Good 1
  • 1 month later...
  • Active Member
On 3/6/2024 at 6:21 PM, Jimmermania said:

Hi, i changed the details but it keeps loading. Which port this script uses? i use martysama files.

It should be auth port, but there are two things, which needs to be changed:
ADMINPAGE_IP: 
ADMINPAGE_PASSWORD: 

Because in code is protection against flood:

Spoiler
#ifdef ENABLE_PORT_SECURITY
    if (strcmp(inet_ntoa(peer.sin_addr), "127.0.0.1")) // refuse if remote host != localhost (only the same machine must be able to connect in here)
    {
        sys_log(0, "BLOCK CONNECTION FROM %s", inet_ntoa(peer.sin_addr));
        Destroy();
        return false;
    }
#endif

I'll be always helpful!  😉

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

×
×
  • 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.