Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Fenrisus

    Hi guys, today I will tell you how you can protect C ++ code from reverse engineering. Just little trick based on const expr compile-time obfuscation. Everything in comments #pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <array> #include <iostream> #include <string> #pragma region Learning typedef uint32_t u32; typedef uint64_t u64; typedef unsigned char uchar; template<u32 S, u32 A = 16807UL, u32 C = 0UL, u32 M = (1UL << 31) - 1> struct LinearGenerator { static const u32 state = ((u64)S * A + C) % M; static const u32 value = state; typedef LinearGenerator<state> next; struct Split { // Leapfrog typedef LinearGenerator< state, A*A, 0, M> Gen1; typedef LinearGenerator<next::state, A*A, 0, M> Gen2; }; }; // Metafunction to get a particular index from generator template<u32 S, std::size_t index> struct Generate { static const uchar value = Generate<LinearGenerator<S>::state, index - 1>::value; }; template<u32 S> struct Generate<S, 0> { static const uchar value = static_cast<uchar> (LinearGenerator<S>::value); }; // List of indices template<std::size_t...> struct StList {}; // Concatenate template<typename TL, typename TR> struct Concat; template<std::size_t... SL, std::size_t... SR> struct Concat<StList<SL...>, StList<SR...>> { typedef StList<SL..., SR...> type; }; template<typename TL, typename TR> using Concat_t = typename Concat<TL, TR>::type; // Count from zero to n-1 template<size_t s> struct Count { typedef Concat_t<typename Count<s - 1>::type, StList<s - 1>> type; }; template<> struct Count<0> { typedef StList<> type; }; template<size_t s> using Count_t = typename Count<s>::type; // Get a scrambled character of a string template<u32 seed, std::size_t index, std::size_t N> constexpr uchar get_scrambled_char(const char(&a)[N]) { return static_cast<uchar>(a[index]) + Generate<seed, index>::value; } // Get a ciphertext from a plaintext string template<u32 seed, typename T> struct cipher_helper; template<u32 seed, std::size_t... SL> struct cipher_helper<seed, StList<SL...>> { static constexpr std::array<uchar, sizeof...(SL)> get_array(const char(&a)[sizeof...(SL)]) { return{ { get_scrambled_char<seed, SL>(a)... } }; } }; template<u32 seed, std::size_t N> constexpr std::array<uchar, N> get_cipher_text(const char(&a)[N]) { return cipher_helper<seed, Count_t<N>>::get_array(a); } // Get a noise sequence from a seed and string length template<u32 seed, typename T> struct noise_helper; template<u32 seed, std::size_t... SL> struct noise_helper<seed, StList<SL...>> { static constexpr std::array<uchar, sizeof...(SL)> get_array() { return{ { Generate<seed, SL>::value ... } }; } }; template<u32 seed, std::size_t N> constexpr std::array<uchar, N> get_key() { return noise_helper<seed, Count_t<N>>::get_array(); } /* // Get an unscrambled character of a string template<u32 seed, std::size_t index, std::size_t N> char get_unscrambled_char(const std::array<uchar, N> & a) { return static_cast<char> (a[index] - Generate<seed, index>::value); } */ // Metafunction to get the size of an array template<typename T> struct array_info; template <typename T, size_t N> struct array_info<T[N]> { typedef T type; enum { size = N }; }; template <typename T, size_t N> struct array_info<const T(&)[N]> : array_info<T[N]> {}; // Scramble a string template<u32 seed, std::size_t N> class obfuscated_string { private: std::array<uchar, N> cipher_text_; std::array<uchar, N> key_; public: explicit constexpr obfuscated_string(const char(&a)[N]) : cipher_text_(get_cipher_text<seed, N>(a)) , key_(get_key<seed, N>()) {} operator std::string() const { char plain_text[N]; for (volatile std::size_t i = 0; i < N; ++i) { volatile char temp = static_cast<char>(cipher_text_[i] - key_[i]); plain_text[i] = temp; } return std::string{ plain_text, plain_text + N }; } }; template<u32 seed, std::size_t N> std::ostream & operator<< (std::ostream & s, const obfuscated_string<seed, N> & str) { s << static_cast<std::string>(str); return s; } //compiletime Seed for random string obfuscation #define RNG_SEED ((__TIME__[7] - '0') * 1 + (__TIME__[6] - '0') * 10 + \ (__TIME__[4] - '0') * 60 + (__TIME__[3] - '0') * 600 + \ (__TIME__[1] - '0') * 3600 + (__TIME__[0] - '0') * 36000) + \ (__LINE__ * 100000) #define DECRYPTSTRING(STR) \ obfuscated_string<RNG_SEED, array_info<decltype(STR)>::size>{STR} #pragma endregion Well, now the usage: #include "stdafx.h" auto FooBar = DECRYPTSTRING("FWEFWEFWEFWefwehkdl2hei1o;eh23khdBlahBlahBlah"); int main() { std::cout << DECRYPTSTRING("You can use it like this also") << std::endl; std::getchar(); return 0; } This code obfuscate your string values just like VMProtect.DecryptString ("Foobar") does. Such technique can be used for protect constant string values like public RSA/XXTea/etc. keys, connection IP string or any other string values. It prevents simple reading such values via OllyDbg or IDAPro software. Works like a charm at Visual Studio 2015/2017 x86 Release builds. Enjoy
  3. Well here is my attempt so far if I figure it out i'll update this: package org.petina; import javafx.application.Application; import javafx.embed.swing.SwingNode; import javafx.event.EventHandler; import javafx.scene.*; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.stage.WindowEvent; import java.awt.Dimension; /** * * * @author smokey * * Date: Apr 21, 2019 * Time: 8:37:45 AM */ public class JavaFXTest extends Application { private ClientStub stub = new ClientStub(); @Override public void init() { stub.init(); stub.setSize(new Dimension(765, 503)); } @Override @SuppressWarnings("deprecation") public void start(Stage stage) { final SwingNode swingNode = new SwingNode(); swingNode.setContent(stub.getRootPane()); stage.setScene(new Scene(new Group(swingNode), 765, 503, Color.BLACK)); stage.setOnCloseRequest(new EventHandler<WindowEvent>() { @Override public void handle(WindowEvent t) { System.exit(0); } }); stage.setTitle("JaGeX"); stage.setResizable(false); stage.show(); } @Override public void stop() { stub.stop(); stub.destroy(); } public static void main(String[] args) { launch(args); } } ClientStub.java: package org.petina; import java.net.URL; import java.net.InetAddress; import org.petina.loader.SignLink; import org.petina.loader.client; /** * * * @author smokey * * Date: Apr 21, 2019 * Time: 2:40:44 PM */ public class ClientStub extends client { public ClientStub() { super(); try { SignLink.startpriv(InetAddress.getLocalHost()); } catch(Exception ex) { ex.printStackTrace(); } } @Override public URL getCodeBase() { try { return new URL("http://0.0.0.0:" + 43594); } catch (Exception ex) { ex.printStackTrace(); return super.getCodeBase(); } } public URL getDocumentBase() { return this.getCodeBase(); } public String getParameter(String key) { return ""; } } Anyone here have any experience with javafx? @Guruu?
  4. Vouch+ Quality art from this guy, fast and reliable. He also happens to be our gfx section mod
  5. Tater Pie

    Great guy, love his accent. Watched tons of his videos and he keeps you captivated from start to finish with loads of content and just smashes it. love your videos man keep up the good work!
  6. Tater Pie

    I love your accent! I checked out a few of your videos, pretty entertaining. You seem to get a lot of views too
  7. Tater Pie

    Swing is the API provided to effectively make GUI for your applications in Java. What is a GUI you ask? A GUI is a graphical user interface, simply put it's the frame around your application and all the features specifically attached to it that the user can interact with like buttons or a menu bar. In 317 clients the client was built to be embedded in a webpage so the main client is engineered to be an applet, and if the client is run in local mode its made to be embedded into a java.awt.Frame, this container is an older but still effective way of creating a GUI but its less manageable and outdated. To scrap the old frame theres a few things we need to do: Initialize the client as an applet so we can use that as a container Create a new JFrame instance to hold the client's applet container This is really simple, and has been made complicated by many a man over the years. It can be simply done by extending the client object and overriding its applet-based functions. Step 1: Step 2:
  8. Kai

    Welcome @kiwi Very glad to have you, hope to see you around and active
  9. Kai

    Not bad brother! I love my paint brush haha.
  10. Tater Pie

    Hello man! I am the tater pie, welcome to the community and nice to meet you. Maybe tell us a little about yourself?
  11. Tater Pie

    These were made for DopeScape: Models I made for my game: Paint brush I made for kai:
  12. kiwi

    Hey everyone, saw the post on /r/rsps :D
  13. Tater Pie

    I love it ! very professional looking. Thanks for sharing
  14. Nikolas

    Finally on spring break! :yay: Getting some more jobs and ill start showcasing more of my work. Here is my most recent logo I made for a server called 'Vanguard'
  15. Last week
  16. Logo's Animated Banners Client Backgrounds Threads Youtube Art
  17. Logo's Animated Banners Client Backgrounds Threads Youtube Art
  18. Nikolas

    RSPS COMMUNITY Designer Rank The Designer status is a rank that is given to those who have shown that they are proficient with the program that they use for designing, and are trusted designers in the community. These are the members who are always active in the Image Manipulation or Graphics Designer category of the forums and constantly posting feedback, and contributing to the section. Requirements In order for a application for an application to be sent out you must meet all of the following requirements: You must be good with the program you use, you should be a skilled designer. You must be active within the section and participating in any graphics design events. You must be a trusted member and have a clean history. (no scamming, no ripping, etc.) How To Get The Rank Once you have met every requirement on the list, you may contact Nikolas or another designer and an application will be sent out. After you have filled out your application, there will be a vote amongst the current designers of the community.
  19. Guruu

    Thanks brotha :) Actually the maps where done my partner and Project manager Mr Belfort :). He didn't add custom areas except for the home (which was made by omni for me during an unreleased project of mine :D ) I'll defiantly keep that noted. Do check us out on the discord :) I post my updates there first before i post on forums with a block of updates :)
  20. there is a maximum height set on images i'll remove it for ya Edit: i couldn't find the setting so i just resized it for you
  21. Tater Pie

    this is cool as fuck man these seem to be a bunch of custom areas you've made? amazing work guruu In the future you should edit your post and add the content to that in spoilers though instead of spamming up your post js this is very cool tho i might check it out sometime
  22. Guruu

    smooth deleting + cascading boxes
  23. Guruu

    Final edits of the day
  24. Guruu

    Mainly have been working on the Rewards Editor UI. I have completed tons of stuff. Includes new tooltip hovers automatically based on container size meaning lets say common has 2 items there will be 2 boxes with edit tooltips/menu actions and invisible spots in the container will be "add new" Also added some lazy proofing to the editor so i can click more to edit rewards rather than type as much theres a couple of others things being done in the back end to make sure everything works like handling noted item replacements and container selections etc.
  25. Guruu

    I enjoy your commentating voice. It feels energetic and engaging. Would love to have you do videos for me in the future
  26. Guruu

    Quest tabs are back, with functionality for (achievements, quests, infotab) Quest progress saving and same for achievement was all ported over including the systems to support them to work Spawned some more npcs in edgeville... New home was placed consists of a 2 and 1 half part home home stuff in place with banks obejcts/fishing etc working again. Quests (has proper click to view progress) with red strikes on completed parts etc. Our achievements will be listed in a way where we will be easily spread word of all new content and an idea of where it can be located! i originally had a drop editor and well basically i'm redoing it cause it was kinda messy before. This editor will basically be able to edit all rewards (drops/crates/ancient brothers rewards/future minigames) Mainly any reward that uses the style of (Uncommon, Common, rare, very rare, or/and specials) - credits to omni for the sexy design I will most likely be getting rid of empty boxes that are not being used + 1, so there will always only ever be 1 empty box available at the end of a list. This way i can also put a Pages options to switch pages if you decide to load more then 20 drops in the table. Since i do not want 20 more ids to be used for the container i decided pages would be best to reload the next 20 items. Should be cool
  1. Load more activity
×

Important Information

By using our forums or services as a guest you agree to our Terms of Service: Terms of Use Privacy Policy: Privacy Policy and Guidelines