Code Monkey home page Code Monkey logo

airshare's People

Contributors

ak5123 avatar mohanpierce99 avatar nandahkrishna avatar vladimyr 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airshare's Issues

Unable to install (pip and pipx)

ArchLinux

$ pipx install Airshare
Fatal error from pip prevented installation. Full pip output in file:
    .local/pipx/logs/cmd_2023-08-23_21.24.01_pip_errors.log
$ cat .local/pipx/logs/cmd_2023-08-23_21.24.01_pip_errors.log
PIP STDOUT
----------

PIP STDERR
----------
.local/pipx/venvs/airshare/bin/python: No module named pip

error while attempting to bind on address ('0.0.0.0', 87): permission denied

Airshare throws this error. Occurs on Arch Linux and Termux.
The error goes away when running as root, root as a requirement is not listed anywhere and should not be a requirement as I don't even have root access on my phone.
Changing the Port does not work

raceback (most recent call last):
  File "/usr/bin/airshare", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/airshare/cli.py", line 79, in main
    receive_server(code=code, port=port)
  File "/usr/lib/python3.8/site-packages/airshare/receiver.py", line 178, in receive_server
    loop.run_until_complete(site.start())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/lib/python3.8/site-packages/aiohttp/web_runner.py", line 100, in start
    self._server = await loop.create_server(  # type: ignore
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
    raise OSError(err.errno, 'error while attempting '
PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied


PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied

Just tried out Airshare, but ran into this error after a successful pip install.

command run: airshare name filename.png

error message:
Traceback (most recent call last):
File "/home/gleam/anaconda3/bin/airshare", line 10, in
sys.exit(main())
File "/home/gleam/anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/gleam/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/gleam/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/gleam/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/gleam/anaconda3/lib/python3.7/site-packages/airshare/cli.py", line 73, in main
send_server(code=code, file=files, port=port)
File "/home/gleam/anaconda3/lib/python3.7/site-packages/airshare/sender.py", line 216, in send_server
loop.run_until_complete(site.start())
File "/home/gleam/anaconda3/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "/home/gleam/anaconda3/lib/python3.7/site-packages/aiohttp/web_runner.py", line 104, in start
reuse_port=self._reuse_port)
File "/home/gleam/anaconda3/lib/python3.7/asyncio/base_events.py", line 1374, in create_server
% (sa, err.strerror.lower())) from None
PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied

setup:
pop os 20.04
conda 4.8.3

OSError: [Errno 28] No space left on device

I tried to use Airshare to share a folder, this folder is very large, about 10G, but I found that it will compress and cache on the C drive, my C drive can not accommodate the space and cause the storage overflow error, which makes me very annoyed , And I don’t know which folder on the C drive the compressed cache is placed in, so I have trouble deleting it.

Download does not work if filename contains comma

When I have the filename called a,b.mkv ("a comma b dot mkv") I noticed in the web browser the filename is not being shown and the filesize as NaN undefined. Also downloading the file does not work, Chrome shows the errors "ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION"

Screenshot from 2020-05-10 22-21-07
Screenshot from 2020-05-10 22-20-56

Add a password protection feature

Currently, Airshare doesn't have an added layer of security over the code. Adding a password feature would allow for an extra layer of security, especially when sending more sensitive information.

ConnectionResetError

  • [Y] Have you checked that there are no existing issues (open or closed) regarding the same bug?
  • [N] Have you filled out the issue template with all relevant details?

Describe the bug
The bug occurs when I select the Download button on the website being hosted prior to the visibility of the image. It apparently doesn't affect the usage of the software but the error message happens every time and I haven't done any further testing.

To Reproduce
Steps to reproduce the behavior:

  1. Run command airshare name image.extension (command I ran airshare diracspace arch.png).
  2. Got my phone and scanned the QR code.
  3. Redirected to web site
  4. Clicked Download button
  5. Saw the error in the log down below
  6. Still able to see the requested image

Expected behavior
Able to view the image without Connection Error showing.

Screenshots
website - imgbb
hosted file - imgbb
Complete log - gist

Desktop (please complete the following information):

  • OS: EndeavourOS Linux x86_64
  • Browser: Not used
  • Version: Not used

Smartphone (please complete the following information):

  • Device: iPhone Xr
  • OS: iOS15
  • Browser: DuckDuckGo and Safari (iOS 15)
  • Version: DuckDuckGo 7.64.10.0 and Safari (unable to determine, but iOS 15)

Additional context
Add any other context about the problem here.

airshare 0.1.6 release failed to build with py3.12

Trying to build 0.1.6 against python 3.12, but ran into the following build failure

  running build_ext
  building 'aiohttp._websocket' extension
  creating build/temp.macosx-13-arm64-cpython-312
  creating build/temp.macosx-13-arm64-cpython-312/aiohttp
  clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/opt/homebrew/Cellar/airshare/0.1.6_6/libexec/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c aiohttp/_websocket.c -o build/temp.macosx-13-arm64-cpython-312/aiohttp/_websocket.o
  aiohttp/_websocket.c:3042:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  aiohttp/_websocket.c:3097:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  aiohttp/_websocket.c:3238:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  aiohttp/_websocket.c:3293:55: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)x)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
  aiohttp/_websocket.c:3744:47: error: no member named 'ob_digit' in 'struct _longobject'
      const digit* digits = ((PyLongObject*)b)->ob_digit;
                            ~~~~~~~~~~~~~~~~~~  ^
  5 errors generated.
  error: command '/opt/homebrew/Library/Homebrew/shims/mac/super/clang' failed with exit code 1
  error: subprocess-exited-with-error

