Skip to content

share any data in any size and any format through ip and port technology on same network

License

Notifications You must be signed in to change notification settings

Farzinkh/sockettool

Repository files navigation

sockettool

Share any data in any size and any format through ip and port technology on same network you can replace any mp3 music by alarm.mp3 just remember ro rename it to alarm.mp3

Installation

git clone https://github.com/Farzinkh/sockettool.git

now go to sockettool directory and create virtual environment.

python -m venv <name>

source your virtual environment and run

pip install -r requirements.txt

Config

this application is secured by DES in default config but you can simply change it to AES or turn off encrypting,whatever you decide to do remember to do it in same way at the other side and also if you choose to encrypt you have to share your encrypt file(.bin) manually and use -key <address_of_key> in client side.

Usage

you can use graphical version or non graphical version as you wish for useing graphical version just run

python sockettool\Hotspot.py in the project directory

and for useing non graphical version run

python sockettool\Hotspot_terminal.py -h

there are two folder in the project directory which are "SEND" & "DATA" what ever you want to send just put it in "SEND" directory and what ever you download will be found in "DATA" directory

also you can make executable versions by pyinstaller

pip install auto-py-to-exe and run auto-py-to-exe

Example for non graphical version

in receiver part run :

python sockettool\Hotspot_terminal.py s

read the server ip and port and keep them in mind or in client side in same network just run python Hotspot_terminal.py scan

and in sender part place a file or files in SEND folder and run this:

python sockettool\Hotspot_terminal.py c -ip <reciver ip> -p <server port>

and wait for finish you can always cancel it by ctrl+C

Android Usage

for running this project an android devices you need to install some aplicatons and follow this steps:

  1. install Termux

  2. install port forwarder

  3. install python in termux:

  • pkg install python
  1. go to your your internal storage directory
  • cd storage/shared
  1. create a folder and cd to it

  2. download project

  • git clone https://github.com/Farzinkh/sockettool
  1. install packages
  • pip install tqdm==4.59.0 psutil==5.8.0
  1. port forwarding when ever you want to send or recive a file run server side script on other device
  • python sockettool\Hotspot_terminal.py s

  • and keep in mind ip and port and insert them in portforwarding aplication in android device then run sender side in termux

  • python sockettool\Hotspot_terminal.py c -ip <reciver ip> -p <server port>

Docker Usage

you can use this tool to update docker image to new image

At first you need an python image for example python=3.7.9

docker pull python:3.7.9 => optional

then follow the instruction :

  1. docker run -it --network host --name update image bash

  2. git clone https://github.com/Farzinkh/sockettool

  3. cd sockettool

  4. pip install -r requirements.txt

  5. python Hotspot_terminal.py s -p 65432

  • Downloaded files will be accessible in DATA folder move it to whereever you want
  • For sending files just place them in SEND folder
  1. exit

  2. docker commit update new_image_name

Enjoy :)

You can find me on Twitter or on LinkedIn

About

share any data in any size and any format through ip and port technology on same network

Resources

License

Stars

Watchers

Forks

Packages

No packages published