eleweek / histsync Goto Github PK
View Code? Open in Web Editor NEWCloud Bash History app using python and flask
Home Page: http://histsync.io/
License: MIT License
Cloud Bash History app using python and flask
Home Page: http://histsync.io/
License: MIT License
I'm not sure if you can edit te history of a cmd.exe session, but that would be a cool feature.
Some server configuration seems to be off.
$ cat ~/.histsync/log
2015-06-24 20:09:40,279 - 15405 - root - ERROR - HTTP Error 500: INTERNAL SERVER ERROR
Traceback (most recent call last):
File "/Users/nudies/.histsync/histsync-client", line 36, in upload_command
urllib2.urlopen(req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: INTERNAL SERVER ERROR
Posting the same payload to the server in the browser returns the same error.
http://www.histsync.io/api/v0/user/nudies/commands?api_key=<api-key>&command=cut%20-f%20%3Ccol%20%23%3E%20%3Ctabfile.txt%3E%20%7C%20sort%20%7C%20uniq%20-dc
{
status: 500,
message: "Internal Server Error"
}
The current api is very basic, web UI uses _command urls(e.g. _publish_command/)
Maybe .histsync folder
Storing powershell history remotely would be awesome.
Currently it's one big list, we need pagination.
When making this command public:
java -jar Passambler-DEV-jar-with-dependencies.jar -r="writeln('Hello World')"
It cuts it off in the publish dialog like this:
java -jar Passambler-DEV-jar-with-dependencies.jar -r=
This happens because the element is specified like this:
value="' + $(that).data('command-text') + '"
This makes the value this:
value="java -jar Passambler-DEV-jar-with-dependencies.jar -r="writeln('Hello World')""
...which cuts of the "
.
This makes XSS injection possible!
Use this instead:
value="' + $(that).data('command-text').replace(/"/g, """) + '"
Bash doesn't have proper preexec
.
But zsh does: http://zsh.sourceforge.net/Doc/Release/Functions.html
And tcsh has postcmd
: http://www.tcsh.org/tcsh.html/Special_aliases.html
Right now, to start playing around with local version of the app, quite a few
changes have to be made. For example, here are steps I had to do:
Steps like these are tedious to do by hand and should be handled by configuration files.
I think, that separation of configuration would help new contributors to get started more quickly.
This issue intersects with #10, as it would probably require separate configuration anyway.
If this proposal is accepted, I could work on it. Please let me know if it makes sense.
This should work a lot better than bash-preexec(it seems that the only problem is that command is uploaded AFTER its completion).
https://gist.github.com/evverx/695129199b5c7f4d0f94#file-bulletproof-history-collector-bash-L32
Thanks to @evverx
I mean the user must trust you anyway if he/she runs "crul | bash".
So I see no problem with just adding it. What do you think?
Maybe we could just ask, if the user wants to use .bashrc (most will use this) or .bash_profiles?
I don't like to see 500 ls
in my history.
E.g. show big buttons to app core functionality, show recent commands etc
I should make a dump available for testing purposes
Some people care a lot about their privacy. It is necessary to provide a nice way to deploy the app for them(e.g. no github dependency, "deploy to heroku" button, etc, etc)
First I came here to leave an issue about maybe allowing commands to be upvoted which I thought would be cool, and then I realized that Starring other peoples commands acts in the same way as an upvote would.
So the issue is twofold, one is that when you star something a message pops over and says you starred it, but the counter doesn't increment without refreshing the page. And the second part of the issue is that unstar does not work entirely.
I will probably submit a pull request to fix this sometime tomorrow if you don't mind. Otherwise it's probably not difficult to fix yourself.
This is so that end-users won't have to install pip and install the requirements.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.