relates to Homebrew/homebrew-core#150467

Faster Downloads

The actual file transfer process can be speeded up using a relay server exposing multiple ports for file transfer.
Any thoughts on this?

If you have a VPN it uses that IP instead of the LAN IP

I have my lan with the segment 192.168.0.0/24 and i made a share in the host 192.168.0.3 but i have a VPN running because of home office with the segment 10.1.20.0/24.

So, when i make a share whith the VPN active for some reason it always uses the VPN IP instead of the one of my lan so it doesn't work in either my lan or the VPN (because of the firewall)

Interfaces

Test

I'm in windows 10 version 2004

CodeNotFoundError when attempting to receive

This tool looks really neat! I've been looking for something like this for a while. I'm having some difficulty getting started though. Something seems wrong with the name resolution on my machine but Avahi is installed and working.

asciicast

Traceback (most recent call last):
  File "/home/adam/.local/bin/airshare", line 11, in <module>
    sys.exit(main())
  File "/home/adam/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/adam/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/adam/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/adam/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/adam/.local/lib/python3.6/site-packages/airshare/cli.py", line 83, in main
    receive(code=code)
  File "/home/adam/.local/lib/python3.6/site-packages/airshare/receiver.py", line 102, in receive
    raise CodeNotFoundError(code)
airshare.exception.CodeNotFoundError: CodeNotFoundError: The Airshare `Psykosis.local` was not found!

OS: Ubuntu 18.04 x86_64
Kernel: 4.15.0-101-generic

Do you have any thoughts about whats going wrong?

Provide not minified HTML and JS

  • Have you checked that there are no existing issues (open or closed) regarding the same bug?
  • Have you filled out the issue template with all relevant details?

I use this tool and i like it, but i want to trust this tool. Please, provide not minimized HTML and JS files, to users can read the code.

Right now i can read python code in project and i trust it, but i can't be sure that your javascript is not spy on me.
As frontend expert i think that even if your frontend code will be 10Mb it's ok for any users of the project. But it is not ok when any opensource project does not provide source code for their frontend.

If you wish, you can minify the code on the fly, on server side.

Improve UI for browsers

  • Have you checked that there are no existing issues (open or closed) regarding the same bug?
  • Have you filled out the issue template with all relevant details?

I like to use this tool, but web UI are disgusting. On my mobile device text looks ridiculous small and progress bar absolutely useless. Let's improve it.

Changes that i suggest to

  • replace <meta name="Airshare Upload" content="width=device-width, initial-scale=1.0"> to a <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  • instead of one loader that just blink and inform users about nothing - render loading status in percents for each file. You may use javascript XMLHttpRequest API to implement it

Add tests for Airshare

We really need to add tests for Airshare, to ensure everything is working and well, good practices. Let's discuss over here and add tests, and also configure code coverage, CI, etc.

QR link has port number twice in url

I called the command airshare with the argument -p 8000 and when I scanned the QR code the link was http://ip:8000:8000. Running version 0.1.2.

Installation failure: `PIP.md` is missing

Installation fails due to missing PIP.md markdown file referenced inside setup.py:

with open("PIP.md", "r") as f:
    long_description = f.read()

I went to pypi.org and downloaded the latest source to verify its contents:

➜ curl -s https://files.pythonhosted.org/packages/a2/b3/2c8a666dbe4ac16447fd657f1f345d5833d890c96e94e6accfa32932a793/Airshare-0.1.4.tar.gz | tar tzf - | awk '{print $NF}'
Airshare-0.1.4/
Airshare-0.1.4/Airshare.egg-info/
Airshare-0.1.4/Airshare.egg-info/PKG-INFO
Airshare-0.1.4/Airshare.egg-info/SOURCES.txt
Airshare-0.1.4/Airshare.egg-info/dependency_links.txt
Airshare-0.1.4/Airshare.egg-info/entry_points.txt
Airshare-0.1.4/Airshare.egg-info/requires.txt
Airshare-0.1.4/Airshare.egg-info/top_level.txt
Airshare-0.1.4/MANIFEST.in
Airshare-0.1.4/PKG-INFO
Airshare-0.1.4/README.md
Airshare-0.1.4/airshare/
Airshare-0.1.4/airshare/__init__.py
Airshare-0.1.4/airshare/cli.py
Airshare-0.1.4/airshare/exception.py
Airshare-0.1.4/airshare/qrcode.py
Airshare-0.1.4/airshare/receiver.py
Airshare-0.1.4/airshare/sender.py
Airshare-0.1.4/airshare/static/
Airshare-0.1.4/airshare/static/download.html
Airshare-0.1.4/airshare/static/text.html
Airshare-0.1.4/airshare/static/upload.html
Airshare-0.1.4/airshare/utils.py
Airshare-0.1.4/setup.cfg
Airshare-0.1.4/setup.py

As you can see PIP.md is missing. Please publish a patch to PyPI with all required source files or at least ensure everything is there for upcoming versions.

How to run it

  • Have you checked that there are no existing issues (open or closed) regarding the same bug?

  • Have you filled out the issue template with all relevant details?

What is your question?
I would like to know how to run it I already ran pip install Airshare what should do I do after that

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.