Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 14:01

  • Please register to post and access all features, it's quick, easy and FREE!

 

rappelz page 4(0xf0, 6)

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 98
Received Thanks: 0
rappelz page 4(0xf0, 6)

rappelz page 4(0xf0, 6)

http://i.imgur.com/Ale7LT2.png



kubed is offline  
Old   #2
 
elite*gold: 0
Join Date: Jul 2015
Posts: 204
Received Thanks: 220
SFrame was started with improper bypass variables, you must attach them prior to launch.

1) create new ProcessStartInfo, give it filename (SFrame.exe for example)
2) give the new ProcessStartInfo proper arguments (SFrame arguments)
3) assign EnvironmentVariable SFrame.exe_PARENT: = "Launcher.exe" to created ProcessStartInfo
4) create a win32 event handle (IntPtr) by using win32 dll to access 'CreateEvent' function, assign the returned handle to EnvironmentVariable: SFrame.exe_RUNNER = returnedHandle.ToString() to created ProcessStartInfo
5) start the sframe using Process.Start(yourProcessStartInfo)
6) use 'WaitForSingleObject' to wait for event to be triggered by SFrame.exe


SilentWisdom is offline  
Old   #3
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
or use a tool to do that for you if you don't dev anything
glandu2 is offline  
Thanks
1 User
Old   #4
 
elite*gold: 0
Join Date: Jun 2015
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by SilentWisdom View Post
SFrame was started with improper bypass variables, you must attach them prior to launch.

1) create new ProcessStartInfo, give it filename (SFrame.exe for example)
2) give the new ProcessStartInfo proper arguments (SFrame arguments)
3) assign EnvironmentVariable SFrame.exe_PARENT: = "Launcher.exe" to created ProcessStartInfo
4) create a win32 event handle (IntPtr) by using win32 dll to access 'CreateEvent' function, assign the returned handle to EnvironmentVariable: SFrame.exe_RUNNER = returnedHandle.ToString() to created ProcessStartInfo
5) start the sframe using Process.Start(yourProcessStartInfo)
6) use 'WaitForSingleObject' to wait for event to be triggered by SFrame.exe
A while ago I made my own launcher using this method, and it works like a charm on Windows 7. However, on Windows 8.1 it keeps throwing a Page 4(0x40, 6) error. Any idea what's causing it?


Enikusu is offline  
Old   #5
 
elite*gold: 0
Join Date: Jul 2015
Posts: 204
Received Thanks: 220
Quote:
Originally Posted by Enikusu View Post
A while ago I made my own launcher using this method, and it works like a charm on Windows 7. However, on Windows 8.1 it keeps throwing a Page 4(0x40, 6) error. Any idea what's causing it?
Windows 8 may have a different method of setting/reading environmental variables, I'mma let Glandu2 have this one. But I have seen that error when first building my bypass when I wasn't setting the EventHandle correctly to SFrame.exe_RUNNER = EventHandle


You can try my code:

Code:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Handle = System.IntPtr;

namespace Launcher.Functions
{
    [StructLayout(LayoutKind.Sequential)]
    public struct SECURITY_ATTRIBUTES
    {
        public int nLength;
        public IntPtr lpSecurityDescriptor;
        public int bInheritHandle;
    }

    /// <summary>
    /// Allows the Launcher to fool the 8.1+ SFrame into believing a 'Retail' Launcher has launched it.
    /// Special thanks to xXExiledXx for making me aware that I should work on this for the Portal project
    /// also many thanks to Glandu2 for letting me pummel him with questions and even providing a great example to work 
    /// with
    /// </summary>
    public class SFrameBypass
    {
        private static IntPtr _Handle;
        private static IntPtr _Attributes = IntPtr.Zero;

