Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

quickbms rotor

Featured Replies

  • Author
  • Localization

chrrox, posted Sun Jun 09, 2019 2:35 pm (48616)


I see in the read me of quickbms supports rotor encryption how would I translate this into quickbms.
Code:
import marshal
import zlib

def init_rotor():
    asdf_dn = 'j2h56ogodh3se'
    asdf_dt = '=dziaq.'
    asdf_df = '|os=5v7!"-234'
    asdf_tm = asdf_dn * 4 (asdf_dt asdf_dn asdf_df) * 5 '!' '#' asdf_dt * 7 asdf_df * 2 '*' '&' "'"
    import rotor
    rot = rotor.newrotor(asdf_tm)
    return rot


def _reverse_string(s):
    l = list(s)
    l = map(lambda x: chr(ord(x) ^ 154), l[0:128]) l[128:]
    l.reverse()
    return ''.join(l)


class NpkImporter(object):
    rotor = init_rotor()
    ext = '.nxs'

    def __init__(self, path):
        self._path = path

    def find_module(self, fullname, path = None):
        import C_file
        if path is None:
            path = self._path
        fullname = fullname.replace('.', '/')
        pkg_name = fullname '/__init__' NpkImporter.ext
        if C_file.find_file(pkg_name, path):
            return self
        else:
            fullname = NpkImporter.ext
            if C_file.find_file(fullname, path):
                return self
            return

    def load_module(self, fullname):
        import C_file
        is_pkg = True
        mod_path = fullname.replace('.', '/') '/__init__'
        mod_name = fullname
        if not C_file.find_file(mod_path NpkImporter.ext, self._path):
            is_pkg = False
            mod_path = fullname.replace('.', '/')
            mod_name = fullname
        data = C_file.get_file(mod_path NpkImporter.ext, self._path)
        data = NpkImporter.rotor.decrypt(data)
        data = zlib.decompress(data)
        data = _reverse_string(data)
        data = marshal.loads(data)
        path = None
        if is_pkg:
            path = [self._path]
        m = C_file.new_module(mod_name, data, path)
        return m


import sys
sys.path_hooks.append(NpkImporter)
  • Author
  • Localization

aluigi, posted Mon Jun 10, 2019 4:13 pm (48643)


QuickBMS uses the rotor implementation available in Python.

rotorobj_new(int num_rotors, char *key, int keysz)

Where num_rotors is 12 by default and can be set with ivec.

As far as I can see you only need to use asdf_tm as key and that's all.
Code:
encryption rotor "j2h56ogodh3sej2h56ogodh3sej2h56ogodh3sej2h56ogodh3se=dziaq.j2h56ogodh3se|os=5v7!\"-234=dziaq.j2h56ogodh3se|os=5v7!\"-234=dziaq.j2h56ogodh3se|os=5v7!\"-234=dziaq.j2h56ogodh3se|os=5v7!\"-234=dziaq.j2h56ogodh3se|os=5v7!\"-234!#=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.|os=5v7!\"-234|os=5v7!\"-234*&'"
comtype zlib_noerror
get SIZE asize
clog "dump.dat" 0 SIZE SIZE

Probably it's better to use just Log instead of CLog the first time for testing.
  • Author
  • Localization

chrrox, posted Mon Jun 10, 2019 6:00 pm (48653)


The rotor works in python I can't get it to work in quickbms.
i tried putting the key directly in quickbms but it gives an error.
Code:
j2h56ogodh3sej2h56ogodh3sej2h56ogodh3sej2h56ogodh3se=dziaq.j2h56ogodh3se|os=5v7!"-234=dziaq.j2h56ogodh3se|os=5v7!"-234=dziaq.j2h56ogodh3se|os=5v7!"-234=dziaq.j2h56ogodh3se|os=5v7!"-234=dziaq.j2h56ogodh3se|os=5v7!"-234!#=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.=dziaq.|os=5v7!"-234|os=5v7!"-234*&\'
  • Author
  • Localization

aluigi, posted Mon Jun 10, 2019 7:57 pm (48657)


Set the ivec to 6 and it will work.

Apparently the default rotor_number is 6 instead of 12... mah, I'm sure it was 12 in the past.
I will update it in the next version since it's confirmed to be 6 in the docs
  • Author
  • Localization

chrrox, posted Tue Jun 11, 2019 2:16 am (48668)


That worked is there a way to reverse a file it needs to be reversed.
  • Author
  • Localization

aluigi, posted Tue Jun 11, 2019 8:51 am (48671)


Encryption reverse ""
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.