Giter Site home page Giter Site logo

windowsclipspy's Introduction

๐Ÿ‘“ Windows Clip Spy

Description

๐Ÿ’ป This is a terminal tool ๐Ÿ”ง which generates an executable to send your clipboard ๐Ÿ“‹ on each update to another machine โš™. Made with educational porpuses

Purpouse

๐Ÿ“– Learn

  • how to interact with Windows to start a programm on the OS init
  • get the clipboard on updates
  • create a simple terminal tool from scratch to generate executables
  • make golang background programs

Technologies used ๐Ÿ“˜

Golang (Go)

Pakages ๐Ÿ“ฆ:

  1. clipboard (Get the clipboard)
  2. go-autostart (Start on the Windows init)
  3. go-toml (Set and get config vars between the terminal tool and the final executable)

How to use it

Prerequisites :

  • go 1.18

Clone the repository ๐Ÿ“Ž

git clone https://github.com/PiterWeb/WindowsClipSpy
cd WindowsClipSpy

Install all the packages ๐Ÿ“‰

go mod install
go mod verify

Build the terminal tool ๐Ÿ‘ทโ€โ™‚๏ธ

go build .
# This will generate the tool on an executable at the root folder of the project

Use the tool ๐Ÿ”จ

Open the executable and introduce the config in the terminal that will appear

Listen for the clipboard on the url you specified ๐Ÿ”Š

I had prepare the code for the server with the go http package. This code should be runned on a different folder to work well.

// <otherfolder>/server.go

package  main

import (
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
)

const (
    Port = "8080"
    Host = "localhost"
)

func main() {
	fmt.Println("Server is running on port: ", Port)
	
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
	
		body, err  := ioutil.ReadAll(r.Body)
		
		if err !=  nil {
			log.Fatal(err)
		}
		
		fmt.Println(string(body))
	})
	
	http.ListenAndServe(Host+":"+Port, nil)
}

cd <otherfolder>
go mod init github.com/PiterWeb/WindowsClipSpy/server
go run server.go

windowsclipspy's People

Contributors

piterweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.