Giter Club home page Giter Club logo

pacanimal / clipwriter Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 1.0 13 KB

A PowerShell script that writes your current clipboard content (text or files) as keyboard input, used to transfer files, scripts and other data through VPN clients and other remote connections when the usual methods of file transfer are not available

License: GNU General Public License v2.0

PowerShell 100.00%
clipboard powershell vpn anyconnect remote-desktop teamviewer

clipwriter's Introduction

ClipWriter

A PowerShell script that writes your current clipboard content (text or files) as keyboard input, used to transfer files, scripts and other data through VPN clients and other remote connections when the usual methods of file transfer, including regular clipboard pasting, are not available

How to use it

  1. Copy some text, or one or more files and directories

  2. If you copied text, make sure you have a window ready in which ClipWriter should type what you copied.

    If you copied files, make sure you have an open PowerShell window, or an editor for ClipWriter to either execute its commands directly or to save the script for later. The files and directories will be created at the location the PowerShell window is currently at, so make sure you change your working directory to where you want them before continuing.

  3. Enter a timeout for the script

  4. Switch to the target window before the timeout runs out

  5. Watch ClipWriter type :)

What's supported

  • Copying large amounts of text and long scripts that would otherwise take ages to type in
  • Copying multiple files and directories

How it works

ClipWriter uses the SendWait function from the System.Windows.Forms library to generate synthetic keystrokes. It uses SendWait() in favour of alternative calls such as SendKeys() in attempt to avoid mistakes when writing large amounts of text to slow applications. SendWait() is slower than SendKeys(), but also more accurate.

To paste files, ClipWriter generates PowerShell commands to create the required directory structure, and it transfers the files themselves by Base64-encoding them in chunks and generating commands to decode the chunks on the remote side.

Issues

  • Speed, obviously. Copying large files is time consuming, but if the alternative is to run through several hours of meetings about firewall rules and security issues, this might be quicker after all.
  • The computer that's doing the "typing" is pretty much unusable while the script runs. You can watch Youtube on a separate screen though :D

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.