leaningtech / webvm

Virtual Machine for the Web
https://webvm.io
Apache License 2.0
5.51k stars 1.22k forks source link

Filesystem data is dumped when `cat /bin` is executed #27

Closed hello-smile6 closed 2 years ago

hello-smile6 commented 2 years ago
                        __      __   _  __   ____  __       
                        \ \    / /__| |_\ \ / /  \/  | 
                         \ \/\/ / -_) '_ \ V /| |\/| | 
                          \_/\_/\___|_.__/\_/ |_|  |_|  

 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
 |                                                                            |
 | WebVM is a server-less virtual Linux environment running fully client-side |
 | in HTML5/WebAssembly.                                                      |
 |                                                                            |
 | In this demo, it runs an unmodified Debian distribution including many     |
 | native development toolchains.                                             |
 |                                                                            |
 | WebVM is powered by the CheerpX virtualization engine, and enables safe,   |
 | sandboxed client-side execution of x86 binaries on any browser.            |
 |                                                                            |
 | CheerpX includes an x86-to-WebAssembly JIT compiler, a virtual block-based |
 | file system, and a Linux syscall emulator.                                 |
 |                                                                            |
 | For more information: https://medium.com/p/40a60170b361                    |
 |                                                                            |
 | GitHub  |  Issues  |  Gitter  |  Twitter  |  Latest News  |  About CheerpX |
 |                                                                            |
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+

   Welcome to WebVM (build 20220201). If unsure, try these examples:

     python3 examples/python3/fibonacci.py 
     gcc -o helloworld examples/c/helloworld.c && ./helloworld
     objdump -d ./helloworld | less -M
     vim examples/c/helloworld.c

user@:~$ ls
examples
user@:~$ cd /
user@:/$ ls
bin  boot  bootstrap  dev  etc  home  lib  lib64  libx32  lost+found  media  mnt  nbody.js  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
user@:/$ cd /b
bash: cd: /b: No such file or directory
user@:/$ ./bootstrap/
bash: ./bootstrap/: Is a directory
user@:/$ echo 2>bin

