Skip to content

Commit 70af943

Browse files
chore(init): add starter for FileEncryptor
0 parents  commit 70af943

5 files changed

Lines changed: 64 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# FileEncryptor
2+
3+
FileEncryptor — simple XOR file encrypt/decrypt demo (educational only).
4+
5+
**Author:** NaldyXploit
6+
7+
## Overview
8+
This is an auto-generated, legitimate starter project intended for learning and demonstration.
9+
The code is runnable on Termux and standard Linux systems. The example aims to be realistic and useful.
10+
11+
## Requirements
12+
- Python 3.7+
13+
- pip (for installing requests where used)
14+
15+
## Install & Run (Termux)
16+
17+
```bash
18+
pkg update && pkg upgrade -y
19+
pkg install git python -y
20+
git clone https://github.com/YOUR_GITHUB_USERNAME/FileEncryptor.git
21+
cd FileEncryptor
22+
python3 -m pip install --user -r requirements.txt || true
23+
python3 fileencryptor.py example.com
24+
```
25+
26+
## Install & Run (Linux - Debian/Ubuntu)
27+
28+
```bash
29+
sudo apt update && sudo apt install python3 python3-pip git -y
30+
git clone https://github.com/YOUR_GITHUB_USERNAME/FileEncryptor.git
31+
cd FileEncryptor
32+
python3 -m pip install --user -r requirements.txt || true
33+
python3 fileencryptor.py example.com
34+
```
35+
36+
## Notes
37+
- This is educational code. Use responsibly and avoid abusive scanning or scraping.
38+
- Developer: **NaldyXploit**

examples.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
python3 fileencryptor.py 8.8.8.8 || true

fileencryptor.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python3
2+
"""FileEncryptor - XOR file encryptor demo
3+
Usage: python3 fileencryptor.py <encrypt|decrypt> <infile> <outfile> <password>
4+
"""
5+
import sys
6+
def xor_data(data, key):
7+
out=bytearray()
8+
k=key.encode('utf-8')
9+
for i,b in enumerate(data):
10+
out.append(b ^ k[i % len(k)])
11+
return bytes(out)
12+
def main():
13+
if len(sys.argv)<5:
14+
print('Usage: python3 fileencryptor.py <encrypt|decrypt> <infile> <outfile> <password>'); return
15+
mode,infile,outfile,pw=sys.argv[1:5]
16+
with open(infile,'rb') as f: data=f.read()
17+
out=xor_data(data,pw)
18+
with open(outfile,'wb') as f: f.write(out)
19+
print('Wrote', outfile)
20+
if __name__=='__main__': main()

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

tests_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_placeholder():
2+
assert True

0 commit comments

Comments
 (0)