Giter Site home page Giter Site logo

wh1t3-e4gl3 / white-obfuscate Goto Github PK

View Code? Open in Web Editor NEW
23.0 2.0 2.0 84 KB

This is a tool to obfuscate / to make your python code unreadable. It obfuscates your code and prevents easy access of others to your code.

Python 100.00%
code-obfuscator crypter encoder encrypt obfuscate obfuscate-code obfuscate-scripts obfuscator python-encryptor python-obfuscate

white-obfuscate's Introduction

Typing SVG

"I will not post any high level/complicated and explict programs or content here because all the contents in my account is intended simply for educational purpose only and the aim is every one will understand the scripts i post so i tried to keep it simple as much as i can and provide explanation of each code. each of them will be simple implementations, so that everyone can understand the aspects."

WH1T3-E4GL3 TryHackMe


GitHub Streak

ย WH1T3-E4GL3

  • ๐Ÿ‘‹ Hi, Iโ€™m Sethu Satheesh
  • ๐Ÿ‘€ Iโ€™m interested in ethical hacking
  • ๐ŸŒฑ Iโ€™m currently learning a lot of things๐Ÿฅต
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on google๐Ÿคญ
  • ๐Ÿ“ซ How to reach me : https://www.instagram.com/whxitte (Instagram me [Not for any hacking services])

white-obfuscate's People

Contributors

wh1t3-e4gl3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

white-obfuscate's Issues

here is the source code lol

import sys
import random
import logging

yellow = '\033[93m'
lgreen = '\033[92m'
clear  = '\033[0m'
bold   = '\033[01m'
cyan   = '\033[96m'
red    = "\033[91m"

logging.basicConfig(level=logging.INFO)

__banner__ = yellow+"""
\t
+-------------------------------------------------------------------+
โ”‚                                                                   โ”‚ 
โ”‚  โ–ˆ โ–ˆ โ–ˆ โ–ˆโ–„โ–ˆ โ–€โ–ˆโ–€ โ–€โ–ˆโ–€ โ–ˆโ–€โ–€   โ–ˆโ–€โ–ˆ โ–ˆโ–„โ–„ โ–ˆโ–€โ–€ โ–ˆ โ–ˆ โ–ˆโ–€โ–€ โ–ˆโ–€โ–€ โ–„โ–€โ–„ โ–€โ–ˆโ–€ โ–ˆโ–€โ–€      โ”‚
โ”‚  โ–€โ–„โ–€โ–„โ–€ โ–ˆ โ–ˆ โ–„โ–ˆโ–„  โ–ˆ  โ–ˆโ–ˆโ–„   โ–ˆโ–„โ–ˆ โ–ˆโ–„โ–ˆ โ–ˆโ–€  โ–ˆโ–„โ–ˆ โ–„โ–ˆโ–ˆ โ–ˆโ–„โ–„ โ–ˆโ–€โ–ˆ  โ–ˆ  โ–ˆโ–ˆโ–„      โ”‚
โ”‚                                                                   โ”‚
โ”‚ ๐—”๐˜‚๐˜๐—ต๐—ผ๐—ฟ : ๐˜„๐—ต๐—ถ๐˜๐—ฒ ๐—ฒ๐—ฎ๐—ด๐—น๐—ฒ       ๐—ง๐—ฒ๐—น๐—ฒ๐—ด๐—ฟ๐—ฎ๐—บ : ๐—ต๐˜๐˜๐—ฝ๐˜€://๐˜.๐—บ๐—ฒ/๐—ž๐—ฎ_๐—ž๐˜€๐—›๐—ถ_๐—›๐—ฎ๐—ง๐—ฎ๐—ž๐—ฒ 
โ”‚                                                                   โ”‚
+-------------------------------------------------------------------+

\n"""+clear


def main(files, string):
    s = open(files).read()
    z = []
    for i in s:
        z.append(ord(i))
    pea = []
    for i in z:
        pea.append(string.replace("'", "").replace('"', '')*i)
    file = """
# coding=utf-8
# obfuscated with white obfuscate : https://github.com/WH1T3-E4GL3/white-obfuscate



d={};exec("".join([chr(len(i)) for i in d]))
        """.format(pea)
    open(files.replace(".py", "encypt.py"), "w").write(file)
    logging.info(" saved as "+files.replace(".py", "encrypt.py"))


try:
    print(__banner__)
    logging.info(" obfuscating "+sys.argv[1]+"....")
    main(sys.argv[1], sys.argv[2])
except:
    print("""+-------------------------------------------------------------------+
    """)
    print(red+"""[ERROR!]
    """+clear, end=' ')
    print("""
Usage   : python white-obsf.py <filename> 'string'

Example : python white-obfs.py pythoncode.py '#' 


This will modify your full python script with '+' symbol.
""")
    print("""+-------------------------------------------------------------------+""

lol

Update

  1. Make the code be compressed with zlib so that the output file is a bit smaller.
  2. Make it a little bit harder to debofuscate by using confusion techniques or something like that I dont know what it's called because you only need to replace (exec) with (print) to get the source code

Deleted dependency detected

I'm a Cyber Security researcher and developer of PackjGuard [1] to address open-source software supply chain attacks.

Issue

During my research, I found that this repo is vulnerable to attack due to deleted dependency from the public PyPI registry.

Details

Specifically, file https://github.com/WH1T3-E4GL3/white-obfuscate/blob/a850ef93e43bf72267add6576ff7f6aff8ec2b13/requirements.txt lists sinchsms as one of the dependencies. However, it has been deleted from public PyPI. As such, an external bad actor can claim that name and register a malicious package, which will be then installed with pip install command, resulting in arbitrary remote code execution.

Impact

Not only your apps/services using https://github.com/WH1T3-E4GL3/white-obfuscate repo code are vulnerable to this attack, but the users of your open-source Github repo could also fall victim.

You could read more about such attacks here: https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610

Remediation

Please manually register a placeholder sinchsms package on PyPI immediately or remove sinchsms dependency from https://github.com/WH1T3-E4GL3/white-obfuscate/blob/a850ef93e43bf72267add6576ff7f6aff8ec2b13/requirements.txt to fix this vulnerability.

To automatically fix such issues in future, please install PackjGuard Github app [1].

Thanks!

  1. PackjGuard is a Github app that monitors your repos 24x7, detects vulnerable/malicious/risky open-source dependencies, and creates pull requests for auto remediation: https://github.com/marketplace/packjguard

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.