Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jumoog authored and Kilian von Pflugk committed Feb 13, 2017
1 parent 357c89a commit a569d03
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 11 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# RDF-Tool
drop file a file (zip is good idea) into **packer.bat**. Once packer.bat is done start **extractor.bat** on the other side. Once the extractor is done you have the file where the extractor is located

Size Limit is RAM ~300mb


1 change: 1 addition & 0 deletions extractor.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '.\extractor.ps1'"
15 changes: 15 additions & 0 deletions extractor.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
# decode base64 file back to zip
# get text from clipboard
$Clipboard= [Windows.Forms.Clipboard]::GetText()
# split string
$split = $Clipboard.Split(";")
# first part is the filename
$filename = $split[0]
# second part is the actual file as base64
$b64 = $split[1]
# encode back to byte
$bytes = [Convert]::FromBase64String($b64)
# write bytes to file
[IO.File]::WriteAllBytes($scriptPath +"\"+$filename, $bytes)
1 change: 1 addition & 0 deletions packer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0packer.ps1'" ""%*""
12 changes: 12 additions & 0 deletions packer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Param(
[string]$arg
)
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
# encode zip file to base64
$fileName = [io.path]::GetFileName($arg)
# read file as byte
$bytes = [IO.File]::ReadAllBytes($arg)
# convert byte to base64
$b64 = [Convert]::ToBase64String($bytes)
# add filename before base64 and write to clipboard
[Windows.Forms.Clipboard]::SetText($fileName + ";" + $b64)
11 changes: 0 additions & 11 deletions tool.ps1

This file was deleted.

0 comments on commit a569d03

Please sign in to comment.