user@:/$ cat bin
U
.U
..U
aptU    apt-cacheU      apt-cdromU
apt-configUapt-getUapt-keyapt-markUW
clear_consoleWrbashW
catWchgrpWchmodWchownW
cpW
dateW
ddW
dfW
dirW
echoWfalseW
lnW
lsWmkdirWmknodWmktempW
mvW
pwdreadlinkW
rmWrmdirWsleepW
sttyW
syncWtouchW
trueWunameW
vdirW
[W
archWb2sumWbase32Wbase64basenameWchconWcksumW
commWcsplitW
cutW    dircolorsWdirnameW
duW
envWexpandW
exprWfactorW
fmtW
foldWgroupsW
headWhostidW
idWinstallW
joinW
linkWlognameWmd5sumWmkfifoW
niceW
nlWnohupWnprocWnumfmtW
odWpasteWpathchkWpinkyW
prprintenvWprintfW
ptxrealpathWrunconW
seqWsha1sumX    sha224sum!X     sha256sum"X     sha384sum$X     sha512sum%Xshred&X
shuf'X
sort(Xsplit*X
stat+Xstdbuf,X
sum-X
tac.X
tail/X
tee0X
test1Xtimeout2X
tr3truncate4Xtsort5X
tty7unexpand8X
uniq9Xunlink:Xusers;X
wc<X
who=Xwhoami>X
yes5dmd5sum.textutils;d
dashZ
shidebconfidebconf-apt-progressidebconf-communicateidebconf-copydbidebconf-escapei debconf-set-selectionsi
debconf-showTZ  run-partsUtempfileVZwhichYischrootZZsavelogcZ
cmpdZ
diffeZdiff3fZsdiffZ
dpkgdpkg-debZ
dpkg-divertZ dpkg-maintscript-helperZ
dpkg-queryZ
dpkg-splitZdpkg-statoverrideZ
dpkg-triggerZupdate-alternativesXchattrXlsattrw[
findx[xargs[    catchsegv[getconf[getent[iconv[
ldd[locale[     localedef[
plddtzselect[zdumpZ
gpgv[egrep[fgrep[
grep[rgrepS[gunzipU[gzexeW[
gzipS[
uncompressX[
zcatY[
zcmpZ[zdiff[[zegrep\[zfgrep][zforce^[zgrep_[zless`[zmoreb[
dnsdomainname]]
nisdomainname]
ypdomainname]deb-systemd-helper]deb-systemd-invoke]
mawk]clear]infocmp]
tabs]
tic]
toe]
tput]
tset
^       captoinfo^      infotocap^reset^
perl^
perl5.28.11\
sed     _login
_faillog
_lastlog
_newgrpOf
sgO_chageP_
chfnQ_
chshR_expiryS_gpasswdT_passwd_pidof_
tar_logger_renice_script_
scriptreplay_
`mount`umount`dmesg`findmnt `lsblk!`
more"`
mountpoint#`
su$`wdctlC`addpartD`choomE`
chrtF`delpartG` fallocateH`fincoreI`flockJ`getoptK`ioniceL`ipcmkM`ipcrmN`
ipcsO`
lastP`lscpuQ`lsipcR`lslocksSlsloginsT`lsmemU`
lsnsV`mcookieW`
mesgX`nameiY`nsenterZ`partx[`prlimit\`  rename.ul]`
resizepart^`
rev_`setarch``setpriva`setsidb`settermc`tasksetd`unshareeutmpdumpf`whereisf
i386flastbflinux32flinux649\
nawkloginctlobootctlm7\
awkmfpager.dpY
networkctlpkY   systemctletwYsystemd-ask-passwordYsystemd-escapeYsystemd-inhibitkY systemd-machine-id-setupYsystemd-notifyd-Ysystemd-sysusers_systemd-tmpfilesFd(systemd-tty-ask-password-agentg-obusctlsto
hostnamectleokernel-installpfo  localectlgo
resolvectlk-osystemd-analyzepo
systemd-catgo
systemd-mountewoosystemd-detect-virto
systemd-patho
systemd-runo systemd-socket-activatetosystemd-stdio-bridgeo
timedatectlnTpsystemdtpsystemd-resolvepsystemd-umountt.iapt-ftparchivepli
apt-sortpkgsi   bsd-writedpkcalendari
colpi
lookiapt-extracttemplatesicolcrtaricolrmiicolumnewihexdumpdilorderi
printerbannerkg-i
uli
calgi
imt-gnupkg-newicpionew-newoY
journalctl]j
ss.dfj
rdmaicrontabbdjlnstatg-ejnstatnstgjroutefhjroutel-n*k
pingbsd-fromjctstatpkjrtstat-kping4dpk.kping6l.dj
iptables-xmlGklsmoddpkg-newwst9k
kmod\j
ip-nQlessechoRklesskeySlesspipeXlessfilekrnanodpkXopensslhlkillewzknanog-newrliPk
lesswhiptaill
pslll
freec_rehashlpgrepkg-l
pmapl
pwdxlskillgrelslabtopltload-nel
topluptimekglvmstatdpw.procpslwatchnewlpkill.dplsnice
select-editorg-nglsensible-editorelsensible-pagergudevadm-@m    helpztagspkg-newltaskselwnewnl
systemd-hwdbWclingdpkX
node^vim.tiny`m
xxdkfm
mthmeditorpkjm
picolm
wis.nmrviewom
vikgvm
view}m
exnemwrite386m
fromXnodejspkX  python3.7mpeX
jswX
python3.7mdpX
py3compilepkX
py3versionscXpython3python3mXcomposelX
editXprintse.Xseekg-newd.dpy3cleanX
pygettext3.7Xpdb3.7Xpydoc3pkXbunzip2wX
run-mailcapX
pygettext3g-newpydoc3.7Xbzcatp2.Y
fileX
pdb3XbzdiffdpXbzexeXbzgrepw.Xbzip2.dpX
bzip2recoverXbzmoreXbzcmpg-nYbzegreppYbzfgrepeYbzlessmoY
xzmaYxzdiffdpYxzgrepg-YxzlessdiYxzmore-Y
unxz.Yxzcat/Yxzcmpewt0Yxzegrepd1Yxzfgrep9Yunlzmapk;Ylzcat=Ylzmorep?YlzlessdpAYlzdiffCYlzcmpmp7Ylzma-newlzmainfoEYlzgrep.dGYlzegrepIYlzfgrepgQYgem2.5.dRYirb2.5SYrdoc2.5nTYri2.55.dUYruby2.5^Y
gem._Y
irb`Y
rdocaY
ri
bYruby-newPYerb2.5nvrYunzipp.dpkg-newniY
rakesunzipsfxtYzipgrep]Y
erbwrYzipinfox{zipcloak|Yzipnotec}zipsplitzY
zipwqYfunzip.da]i686-linux-gnu-ardr2b]i686-linux-gnu-as686c] i686-linux-gnu-c++filtd]i686-linux-gnu-dwpkge] i686-linux-gnu-elfedit.d^i686-linux-gnu-gprof^ i686-linux-gnu-ld.bfdlin^ i686-linux-gnu-ld.gold^i686-linux-gnu-nm-nei686-linux-gnu-addr2lineM^ranlibg-N^readelfbQ^stringsR^strippkg_^cpp-8lin` i686-linux-gnu-gcc-ar-8kagcc-8wp.\^i686-linux-gnu-cpp-8` i686-linux-gnu-gcc-nm-8.`$686-linux-gnu-gcc-ranlib-8n` i686-linux-gnu-gcov-8w?^     addr2lineg-ta$i686-linux-gnu-gcov-dump-88.a$i686-linux-gnu-gcov-tool-8v-gcc-ar-8gcc-nm-8a
gcc-ranlib-8agcov-886a
gcov-dump-8la
gcov-tool-8"amtrace.d#arpcgen$asotruss%asprofn.dag++-8linaluac50dpkg-newwaluajit.d!agencata     python2.7-tmpewalua50-8.dpkg-new`i686-linux-gnu-gcc-8ai686-linux-gnu-g++-8a
luaua
luaca   pycompilepkgapython2oa
pyversions,bpydoc2pkg-newewapython.dpkg-newapycleanpydoc2.7b
pygettext2.7$bpdb2.7ne+b
pdb2-b
pygettext2new2to3-2.74bpydocpkg5b       pygettext.dp<blspciew&b
dh_python2=b
pcimodules-new-new3b
pdb>bsetpciulb
yaml-bench-7wetpVb
beefb   clang++-7olibclang-7b
clang-cpp-7pbclangsymbclang++wbi586-linux-gnu-cppewbasan_symbolize-7b
cppnb
gccwbasan_symbolizebi686-linux-gnu-cpp.dbc99-gcc.bgcc-arbgcc-nmewb
gcc-ranlibewb
gcovb   gcov-dumpb      gcov-toolbbi586-linux-gnu-gccb i586-linux-gnu-gcc-arcovb i586-linux-gnu-gcc-nmtoob$i586-linux-gnu-gcc-ranlibu-gbi586-linux-gnu-gcovnb i586-linux-gnu-gcov-dumpb i586-linux-gnu-gcov-toolbi686-linux-gnu-gcc-rb i686-linux-gnu-gcc-arlinb i686-linux-gnu-gcc-nm586b$i686-linux-gnu-gcc-ranlibbbi686-linux-gnu-gcovlc i686-linux-gnu-gcov-dumpc i686-linux-gnu-gcov-toolfncurses6-configw
chexeditnmncursesw6-configmncurses5-configwmncursesw5-configm
llvm-c-test-7nlc-7m     llvm-ar-7ew-newemlli-7mlli-child-target-7v--nopt-7bc89-gccm     llvm-as-7g-nnllvm-bcanalyzer-7hufn
llvm-config-7er-nfi-verify-7wn
llvm-cvtres-7wnllvm-cxxdump-7gnllvm-cxxfilt-7er n
llvm-diff-7
n
llvm-dis-7dp
nllvm-dlltool-7ov
nllvm-dwarfdump-7
llvm-dwp-7nllvm-exegesis-7dnllvm-extract-7xxn
llvm-lib-7n
llvm-link-7gn
llvm-lto-7isn
llvm-lto2-7n    llvm-mc-7kg-n
llvm-rtdyld-7.dp#nmodextllvm-rc-7lvm nllvm-readelf-7!nllvm-readobj-7"nopy-7vmnllvm-objdump-7llvm-opt-report-7nnllvm-pdbutil-7ewnllvm-profdata-7-n
llvm-size-7m$n
llvm-stress-7w&nllvm-strings-7.d'n
llvm-tblgen-7g-n*nllvm-undname-7il+n
llvm-xray-7,n
obj2yaml-7kg.n
sanstats-7an/n verify-uselistorder-7rc-0n
yaml2obj-7mn
usb-devicesneww2n
lshwnn
usbhid-dump.ousbresetwld-5nupdate-mime-database{n
xdg-user-dirkg-newewsvimtutorn
vimmlnlsusbg-nyn        vim.basicstr|nxdg-user-dirs-update*genc2xspkg-newnewnvimdiffen
rvimn
ccn
c89-n
c99n
c++mgi686-linux-gnu-g++.d#g perl5.28-i386-linux-gnu.)g
cpan_
g++ggi586-linux-gnu-g++g
makeg$make-first-existing-target.d"g$cpan5.28-i386-linux-gnunewwm
bugpoint-7m llvm-PerfectShuffle-7+encguess,g
h2ph-g
h2xs.g  instmodsh/gjson_ppe0g   libnetcfgdpk1gperlbug2gperldoca3gperlivps1g
perlthanksmpnew4gpiconvp.5gpl2pm6pod2html7gpod2manl8pod2text9g  pod2usagenew:g
podcheckerkg;g  podselecthan<gproveg=g
ptar>ptardiff?ptargrep@gshasummlAgsplainBgxsubppkgCg@
corelistdpkg-tmpo kernel-install.dpkg-newg<kernel-install.dpkg-tmpolocalectl.dpkg-newg8localectl.dpkg-tmporesolvectl.dpkg-newg<resolvectl.dpkg-tmpo systemd-analyze.dpkg-newg<systemd-analyze.dpkg-tmposystemd-cat.dpkg-newg<systemd-cat.dpkg-tmpo systemd-cgls.dpkg-newg@systemd-cgls.dpkg-tmpo systemd-cgtop.dpkg-newg@systemd-cgtop.dpkg-tmpo systemd-delta.dpkg-newgDsystemd-delta.dpkg-tmpo$systemd-detect-virt.dpkg-newgDsystemd-detect-virt.dpkg-tmpo systemd-id128.dpkg-newg@systemd-id128.dpkg-tmpo systemd-mount.dpkg-newg@systemd-mount.dpkg-tmpo systemd-path.dpkg-newg<systemd-path.dpkg-tmposystemd-run.dpkg-newgDsystemd-run.dpkg-tmpo( systemd-socket-activate.dpkg-newgP systemd-socket-activate.dpkg-tmpo(systemd-stdio-bridge.dpkg-newgDsystemd-stdio-bridge.dpkg-tmpotimedatectl.dpkg-newg4timedatectl.dpkg-tmpTpsystemd.dpkg-newUp8systemd.dpkg-tmpp systemd-resolve.dpkg-newp@systemd-resolve.dpkg-tmpp systemd-umount.dpkg-newp  systemd-umount.dpkg-tmpuser@:/$ 
user@:/$ 
bluefoxy009 commented 2 years ago

You know that it’s running linux, right? Seems like you still don’t even know how to use linux.

bluefoxy009 commented 2 years ago

Your trying to cat a directory, then you try to cd /b Bro that’s a Windows command

hello-smile6 commented 2 years ago

Your trying to cat a directory, then you try to cd /b Bro that’s a Windows command

Was seeing what it did with nonexistent directories. Also, linux doesn't dump garbage to the terminal when you try to read from a directory.

bluefoxy009 commented 2 years ago

Fair, these devs are slow ngl.

Sent from my iPhone

On Jun 13, 2022, at 12:14 AM, hello-smile6 @.***> wrote:



Your trying to cat a directory, then you try to cd /b Bro that’s a Windows command

Was seeing what it did with nonexistent directories. Also, linux doesn't dump garbage to the terminal when you try to read from a directory.

— Reply to this email directly, view it on GitHubhttps://github.com/leaningtech/webvm/issues/27#issuecomment-1153514189, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCEX4SN6SB5S4PAUO4W3E3VO3GV7ANCNFSM5PALGKAQ. You are receiving this because you commented.Message ID: @.***>

saarikoski-jules commented 2 years ago

This issue has been fixed in the most recent build. Thank you for your patience.