Giter VIP home page Giter VIP logo

lancer's People

Contributors

ehamiter avatar fandreuz avatar leviborodenko avatar wilberforce314 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

lancer's Issues

Unicode Encode Error

This is the error I keep getting

UnicodeEncodeError: 'charmap' codec can't encode character '\u0399' in position 54: character maps to

Lancer is working for me with simpler programs but breaks and gives me the error on more complex programs
And the example program does not even work it just gives me the error

here is the example I tried

-- start of program --

function that adds two numbers

def addition(a: int, b: int) -> int:

# find sum
result = a + b

# return the sum
return result

if name == 'main':
print("Sum of 1 and 3 is %s" % addition(1, 3))

-- end of program --

I'm using python 3.9.7
and running it on windows 10

Big issue

Why is lancer source code not lancer'ed???

Lancer not working and having a UnicodeEncode error

If I run lancer on any of my projects with the normal lance -f .\somthing.py It just prints out:
UnicodeEncodeError: 'charmap' codec can't encode characters in position 602-603: character maps to <undefined>
Anyone got a solution for that?

SFW comments

Hi!

I'd love to use this tool to obfuscate some challenges I'm working on, and I'd love to have comments too.
However, every time I tried to obfuscate with comments, most lyrics had NSFW vibes that I don't think would fit the academic environment.

Any chance you could create an SFW flag when 'lancing' files? Thank you so much!

Limitations?

It would be helpful for the readme to specify limitations.
For example I tried lance on the following example program and it broke it:

class Solution:
    def part1(self):
        print("AOC 1 Part 1")
    def part2(self):
        print("AOC 1 Part 2")

sol = Solution()
for i in [1, 2]:
    getattr(sol, f"part{i}")()

Lancing of boolean default value in function header

When trying to lance lancer itself I stumbled upon following output:

def snarl_Il11l1 (chirp_chirp_chirp_aααaa :Path ="./file.py",roar_αaaαa :bool =hoot_IIΙΙIΙ ):

which was generated from line 69 (nice) in src/lancer/entry.py:

def lance(file : Path = "./file.py", yolo : bool = False):

Here, the default value of the argument yolo=False was lanced which breaks the code.

The unicode normalization step of the python interpreter can be abused

Basically the suggesion in this reddit comment

From this article:

Python always applies NFKC
normalization to characters. Therefore, two distinct characters may actually
produce the same variable name. For example:

>>> ª = 1 # FEMININE ORDINAL INDICATOR
>>> a # LATIN SMALL LETTER A (i.e., ASCII lowercase 'a')
1

I've generated a mapping of these characters taken from this url.
The mapping can be found here. But beware that some characters may not be supported in python because I haven't tested every one of them.

I suggest adding another additional flag to enable this behaviour

I would have done it myself and opened a pr but I am too busy at the moment

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.