        [DllImport("Kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Auto)]
        static extern Handle CreateEvent(ref SECURITY_ATTRIBUTES lpEventAttributes, [In, MarshalAs(UnmanagedType.Bool)] bool bManualReset, [In, MarshalAs(UnmanagedType.Bool)] bool bIntialState, [In, MarshalAs(UnmanagedType.BStr)] string lpName);

        [DllImport("kernel32.dll", SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        static extern bool CloseHandle(IntPtr hObject);

        [DllImport("kernel32", SetLastError = true, ExactSpelling = true)]
        internal static extern Int32 WaitForSingleObject(IntPtr handle, Int32 milliseconds);

        /// <summary>
        /// Creates a windows event and returns the EventID (IntPtr) in string for
        /// </summary>
        public static string EventHandle
        {
            get { return CreateEventHandle().ToString(); }
        }

        /// <summary>
        /// Creates an event that the SFrame will be listening for and returns it's specific Event-ID to be attached to the SFrame.exe as
        /// an environmental variable
        /// </summary>
        /// <returns>IntPtr representing the EventID</returns>
        static Handle CreateEventHandle()
        {
            SECURITY_ATTRIBUTES securityAttrib = new SECURITY_ATTRIBUTES();

            securityAttrib.bInheritHandle = 1;
            securityAttrib.lpSecurityDescriptor = IntPtr.Zero;
            securityAttrib.nLength = Marshal.SizeOf(typeof(SECURITY_ATTRIBUTES));

            _Handle = CreateEvent(ref securityAttrib, false, false, String.Empty);
            return _Handle;
        }

        /// <summary>
        /// Wait for the event to signal to a maximum period of TimeoutInSecs total seconds.
        /// Returns true if the event signaled, false if timeout occurred.
        /// </summary>
        static bool Wait(int TimeoutInSecs)
        {
            int rc = WaitForSingleObject(_Handle, TimeoutInSecs * 1000);
            CloseHandle(_Handle);
            return rc == 0;
        }

        /// <summary>
        /// Launches the SFrame without the need of outside exe or libraries by Creating a Windows-Event and the proper EnvironmentVariables
        /// that the SFrame will check for.
        /// </summary>
        /// <param name="waitTime">Time the Launcher should wait for SFrame to trigger the Windows-Event</param>
        /// <param name="arguments">Start arguments needed to launch the SFrame</param>
        /// <returns>bool value indicating success or failure</returns>
        static public bool Start(int waitTime, string arguments)
        {
            var p = new ProcessStartInfo();
            p.FileName = "SFrame.exe";
            p.Arguments = arguments;
            p.EnvironmentVariables["SFrame.exe_PARENT"] = "Launcher.exe";
            p.EnvironmentVariables["SFrame.exe_RUNNER"] = EventHandle;
            p.UseShellExecute = false;
            Process.Start(p);

            return (Wait(waitTime)) ? true : false;
        }
    }
}
SilentWisdom is offline  
Thanks
1 User
Old   #6
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
Quote:
Originally Posted by Enikusu View Post
A while ago I made my own launcher using this method, and it works like a charm on Windows 7. However, on Windows 8.1 it keeps throwing a Page 4(0x40, 6) error. Any idea what's causing it?
Just for ones that wonder about this Page 4 error:
Page 4 errors (the number, 0x40 for you, is ORed between several values):
0x02 = no SFrame.exe_PARENT environment variable
0x04 = "Gala Lab Corp." signer of launcher invalid (not sure)
0x08 = "Gala Lab Corp." signer of sframe invalid (not sure)
0x10 = no SFrame.exe_RUNNER environment variable
0x20 = SFrame.exe_RUNNER is not a number or is 0
0x40 = SFrame.exe_RUNNER is not a event handle (SetEvent failed)
0x80 = SFrame.exe_RUNNER is not a closable handle (CloseHandle failed)

The last number (6 for you) is the windows error value (retrieved with GetLastError). 6 means ERROR_INVALID_HANDLE.

Do you start your launcher with administrator rights ?
Do you use CreateEvent function to set the value of SFrame.exe_RUNNER ?
Do you use WaitForSingleObject in your launcher on the handle created by CreateEvent (after having started SFrame) ?
glandu2 is offline  
Thanks
3 Users
Old   #7
 
elite*gold: 0
Join Date: Jun 2015
Posts: 3
Received Thanks: 0
Thank you SilentWisdom and glandu2 for your help.

The problem was an improper usage of the CreateEvent method (I was using an IntPtr for the first argument, instead of a SECURITY_ATTRIBUTES structure). Also, I wasn't using CloseHandle after calling WaitForSingleObject.

My experience with kernel32.dll functions is extremely limited. I still have much to learn

Thank you again!


Enikusu is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Rappelz pvp register page script help please
hi , I need to the rappelz registration script :)
1 Replies - Rappelz Private Server
I need rappelz web page script (panel)
I need rappelz web page script , please help me.
1 Replies - Rappelz Private Server
I need help on the registration page Rappelz
I need help on the registration page Rappelz Php files I need anyone help me:handsdown:
0 Replies - Say Hello



All times are GMT +2. The time now is 14:01.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.