Code Monkey home page Code Monkey logo

berserker's Issues

attribute error

Traceback (most recent call last):
File "HelloWorld.py", line 140, in
content2 = berserk(content=content, key=key)
File "HelloWorld.py", line 116, in berserk
Berserker(n1=False,_sparkle='''{content}''')""".strip().replace("n1",n_1.removeprefix("self.")).replace("n2",n_2.removeprefix("self.")).replace("n3",n_3.removeprefix("self.")).replace("n4",n_4.removeprefix("self.")).replace("n5",n_5).replace("n6",n_6).replace("n7",n_7).replace("n8",n_8).replace("n9",n_9.removeprefix("self.")).replace("n10",n_10.removeprefix("self.")).replace("n12",n_12.removeprefix("self."))
AttributeError: 'str' object has no attribute 'removeprefix'

help

when i input my python file and i press enter it closes

Simple way to deobfuscate

i make simple code to deobfuscate
check here : namdevel/bersekered

import os, sys, re
import subprocess
  
def write(file_name, data):
    f = open(file_name, "w")
    f.write(data)
    f.close()


if __name__ == "__main__":

    obf_file = "obfuscated.py"  # obfuscated file

    with open(obf_file) as code:
        data = code.read()
        
        s1 = re.search("if self.(.+?) in open", data).group(1)
        s1s = s1.replace("15", "12")
        s2 = re.findall("{(.+?)}", data)

        source = (
            data.replace(s1, s1s)
            .replace("{" + s2[0] + "}", "print")
            .replace(",{" + s2[1] + "}()", "")
        )
        write('tmpfile.py', source)
        subprocess.run(f"py tmpfile.py") # show real code in terminal
        os.unlink('tmpfile.py')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.