-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #845 from dadav/develop
ready to merge
- Loading branch information
Showing
37 changed files
with
1,605 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
# top-most EditorConfig file | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
# Matches the exact files either package.json or .travis.yml | ||
[{*.yml,*.yaml,config.yml,defaults.yml}] | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.json] | ||
insert_final_newline = ignore | ||
|
||
[*.js] | ||
indent_style = ignore | ||
insert_final_newline = ignore | ||
|
||
[*.{md,txt}] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from http.server import HTTPServer, BaseHTTPRequestHandler | ||
|
||
|
||
HTML_FORM = """ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Decryption</title> | ||
<style> | ||
body { text-align: center; padding: 150px; } | ||
h1 { font-size: 50px; } | ||
body { font: 20px Helvetica, sans-serif; color: #333; } | ||
article { display: block; text-align: center; width: 650px; margin: 0 auto;} | ||
input { | ||
padding: 12px 20px; | ||
margin: 8px 0; | ||
box-sizing: border-box; | ||
border: 1px solid #ccc; | ||
} | ||
input[type=password] { | ||
width: 75%; | ||
font-size: 24px; | ||
} | ||
input[type=submit] { | ||
cursor: pointer; | ||
width: 75%; | ||
} | ||
input[type=submit]:hover { | ||
background-color: #d9d9d9; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<article> | ||
<h1>Decryption</h1> | ||
<p>Some of your files are encrypted.</p> | ||
<p>Please provide the decryption password.</p> | ||
<div> | ||
<form action="/set-password" method="POST"> | ||
<input type="password" id="password" name="password" value=""><br> | ||
<input type="submit" value="Submit"> | ||
</form> | ||
</div> | ||
</article> | ||
</body> | ||
</html> | ||
""" | ||
|
||
|
||
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): | ||
|
||
def do_GET(self): | ||
self.send_response(200) | ||
self.end_headers() | ||
self.wfile.write(HTML_FORM.encode()) | ||
|
||
def do_POST(self): | ||
content_length = int(self.headers['Content-Length']) | ||
body = self.rfile.read(content_length) | ||
self.send_response(200) | ||
self.end_headers() | ||
password = body.decode('UTF-8').split('=')[1] | ||
|
||
with open('/tmp/.pwnagotchi-secret', 'wt') as pwfile: | ||
pwfile.write(password) | ||
|
||
|
||
httpd = HTTPServer(('0.0.0.0', 80), SimpleHTTPRequestHandler) | ||
httpd.serve_forever() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
#!/usr/bin/env bash | ||
source /usr/bin/pwnlib | ||
|
||
# we need to decrypt something | ||
if is_crypted_mode; then | ||
while ! is_decrypted; do | ||
echo "Waiting for decryption..." | ||
sleep 1 | ||
done | ||
fi | ||
|
||
# blink 10 times to signal ready state | ||
blink_led 10 & | ||
|
||
if is_auto_mode; then | ||
/usr/local/bin/pwnagotchi | ||
else | ||
/usr/local/bin/pwnagotchi --manual | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.4.3' | ||
__version__ = '1.5.0' |
Oops, something went wrong.