Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 86.15 KB | None | 0 0
  1. Last login: Tue Feb 20 09:42:45 on ttys000
  2. -bash: rbenv: command not found
  3. Chandlers-MacBook-Pro:~ chandlertodd$ ssh testvm@localhost -p 2222
  4. testvm@localhost's password:
  5. Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-25-generic x86_64)
  6.  
  7. * Documentation: https://help.ubuntu.com
  8. * Management: https://landscape.canonical.com
  9. * Support: https://ubuntu.com/advantage
  10.  
  11.  
  12. 92 packages can be updated.
  13. 0 updates are security updates.
  14.  
  15. *** System restart required ***
  16. Last login: Sun Feb 18 15:20:41 2018 from 10.0.2.2
  17. testvm@testvm:~$ curl https://sh.rustup.rs -sSf | sh
  18. The program 'curl' is currently not installed. You can install it by typing:
  19. sudo apt install curl
  20. testvm@testvm:~$ sudo apt install curl
  21. [sudo] password for testvm:
  22. Reading package lists... Done
  23. Building dependency tree
  24. Reading state information... Done
  25. The following packages were automatically installed and are no longer required:
  26. freeglut3 gir1.2-ibus-1.0 libdbus-1-dev libgles2-mesa libgles2-mesa-dev libglib2.0-dev
  27. libglib2.0-dev-bin libglu1-mesa libibus-1.0-5 libibus-1.0-dev libpcre16-3 libpcre3-dev
  28. libpcre32-3 libpcrecpp0v5 libpulse-dev libqgsttools-p1 libqt4-opengl libqt5concurrent5
  29. libqt5multimedia5 libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5quickparticles5
  30. libqt5quicktest5 libqt5script5 libqt5scripttools5 libqt5test5 libqt5xmlpatterns5
  31. libsndio-dev libudev-dev libxcursor-dev libxinerama-dev libxss-dev libxv-dev
  32. linux-headers-4.13.0-16 linux-headers-4.13.0-16-generic linux-image-4.13.0-16-generic
  33. linux-image-4.13.0-17-generic linux-image-extra-4.13.0-16-generic
  34. linux-image-extra-4.13.0-17-generic mesa-common-dev qt5-qmake qtbase5-dev-tools
  35. x11proto-scrnsaver-dev x11proto-video-dev x11proto-xinerama-dev
  36. Use 'sudo apt autoremove' to remove them.
  37. The following NEW packages will be installed:
  38. curl
  39. 0 upgraded, 1 newly installed, 0 to remove and 92 not upgraded.
  40. Need to get 152 kB of archives.
  41. After this operation, 375 kB of additional disk space will be used.
  42. Get:1 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 curl amd64 7.55.1-1ubuntu2.3 [152 kB]
  43. Fetched 152 kB in 0s (1,362 kB/s)
  44. Selecting previously unselected package curl.
  45. (Reading database ... 297018 files and directories currently installed.)
  46. Preparing to unpack .../curl_7.55.1-1ubuntu2.3_amd64.deb ...
  47. Unpacking curl (7.55.1-1ubuntu2.3) ...
  48. Setting up curl (7.55.1-1ubuntu2.3) ...
  49. Processing triggers for man-db (2.7.6.1-2) ...
  50. testvm@testvm:~$ curl https://sh.rustup.rs -sSf | sh
  51. info: downloading installer
  52.  
  53. Welcome to Rust!
  54.  
  55. This will download and install the official compiler for the Rust programming
  56. language, and its package manager, Cargo.
  57.  
  58. It will add the cargo, rustc, rustup and other commands to Cargo's bin
  59. directory, located at:
  60.  
  61. /home/testvm/.cargo/bin
  62.  
  63. This path will then be added to your PATH environment variable by modifying the
  64. profile file located at:
  65.  
  66. /home/testvm/.profile
  67.  
  68. You can uninstall at any time with rustup self uninstall and these changes will
  69. be reverted.
  70.  
  71. Current installation options:
  72.  
  73. default host triple: x86_64-unknown-linux-gnu
  74. default toolchain: stable
  75. modify PATH variable: yes
  76.  
  77. 1) Proceed with installation (default)
  78. 2) Customize installation
  79. 3) Cancel installation
  80. 1
  81.  
  82. info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
  83. info: latest update on 2018-02-15, rust version 1.24.0 (4d90ac38c 2018-02-12)
  84. info: downloading component 'rustc'
  85. 47.8 MiB / 47.8 MiB (100 %) 4.3 MiB/s ETA: 0 s
  86. info: downloading component 'rust-std'
  87. 67.2 MiB / 67.2 MiB (100 %) 4.3 MiB/s ETA: 0 s
  88. info: downloading component 'cargo'
  89. info: downloading component 'rust-docs'
  90. 4.6 MiB / 4.6 MiB (100 %) 4.6 MiB/s ETA: 0 s
  91. info: installing component 'rustc'
  92. info: installing component 'rust-std'
  93. info: installing component 'cargo'
  94. info: installing component 'rust-docs'
  95. info: default toolchain set to 'stable'
  96.  
  97. stable installed - rustc 1.24.0 (4d90ac38c 2018-02-12)
  98.  
  99.  
  100. Rust is installed now. Great!
  101.  
  102. To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
  103. environment variable. Next time you log in this will be done automatically.
  104.  
  105. To configure your current shell run source $HOME/.cargo/env
  106. testvm@testvm:~$ mkdir rustStuff
  107. testvm@testvm:~$ cd rustStuff/
  108. testvm@testvm:~/rustStuff$ ls
  109. testvm@testvm:~/rustStuff$ mkdir hello_world
  110. testvm@testvm:~/rustStuff$ cd hello_world/
  111. testvm@testvm:~/rustStuff/hello_world$ emacs main.rs
  112. testvm@testvm:~/rustStuff/hello_world$ rustc main.rs
  113. The program 'rustc' is currently not installed. You can install it by typing:
  114. sudo apt install rustc
  115. testvm@testvm:~/rustStuff/hello_world$ cd
  116. testvm@testvm:~$ ls
  117. a.out Desktop Downloads #*message*-20180130-124646# Pictures rustStuff Templates
  118. build Documents edb-debugger Music Public src Videos
  119. testvm@testvm:~$ sudo apt install rustc
  120. Reading package lists... Done
  121. Building dependency tree
  122. Reading state information... Done
  123. The following packages were automatically installed and are no longer required:
  124. freeglut3 gir1.2-ibus-1.0 libdbus-1-dev libgles2-mesa libgles2-mesa-dev libglib2.0-dev
  125. libglib2.0-dev-bin libglu1-mesa libibus-1.0-5 libibus-1.0-dev libpcre16-3 libpcre3-dev libpcre32-3
  126. libpcrecpp0v5 libpulse-dev libqgsttools-p1 libqt4-opengl libqt5concurrent5 libqt5multimedia5
  127. libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5quickparticles5 libqt5quicktest5
  128. libqt5script5 libqt5scripttools5 libqt5test5 libqt5xmlpatterns5 libsndio-dev libudev-dev
  129. libxcursor-dev libxinerama-dev libxss-dev libxv-dev linux-headers-4.13.0-16
  130. linux-headers-4.13.0-16-generic linux-image-4.13.0-16-generic linux-image-4.13.0-17-generic
  131. linux-image-extra-4.13.0-16-generic linux-image-extra-4.13.0-17-generic mesa-common-dev qt5-qmake
  132. qtbase5-dev-tools x11proto-scrnsaver-dev x11proto-video-dev x11proto-xinerama-dev
  133. Use 'sudo apt autoremove' to remove them.
  134. The following additional packages will be installed:
  135. libstd-rust-1.21 libstd-rust-dev rust-gdb
  136. Suggested packages:
  137. gdb-doc rust-doc rust-src
  138. The following NEW packages will be installed:
  139. libstd-rust-1.21 libstd-rust-dev rust-gdb rustc
  140. 0 upgraded, 4 newly installed, 0 to remove and 92 not upgraded.
  141. Need to get 58.9 MB of archives.
  142. After this operation, 153 MB of additional disk space will be used.
  143. Do you want to continue? [Y/n] y
  144. Get:1 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 libstd-rust-1.21 amd64 1.21.0+dfsg1+llvm-0ubuntu3~17.10.1 [37.3 MB]
  145. Get:2 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 libstd-rust-dev amd64 1.21.0+dfsg1+llvm-0ubuntu3~17.10.1 [20.4 MB]
  146. Get:3 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 rust-gdb all 1.21.0+dfsg1+llvm-0ubuntu3~17.10.1 [21.9 kB]
  147. Get:4 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 rustc amd64 1.21.0+dfsg1+llvm-0ubuntu3~17.10.1 [1,199 kB]
  148. Fetched 58.9 MB in 12s (4,613 kB/s)
  149. Selecting previously unselected package libstd-rust-1.21:amd64.
  150. (Reading database ... 297025 files and directories currently installed.)
  151. Preparing to unpack .../libstd-rust-1.21_1.21.0+dfsg1+llvm-0ubuntu3~17.10.1_amd64.deb ...
  152. Unpacking libstd-rust-1.21:amd64 (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  153. Selecting previously unselected package libstd-rust-dev:amd64.
  154. Preparing to unpack .../libstd-rust-dev_1.21.0+dfsg1+llvm-0ubuntu3~17.10.1_amd64.deb ...
  155. Unpacking libstd-rust-dev:amd64 (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  156. Selecting previously unselected package rust-gdb.
  157. Preparing to unpack .../rust-gdb_1.21.0+dfsg1+llvm-0ubuntu3~17.10.1_all.deb ...
  158. Unpacking rust-gdb (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  159. Selecting previously unselected package rustc.
  160. Preparing to unpack .../rustc_1.21.0+dfsg1+llvm-0ubuntu3~17.10.1_amd64.deb ...
  161. Unpacking rustc (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  162. Setting up libstd-rust-1.21:amd64 (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  163. Setting up rust-gdb (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  164. Setting up libstd-rust-dev:amd64 (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  165. Setting up rustc (1.21.0+dfsg1+llvm-0ubuntu3~17.10.1) ...
  166. Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
  167. Processing triggers for man-db (2.7.6.1-2) ...
  168. testvm@testvm:~$ cd Desktop
  169. testvm@testvm:~/Desktop$ ls
  170. a.out out #out# out~ part5.s project1 project2 testStuff #write.s# write.s write.s~
  171. testvm@testvm:~/Desktop$ cd ..
  172. testvm@testvm:~$ cd rustStuff/hello_world/
  173. testvm@testvm:~/rustStuff/hello_world$ rustc main.rs
  174. testvm@testvm:~/rustStuff/hello_world$ ls
  175. main main.rs
  176. testvm@testvm:~/rustStuff/hello_world$ ./main
  177. Hello, world!
  178. testvm@testvm:~/rustStuff/hello_world$ cargo --version
  179. The program 'cargo' is currently not installed. You can install it by typing:
  180. sudo apt install cargo
  181. testvm@testvm:~/rustStuff/hello_world$ cd
  182. testvm@testvm:~$ sudo apt install cargo
  183. Reading package lists... Done
  184. Building dependency tree
  185. Reading state information... Done
  186. The following packages were automatically installed and are no longer required:
  187. freeglut3 gir1.2-ibus-1.0 libdbus-1-dev libgles2-mesa libgles2-mesa-dev libglib2.0-dev
  188. libglib2.0-dev-bin libglu1-mesa libibus-1.0-5 libibus-1.0-dev libpcre16-3 libpcre3-dev libpcre32-3
  189. libpcrecpp0v5 libpulse-dev libqgsttools-p1 libqt4-opengl libqt5concurrent5 libqt5multimedia5
  190. libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5quickparticles5 libqt5quicktest5
  191. libqt5script5 libqt5scripttools5 libqt5test5 libqt5xmlpatterns5 libsndio-dev libudev-dev
  192. libxcursor-dev libxinerama-dev libxss-dev libxv-dev linux-headers-4.13.0-16
  193. linux-headers-4.13.0-16-generic linux-image-4.13.0-16-generic linux-image-4.13.0-17-generic
  194. linux-image-extra-4.13.0-16-generic linux-image-extra-4.13.0-17-generic mesa-common-dev qt5-qmake
  195. qtbase5-dev-tools x11proto-scrnsaver-dev x11proto-video-dev x11proto-xinerama-dev
  196. Use 'sudo apt autoremove' to remove them.
  197. The following additional packages will be installed:
  198. libhttp-parser2.1 libssh2-1
  199. Suggested packages:
  200. cargo-doc
  201. The following NEW packages will be installed:
  202. cargo libhttp-parser2.1 libssh2-1
  203. 0 upgraded, 3 newly installed, 0 to remove and 92 not upgraded.
  204. Need to get 2,224 kB of archives.
  205. After this operation, 7,721 kB of additional disk space will be used.
  206. Do you want to continue? [Y/n] y
  207. Get:1 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 libhttp-parser2.1 amd64 2.1-2 [18.2 kB]
  208. Get:2 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 libssh2-1 amd64 1.8.0-1 [73.2 kB]
  209. Get:3 http://us.archive.ubuntu.com/ubuntu artful-updates/universe amd64 cargo amd64 0.22.0-0ubuntu0.17.10.1 [2,132 kB]
  210. Fetched 2,224 kB in 0s (3,402 kB/s)
  211. Selecting previously unselected package libhttp-parser2.1:amd64.
  212. (Reading database ... 297165 files and directories currently installed.)
  213. Preparing to unpack .../libhttp-parser2.1_2.1-2_amd64.deb ...
  214. Unpacking libhttp-parser2.1:amd64 (2.1-2) ...
  215. Selecting previously unselected package libssh2-1:amd64.
  216. Preparing to unpack .../libssh2-1_1.8.0-1_amd64.deb ...
  217. Unpacking libssh2-1:amd64 (1.8.0-1) ...
  218. Selecting previously unselected package cargo.
  219. Preparing to unpack .../cargo_0.22.0-0ubuntu0.17.10.1_amd64.deb ...
  220. Unpacking cargo (0.22.0-0ubuntu0.17.10.1) ...
  221. Setting up libssh2-1:amd64 (1.8.0-1) ...
  222. Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
  223. Setting up libhttp-parser2.1:amd64 (2.1-2) ...
  224. Processing triggers for man-db (2.7.6.1-2) ...
  225. Setting up cargo (0.22.0-0ubuntu0.17.10.1) ...
  226. Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
  227. testvm@testvm:~$ cd rustStuff/hello_world/
  228. testvm@testvm:~/rustStuff/hello_world$ mkdir src
  229. testvm@testvm:~/rustStuff/hello_world$ mv main.rs src/main.rs
  230. testvm@testvm:~/rustStuff/hello_world$ rm main
  231. testvm@testvm:~/rustStuff/hello_world$ ls
  232. src
  233. testvm@testvm:~/rustStuff/hello_world$ emacs Cargo.toml
  234. testvm@testvm:~/rustStuff/hello_world$ cargo build
  235. Compiling hello_world v0.0.1 (file:///home/testvm/rustStuff/hello_world)
  236. Finished dev [unoptimized + debuginfo] target(s) in 0.32 secs
  237. testvm@testvm:~/rustStuff/hello_world$ ./target/debug/hello_world
  238. Hello, world!
  239. testvm@testvm:~/rustStuff/hello_world$ cargo run
  240. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  241. Running `target/debug/hello_world`
  242. Hello, world!
  243. testvm@testvm:~/rustStuff/hello_world$ ls
  244. Cargo.lock Cargo.toml src target
  245. testvm@testvm:~/rustStuff/hello_world$ ls
  246. Cargo.lock Cargo.toml src target
  247. testvm@testvm:~/rustStuff/hello_world$ cd ..
  248. testvm@testvm:~/rustStuff$ ls
  249. hello_world
  250. testvm@testvm:~/rustStuff$ rm hello_world/
  251. rm: cannot remove 'hello_world/': Is a directory
  252. testvm@testvm:~/rustStuff$ rm -f hello_world/
  253. rm: cannot remove 'hello_world/': Is a directory
  254. testvm@testvm:~/rustStuff$ r hello_world/
  255. The program 'r' is currently not installed. You can install it by typing:
  256. sudo apt install r-cran-littler
  257. testvm@testvm:~/rustStuff$ cargo new hello_world --bin
  258. error: destination `/home/testvm/rustStuff/hello_world` already exists
  259.  
  260. Use `cargo init` to initialize the directory
  261. testvm@testvm:~/rustStuff$ cargo new hello_world2 --bin
  262. Created binary (application) `hello_world2` project
  263. testvm@testvm:~/rustStuff$ ls
  264. hello_world hello_world2
  265. testvm@testvm:~/rustStuff$ cd hello_world2/
  266. testvm@testvm:~/rustStuff/hello_world2$ ls
  267. Cargo.toml src
  268. testvm@testvm:~/rustStuff/hello_world2$ cd src/
  269. testvm@testvm:~/rustStuff/hello_world2/src$ ls
  270. main.rs
  271. testvm@testvm:~/rustStuff/hello_world2/src$ emacs main.rs
  272. testvm@testvm:~/rustStuff/hello_world2/src$ cd ../../
  273. testvm@testvm:~/rustStuff$ ls
  274. hello_world hello_world2
  275. testvm@testvm:~/rustStuff$ cargo new guessing_game --bin
  276. Created binary (application) `guessing_game` project
  277. testvm@testvm:~/rustStuff$ cd guessing_game/
  278. testvm@testvm:~/rustStuff/guessing_game$ emacs Cargo.toml
  279. testvm@testvm:~/rustStuff/guessing_game$ git config
  280. usage: git config [<options>]
  281.  
  282. Config file location
  283. --global use global config file
  284. --system use system config file
  285. --local use repository config file
  286. -f, --file <file> use given config file
  287. --blob <blob-id> read config from given blob object
  288.  
  289. Action
  290. --get get value: name [value-regex]
  291. --get-all get all values: key [value-regex]
  292. --get-regexp get values for regexp: name-regex [value-regex]
  293. --get-urlmatch get value specific for the URL: section[.var] URL
  294. --replace-all replace all matching variables: name value [value_regex]
  295. --add add a new variable: name value
  296. --unset remove a variable: name [value-regex]
  297. --unset-all remove all matches: name [value-regex]
  298. --rename-section rename section: old-name new-name
  299. --remove-section remove a section: name
  300. -l, --list list all
  301. -e, --edit open an editor
  302. --get-color find the color configured: slot [default]
  303. --get-colorbool find the color setting: slot [stdout-is-tty]
  304.  
  305. Type
  306. --bool value is "true" or "false"
  307. --int value is decimal number
  308. --bool-or-int value is --bool or --int
  309. --path value is a path (file or directory name)
  310.  
  311. Other
  312. -z, --null terminate values with NUL byte
  313. --name-only show variable names only
  314. --includes respect include directives on lookup
  315. --show-origin show origin of config (file, standard input, blob, command line)
  316.  
  317. testvm@testvm:~/rustStuff/guessing_game$ git config --global
  318. usage: git config [<options>]
  319.  
  320. Config file location
  321. --global use global config file
  322. --system use system config file
  323. --local use repository config file
  324. -f, --file <file> use given config file
  325. --blob <blob-id> read config from given blob object
  326.  
  327. Action
  328. --get get value: name [value-regex]
  329. --get-all get all values: key [value-regex]
  330. --get-regexp get values for regexp: name-regex [value-regex]
  331. --get-urlmatch get value specific for the URL: section[.var] URL
  332. --replace-all replace all matching variables: name value [value_regex]
  333. --add add a new variable: name value
  334. --unset remove a variable: name [value-regex]
  335. --unset-all remove all matches: name [value-regex]
  336. --rename-section rename section: old-name new-name
  337. --remove-section remove a section: name
  338. -l, --list list all
  339. -e, --edit open an editor
  340. --get-color find the color configured: slot [default]
  341. --get-colorbool find the color setting: slot [stdout-is-tty]
  342.  
  343. Type
  344. --bool value is "true" or "false"
  345. --int value is decimal number
  346. --bool-or-int value is --bool or --int
  347. --path value is a path (file or directory name)
  348.  
  349. Other
  350. -z, --null terminate values with NUL byte
  351. --name-only show variable names only
  352. --includes respect include directives on lookup
  353. --show-origin show origin of config (file, standard input, blob, command line)
  354.  
  355. testvm@testvm:~/rustStuff/guessing_game$ cargo build
  356. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  357. Finished dev [unoptimized + debuginfo] target(s) in 0.86 secs
  358. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  359. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  360. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  361. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  362. error[E0599]: no method named `except` found for type `std::result::Result<usize, std::io::Error>` in the current scope
  363. --> src/main.rs:11:38
  364. |
  365. 11 | io::stdin().read_line(&mut guess).except("Failed to read line");
  366. | ^^^^^^
  367.  
  368. error: aborting due to previous error
  369.  
  370. error: Could not compile `guessing_game`.
  371.  
  372. To learn more, run the command again with --verbose.
  373. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  374. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  375. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  376. Finished dev [unoptimized + debuginfo] target(s) in 0.43 secs
  377. Running `target/debug/guessing_game`
  378. Guess the number!
  379. Input please!
  380. 10
  381. You guessed: 10
  382.  
  383. testvm@testvm:~/rustStuff/guessing_game$ emacs Cargo.
  384. testvm@testvm:~/rustStuff/guessing_game$ emacs Cargo.toml
  385. testvm@testvm:~/rustStuff/guessing_game$ cargo build
  386. Updating registry `https://github.com/rust-lang/crates.io-index`
  387. Downloading rand v0.3.22
  388. Downloading rand v0.4.2
  389. Downloading libc v0.2.36
  390. Compiling libc v0.2.36
  391. Compiling rand v0.4.2
  392. Compiling rand v0.3.22
  393. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  394. Finished dev [unoptimized + debuginfo] target(s) in 4.45 secs
  395. testvm@testvm:~/rustStuff/guessing_game$ cargo build
  396. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  397. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  398. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  399. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  400. Finished dev [unoptimized + debuginfo] target(s) in 0.53 secs
  401. Running `target/debug/guessing_game`
  402. Guess the number!
  403. The secret number is: 7
  404. Input please!
  405. 9
  406. You guessed: 9
  407.  
  408. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  409. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  410. Running `target/debug/guessing_game`
  411. Guess the number!
  412. The secret number is: 65
  413. Input please!
  414. 10
  415. You guessed: 10
  416.  
  417. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  418. testvm@testvm:~/rustStuff/guessing_game$ cargo build
  419. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  420. error: expected one of `,`, `.`, `?`, `}`, or an operator, found `;`
  421. --> src/main.rs:24:47
  422. |
  423. 24 | Ordering::Less => println!("Too Small!");
  424. | ^ expected one of `,`, `.`, `?`, `}`, or an operator here
  425.  
  426. warning: unused import: `std::cmp::Ordering`
  427. --> src/main.rs:4:5
  428. |
  429. 4 | use std::cmp::Ordering;
  430. | ^^^^^^^^^^^^^^^^^^
  431. |
  432. = note: #[warn(unused_imports)] on by default
  433.  
  434. error[E0308]: mismatched types
  435. --> src/main.rs:23:20
  436. |
  437. 23 | match guess.cmp(&secret_number) {
  438. | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found integral variable
  439. |
  440. = note: expected type `&std::string::String`
  441. found type `&{integer}`
  442.  
  443. error: aborting due to 2 previous errors
  444.  
  445. error: Could not compile `guessing_game`.
  446.  
  447. To learn more, run the command again with --verbose.
  448. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  449. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  450. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  451. Finished dev [unoptimized + debuginfo] target(s) in 0.57 secs
  452. Running `target/debug/guessing_game`
  453. Guess the number!
  454. The secret number is: 91
  455. Input please!
  456. 91
  457. You guessed: 91
  458. You Win!
  459. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  460. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  461. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  462. Finished dev [unoptimized + debuginfo] target(s) in 0.55 secs
  463. Running `target/debug/guessing_game`
  464. Guess the number!
  465. The secret number is: 47
  466. Input please!
  467. 20
  468. You guessed: 20
  469. Too Small!
  470. Input please!
  471. 40
  472. You guessed: 40
  473. Too Small!
  474. Input please!
  475. 50
  476. You guessed: 50
  477. Too Larger!
  478. Input please!
  479. 47
  480. You guessed: 47
  481. You Win!
  482. Input please!
  483.  
  484. thread 'main' panicked at 'Please type a number: ParseIntError { kind: Empty }', src/libcore/result.rs:906:4
  485. note: Run with `RUST_BACKTRACE=1` for a backtrace.
  486. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  487. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  488. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  489. error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
  490. --> src/main.rs:31:28
  491. |
  492. 31 | println!("You Win!"),
  493. | ^ expected one of `.`, `;`, `?`, `}`, or an operator here
  494.  
  495. error: aborting due to previous error
  496.  
  497. error: Could not compile `guessing_game`.
  498.  
  499. To learn more, run the command again with --verbose.
  500. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  501. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  502. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  503. Finished dev [unoptimized + debuginfo] target(s) in 0.54 secs
  504. Running `target/debug/guessing_game`
  505. Guess the number!
  506. The secret number is: 3
  507. Input please!
  508. 2
  509. You guessed: 2
  510. Too Small!
  511. Input please!
  512. 4
  513. You guessed: 4
  514. Too Larger!
  515. Input please!
  516. 3
  517. You guessed: 3
  518. You Win!
  519. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  520. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  521. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  522. error: expected one of `.`, `;`, `?`, or an operator, found `{`
  523. --> src/main.rs:23:40
  524. |
  525. 23 | let guess: u32 = guess.trim().parse() {
  526. | -^ unexpected token
  527. | |
  528. | expected one of `.`, `;`, `?`, or an operator here
  529.  
  530. error: expected item, found `}`
  531. --> src/main.rs:39:1
  532. |
  533. 39 | }
  534. | ^
  535.  
  536. error: aborting due to 2 previous errors
  537.  
  538. error: Could not compile `guessing_game`.
  539.  
  540. To learn more, run the command again with --verbose.
  541. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  542. testvm@testvm:~/rustStuff/guessing_game$ cargo run
  543. Compiling guessing_game v0.1.0 (file:///home/testvm/rustStuff/guessing_game)
  544. Finished dev [unoptimized + debuginfo] target(s) in 0.53 secs
  545. Running `target/debug/guessing_game`
  546. Guess the number!
  547. The secret number is: 15
  548. Input please!
  549. 10
  550. You guessed: 10
  551. Too Small!
  552. Input please!
  553. 20
  554. You guessed: 20
  555. Too Larger!
  556. Input please!
  557.  
  558. Input please!
  559. 15
  560. You guessed: 15
  561. You Win!
  562. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  563. testvm@testvm:~/rustStuff/guessing_game$ emacs
  564. testvm@testvm:~/rustStuff/guessing_game$ emacs
  565. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  566. testvm@testvm:~/rustStuff/guessing_game$ emacs ~/.emacs.d/init.el
  567. testvm@testvm:~/rustStuff/guessing_game$ emacs ~/.emacs.d/init.el
  568. testvm@testvm:~/rustStuff/guessing_game$ emacs ~/.emacs.d/init.el
  569. testvm@testvm:~/rustStuff/guessing_game$ emacs src/main.rs
  570. testvm@testvm:~/rustStuff/guessing_game$ ls
  571. Cargo.lock Cargo.toml Cargo.toml~ src target
  572. testvm@testvm:~/rustStuff/guessing_game$ cd ..
  573. testvm@testvm:~/rustStuff$ ls
  574. guessing_game hello_world hello_world2
  575. testvm@testvm:~/rustStuff$ cd hello_world
  576. testvm@testvm:~/rustStuff/hello_world$ ls
  577. Cargo.lock Cargo.toml src target
  578. testvm@testvm:~/rustStuff/hello_world$ emacs src/main.rs
  579. testvm@testvm:~/rustStuff/hello_world$ cargo build
  580. Compiling hello_world v0.0.1 (file:///home/testvm/rustStuff/hello_world)
  581. warning: unused variable: `x`
  582. --> src/main.rs:2:9
  583. |
  584. 2 | let x: i32;
  585. | ^
  586. |
  587. = note: #[warn(unused_variables)] on by default
  588. = note: to disable this warning, consider using `_x` instead
  589.  
  590. Finished dev [unoptimized + debuginfo] target(s) in 0.35 secs
  591. testvm@testvm:~/rustStuff/hello_world$ emacs src/main.rs
  592. testvm@testvm:~/rustStuff/hello_world$ cargo build
  593. Compiling hello_world v0.0.1 (file:///home/testvm/rustStuff/hello_world)
  594. error[E0381]: use of possibly uninitialized variable: `x`
  595. --> src/main.rs:4:38
  596. |
  597. 4 | println!("The value of x is {}", x);
  598. | ^ use of possibly uninitialized `x`
  599.  
  600. error: aborting due to previous error
  601.  
  602. error: Could not compile `hello_world`.
  603.  
  604. To learn more, run the command again with --verbose.
  605. testvm@testvm:~/rustStuff/hello_world$ emacs src/main.rs
  606. testvm@testvm:~/rustStuff/hello_world$ cargo build
  607. Compiling hello_world v0.0.1 (file:///home/testvm/rustStuff/hello_world)
  608. error[E0425]: cannot find value `y` in this scope
  609. --> src/main.rs:7:65
  610. |
  611. 7 | println!("The value of x is {} and the value of y is {}", x,y);
  612. | ^ did you mean `x`?
  613.  
  614. error: aborting due to previous error
  615.  
  616. error: Could not compile `hello_world`.
  617.  
  618. To learn more, run the command again with --verbose.
  619. testvm@testvm:~/rustStuff/hello_world$ emacs src/main.rs
  620. testvm@testvm:~/rustStuff/hello_world$ cd ../../Desktop/project2/file-server-group-sec/
  621. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  622. client.py fs RESOURCES.md server.c SOURCES.md test_post_file.py
  623. example-files Makefile rop_gadgets.txt server.py test_get_harder.py test_put_file.py
  624. files README.md run_tests.py setup_tests.sh test_get.py
  625. testvm@testvm:~/Desktop/project2/file-server-group-sec$ emacs server.
  626. testvm@testvm:~/Desktop/project2/file-server-group-sec$ emacs server.py
  627. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  628. client.py fs RESOURCES.md server.c SOURCES.md test_post_file.py
  629. example-files Makefile rop_gadgets.txt server.py test_get_harder.py test_put_file.py
  630. files README.md run_tests.py setup_tests.sh test_get.py
  631. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  632. On branch master
  633. Your branch is ahead of 'origin/master' by 10 commits.
  634. (use "git push" to publish your local commits)
  635.  
  636. Changes not staged for commit:
  637. (use "git add <file>..." to update what will be committed)
  638. (use "git checkout -- <file>..." to discard changes in working directory)
  639.  
  640. modified: client.py
  641.  
  642. Untracked files:
  643. (use "git add <file>..." to include in what will be committed)
  644.  
  645. fs
  646.  
  647. no changes added to commit (use "git add" and/or "git commit -a")
  648. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git stash
  649. Saved working directory and index state WIP on master: 20aaa9c Added debugging feature to interface
  650. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git pull upstream master
  651. Username for 'https://github.com': chtodd@haverford.edu
  652. Password for 'https://chtodd@haverford.edu@github.com':
  653. remote: Counting objects: 9, done.
  654. remote: Compressing objects: 100% (7/7), done.
  655. remote: Total 9 (delta 2), reused 8 (delta 1), pack-reused 0
  656. Unpacking objects: 100% (9/9), done.
  657. From https://github.com/fordsec/file-server-group-sec
  658. * branch master -> FETCH_HEAD
  659. 20aaa9c..4ddf928 master -> upstream/master
  660. Updating 20aaa9c..4ddf928
  661. Fast-forward
  662. PyServer.py | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  663. rust-server/Cargo.toml | 6 ++++
  664. rust-server/src/lib.rs | 7 +++++
  665. 3 files changed, 131 insertions(+)
  666. create mode 100644 PyServer.py
  667. create mode 100644 rust-server/Cargo.toml
  668. create mode 100644 rust-server/src/lib.rs
  669. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  670. client.py Makefile rop_gadgets.txt server.py test_get.py
  671. example-files PyServer.py run_tests.py setup_tests.sh test_post_file.py
  672. files README.md rust-server SOURCES.md test_put_file.py
  673. fs RESOURCES.md server.c test_get_harder.py
  674. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git stash apply
  675. On branch master
  676. Your branch is ahead of 'origin/master' by 12 commits.
  677. (use "git push" to publish your local commits)
  678.  
  679. Changes not staged for commit:
  680. (use "git add <file>..." to update what will be committed)
  681. (use "git checkout -- <file>..." to discard changes in working directory)
  682.  
  683. modified: client.py
  684.  
  685. Untracked files:
  686. (use "git add <file>..." to include in what will be committed)
  687.  
  688. fs
  689.  
  690. no changes added to commit (use "git add" and/or "git commit -a")
  691. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  692. On branch master
  693. Your branch is ahead of 'origin/master' by 12 commits.
  694. (use "git push" to publish your local commits)
  695.  
  696. Changes not staged for commit:
  697. (use "git add <file>..." to update what will be committed)
  698. (use "git checkout -- <file>..." to discard changes in working directory)
  699.  
  700. modified: client.py
  701.  
  702. Untracked files:
  703. (use "git add <file>..." to include in what will be committed)
  704.  
  705. fs
  706.  
  707. no changes added to commit (use "git add" and/or "git commit -a")
  708. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  709. client.py Makefile rop_gadgets.txt server.py test_get.py
  710. example-files PyServer.py run_tests.py setup_tests.sh test_post_file.py
  711. files README.md rust-server SOURCES.md test_put_file.py
  712. fs RESOURCES.md server.c test_get_harder.py
  713. testvm@testvm:~/Desktop/project2/file-server-group-sec$ cd rust-server/
  714. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  715. Cargo.toml src
  716. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd src/
  717. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  718. lib.rs
  719. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs lib.rs
  720. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs lib.rs
  721. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ cd ..
  722. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  723. Cargo.toml src
  724. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs Cargo.toml
  725. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  726. Cargo.toml src
  727. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd ..
  728. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  729. On branch master
  730. Your branch is ahead of 'origin/master' by 12 commits.
  731. (use "git push" to publish your local commits)
  732.  
  733. Changes not staged for commit:
  734. (use "git add <file>..." to update what will be committed)
  735. (use "git checkout -- <file>..." to discard changes in working directory)
  736.  
  737. modified: client.py
  738.  
  739. Untracked files:
  740. (use "git add <file>..." to include in what will be committed)
  741.  
  742. fs
  743.  
  744. no changes added to commit (use "git add" and/or "git commit -a")
  745. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add client.py
  746. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git commit -m "updating client"
  747. [master a4509c6] updating client
  748. 1 file changed, 8 insertions(+), 4 deletions(-)
  749. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git push origin master
  750. Username for 'https://github.com': chtodd@haverford.edu
  751. Password for 'https://chtodd@haverford.edu@github.com':
  752. Counting objects: 38, done.
  753. Compressing objects: 100% (37/37), done.
  754. Writing objects: 100% (38/38), 7.33 KiB | 468.00 KiB/s, done.
  755. Total 38 (delta 19), reused 0 (delta 0)
  756. remote: Resolving deltas: 100% (19/19), completed with 1 local object.
  757. To https://github.com/ChandlerTodd/file-server-group-sec.git
  758. 91ca98d..a4509c6 master -> master
  759. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  760. client.py Makefile rop_gadgets.txt server.py test_get.py
  761. example-files PyServer.py run_tests.py setup_tests.sh test_post_file.py
  762. files README.md rust-server SOURCES.md test_put_file.py
  763. fs RESOURCES.md server.c test_get_harder.py
  764. testvm@testvm:~/Desktop/project2/file-server-group-sec$ cd rust-server/
  765. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  766. Cargo.toml src
  767. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd ../../..
  768. testvm@testvm:~/Desktop$ ls
  769. a.out out #out# out~ part5.s project1 project2 testStuff #write.s# write.s write.s~
  770. testvm@testvm:~/Desktop$ cd ..
  771. testvm@testvm:~$ ls
  772. a.out Desktop Downloads #*message*-20180130-124646# Pictures rustStuff Templates
  773. build Documents edb-debugger Music Public src Videos
  774. testvm@testvm:~$ cd rustStuff/
  775. testvm@testvm:~/rustStuff$ ls
  776. guessing_game hello_world hello_world2
  777. testvm@testvm:~/rustStuff$ cargo new euler --bin
  778. Created binary (application) `euler` project
  779. testvm@testvm:~/rustStuff$ cd euler/
  780. testvm@testvm:~/rustStuff/euler$ ls
  781. Cargo.toml src
  782. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  783. testvm@testvm:~/rustStuff/euler$ cargo run
  784. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  785. error: this file contains an un-closed delimiter
  786. --> src/main.rs:18:3
  787. |
  788. 18 | }
  789. | ^
  790. |
  791. help: did you mean to close this delimiter?
  792. --> src/main.rs:2:16
  793. |
  794. 2 | fn mutliples() {
  795. | ^
  796.  
  797. error: expected one of `.`, `;`, `?`, `}`, or an operator, found `fn`
  798. --> src/main.rs:16:1
  799. |
  800. 14 | println!(total)
  801. | - expected one of `.`, `;`, `?`, `}`, or an operator here
  802. 15 |
  803. 16 | fn main() {
  804. | ^^ unexpected token
  805.  
  806. error: expected a literal
  807. --> src/main.rs:14:14
  808. |
  809. 14 | println!(total)
  810. | ^^^^^
  811.  
  812. error: aborting due to 3 previous errors
  813.  
  814. error: Could not compile `euler`.
  815.  
  816. To learn more, run the command again with --verbose.
  817. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  818. testvm@testvm:~/rustStuff/euler$ cargo run
  819. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  820. error: this file contains an un-closed delimiter
  821. --> src/main.rs:18:3
  822. |
  823. 18 | }
  824. | ^
  825. |
  826. help: did you mean to close this delimiter?
  827. --> src/main.rs:2:16
  828. |
  829. 2 | fn mutliples() {
  830. | ^
  831.  
  832. error: expected a literal
  833. --> src/main.rs:14:14
  834. |
  835. 14 | println!(total);
  836. | ^^^^^
  837.  
  838. error: aborting due to 2 previous errors
  839.  
  840. error: Could not compile `euler`.
  841.  
  842. To learn more, run the command again with --verbose.
  843. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  844. testvm@testvm:~/rustStuff/euler$ cargo run
  845. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  846. error: expected a literal
  847. --> src/main.rs:14:14
  848. |
  849. 14 | println!(total);
  850. | ^^^^^
  851.  
  852. error: aborting due to previous error
  853.  
  854. error: Could not compile `euler`.
  855.  
  856. To learn more, run the command again with --verbose.
  857. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  858. testvm@testvm:~/rustStuff/euler$ cargo run
  859. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  860. error: expected a literal
  861. --> src/main.rs:14:14
  862. |
  863. 14 | println!(total);
  864. | ^^^^^
  865.  
  866. error: aborting due to previous error
  867.  
  868. error: Could not compile `euler`.
  869.  
  870. To learn more, run the command again with --verbose.
  871. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  872. testvm@testvm:~/rustStuff/euler$ cargo run
  873. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  874. error[E0425]: cannot find function `multiples` in this scope
  875. --> src/main.rs:19:5
  876. |
  877. 19 | multiples();
  878. | ^^^^^^^^^ did you mean `mutliples`?
  879.  
  880. error: aborting due to previous error
  881.  
  882. error: Could not compile `euler`.
  883.  
  884. To learn more, run the command again with --verbose.
  885. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  886. testvm@testvm:~/rustStuff/euler$ cargo run
  887. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  888. error: expected one of `!` or `::`, found `(`
  889. --> src/main.rs:18:10
  890. |
  891. 18 | multiples();
  892. | ^ expected one of `!` or `::` here
  893.  
  894. error: aborting due to previous error
  895.  
  896. error: Could not compile `euler`.
  897.  
  898. To learn more, run the command again with --verbose.
  899. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  900. testvm@testvm:~/rustStuff/euler$ cargo run
  901. Compiling euler v0.1.0 (file:///home/testvm/rustStuff/euler)
  902. Finished dev [unoptimized + debuginfo] target(s) in 0.37 secs
  903. Running `target/debug/euler`
  904. Sum of stuff: 234168
  905. testvm@testvm:~/rustStuff/euler$ emacs src/main.rs
  906. testvm@testvm:~/rustStuff/euler$ cd ..
  907. testvm@testvm:~/rustStuff$ cd ..
  908. testvm@testvm:~$ cd Desktop/project2/file-server-group-sec/
  909. testvm@testvm:~/Desktop/project2/file-server-group-sec$ cd rust-server/
  910. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  911. Cargo.toml src
  912. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd src/
  913. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  914. lib.rs
  915. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ eamcs main.rs
  916. No command 'eamcs' found, did you mean:
  917. Command 'emacs' from package 'emacs24-lucid' (universe)
  918. Command 'emacs' from package 'emacs25' (main)
  919. Command 'emacs' from package 'emacs24' (universe)
  920. Command 'emacs' from package 'emacs25-nox' (main)
  921. Command 'emacs' from package 'emacs24-nox' (universe)
  922. Command 'emacs' from package 'jove' (universe)
  923. Command 'emacs' from package 'e3' (universe)
  924. Command 'emacs' from package 'emacs25-lucid' (universe)
  925. eamcs: command not found
  926. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs main.rs
  927. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ cd ..
  928. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  929. Cargo.toml src
  930. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  931. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  932. Finished dev [unoptimized + debuginfo] target(s) in 0.51 secs
  933. Running `target/debug/server`
  934. Hello, world
  935. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  936. Cargo.lock Cargo.toml src target
  937. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd target/
  938. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/target$ ls
  939. debug
  940. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/target$ cd ..
  941. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd src/
  942. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  943. lib.rs main.rs
  944. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ cd ..
  945. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs Cargo.toml
  946. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  947. Updating registry `https://github.com/rust-lang/crates.io-index`
  948. Downloading hyper v0.11.18
  949. Downloading iovec v0.1.2
  950. Downloading mime v0.3.5
  951. Downloading bytes v0.4.6
  952. Downloading futures-cpupool v0.1.8
  953. Downloading futures v0.1.18
  954. Downloading percent-encoding v1.0.1
  955. Downloading tokio-io v0.1.5
  956. Downloading base64 v0.9.0
  957. Downloading httparse v1.2.4
  958. Downloading tokio-service v0.1.0
  959. Downloading tokio-core v0.1.12
  960. Downloading relay v0.1.1
  961. Downloading unicase v2.1.0
  962. Downloading time v0.1.39
  963. Downloading log v0.4.1
  964. Downloading tokio-proto v0.1.1
  965. Downloading language-tags v0.2.2
  966. Downloading version_check v0.1.3
  967. Downloading byteorder v1.2.1
  968. Downloading num_cpus v1.8.0
  969. Downloading cfg-if v0.1.2
  970. Downloading safemem v0.2.0
  971. Downloading mio v0.6.13
  972. Downloading slab v0.4.0
  973. Downloading scoped-tls v0.1.0
  974. Downloading lazycell v0.6.0
  975. Downloading log v0.3.9
  976. Downloading slab v0.3.0
  977. Downloading net2 v0.2.31
  978. Downloading take v0.1.0
  979. Downloading smallvec v0.2.1
  980. Compiling smallvec v0.2.1
  981. Compiling safemem v0.2.0
  982. Compiling libc v0.2.36
  983. Compiling slab v0.4.0
  984. Compiling version_check v0.1.3
  985. Compiling cfg-if v0.1.2
  986. Compiling take v0.1.0
  987. Compiling slab v0.3.0
  988. Compiling byteorder v1.2.1
  989. Compiling httparse v1.2.4
  990. Compiling scoped-tls v0.1.0
  991. Compiling futures v0.1.18
  992. Compiling lazycell v0.6.0
  993. Compiling percent-encoding v1.0.1
  994. Compiling language-tags v0.2.2
  995. Compiling time v0.1.39
  996. Compiling rand v0.4.2
  997. Compiling iovec v0.1.2
  998. Compiling num_cpus v1.8.0
  999. Compiling unicase v2.1.0
  1000. Compiling log v0.4.1
  1001. Compiling net2 v0.2.31
  1002. Compiling base64 v0.9.0
  1003. Compiling tokio-service v0.1.0
  1004. Compiling relay v0.1.1
  1005. Compiling rand v0.3.22
  1006. Compiling bytes v0.4.6
  1007. Compiling futures-cpupool v0.1.8
  1008. Compiling log v0.3.9
  1009. Compiling tokio-io v0.1.5
  1010. Compiling mio v0.6.13
  1011. Compiling mime v0.3.5
  1012. Compiling tokio-core v0.1.12
  1013. Compiling tokio-proto v0.1.1
  1014. Compiling hyper v0.11.18
  1015. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1016. Finished dev [unoptimized + debuginfo] target(s) in 51.39 secs
  1017. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1018. Cargo.lock Cargo.toml src target
  1019. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs Cargo.
  1020. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs Cargo.toml
  1021. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1022. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1023. Finished dev [unoptimized + debuginfo] target(s) in 0.51 secs
  1024. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1025. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd
  1026. testvm@testvm:~$ emacs .gitconfig
  1027. testvm@testvm:~$ cd Desktop/project2/file-server-group-sec/rust-server/
  1028. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1029. Cargo.lock Cargo.toml src target
  1030. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1031. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd ..
  1032. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1033. On branch master
  1034. Your branch is up-to-date with 'origin/master'.
  1035.  
  1036. Changes not staged for commit:
  1037. (use "git add <file>..." to update what will be committed)
  1038. (use "git checkout -- <file>..." to discard changes in working directory)
  1039.  
  1040. modified: rust-server/Cargo.toml
  1041.  
  1042. Untracked files:
  1043. (use "git add <file>..." to include in what will be committed)
  1044.  
  1045. fs
  1046. rust-server/Cargo.lock
  1047. rust-server/src/main.rs
  1048. rust-server/src/main.rs~
  1049. rust-server/target/
  1050.  
  1051. no changes added to commit (use "git add" and/or "git commit -a")
  1052. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add rust-server/
  1053. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1054. On branch master
  1055. Your branch is up-to-date with 'origin/master'.
  1056.  
  1057. Changes to be committed:
  1058. (use "git reset HEAD <file>..." to unstage)
  1059.  
  1060. new file: rust-server/Cargo.lock
  1061. modified: rust-server/Cargo.toml
  1062. new file: rust-server/src/main.rs
  1063. new file: rust-server/src/main.rs~
  1064. new file: rust-server/target/debug/.cargo-lock
  1065. new file: rust-server/target/debug/.fingerprint/base64-6f6980d819e166d8/dep-lib-base64-6f6980d819e166d8
  1066. new file: rust-server/target/debug/.fingerprint/base64-6f6980d819e166d8/lib-base64-6f6980d819e166d8
  1067. new file: rust-server/target/debug/.fingerprint/base64-6f6980d819e166d8/lib-base64-6f6980d819e166d8.json
  1068. new file: rust-server/target/debug/.fingerprint/byteorder-c1d259c809265431/dep-lib-byteorder-c1d259c809265431
  1069. new file: rust-server/target/debug/.fingerprint/byteorder-c1d259c809265431/lib-byteorder-c1d259c809265431
  1070. new file: rust-server/target/debug/.fingerprint/byteorder-c1d259c809265431/lib-byteorder-c1d259c809265431.json
  1071. new file: rust-server/target/debug/.fingerprint/bytes-b7a2512c1ce59276/dep-lib-bytes-b7a2512c1ce59276
  1072. new file: rust-server/target/debug/.fingerprint/bytes-b7a2512c1ce59276/lib-bytes-b7a2512c1ce59276
  1073. new file: rust-server/target/debug/.fingerprint/bytes-b7a2512c1ce59276/lib-bytes-b7a2512c1ce59276.json
  1074. new file: rust-server/target/debug/.fingerprint/cfg-if-fe1616571f9f26ae/dep-lib-cfg_if-fe1616571f9f26ae
  1075. new file: rust-server/target/debug/.fingerprint/cfg-if-fe1616571f9f26ae/lib-cfg_if-fe1616571f9f26ae
  1076. new file: rust-server/target/debug/.fingerprint/cfg-if-fe1616571f9f26ae/lib-cfg_if-fe1616571f9f26ae.json
  1077. new file: rust-server/target/debug/.fingerprint/futures-2141d10505bea9de/dep-lib-futures-2141d10505bea9de
  1078. new file: rust-server/target/debug/.fingerprint/futures-2141d10505bea9de/lib-futures-2141d10505bea9de
  1079. new file: rust-server/target/debug/.fingerprint/futures-2141d10505bea9de/lib-futures-2141d10505bea9de.json
  1080. new file: rust-server/target/debug/.fingerprint/futures-cpupool-7f363b00d1214dde/dep-lib-futures_cpupool-7f363b00d1214dde
  1081. new file: rust-server/target/debug/.fingerprint/futures-cpupool-7f363b00d1214dde/lib-futures_cpupool-7f363b00d1214dde
  1082. new file: rust-server/target/debug/.fingerprint/futures-cpupool-7f363b00d1214dde/lib-futures_cpupool-7f363b00d1214dde.json
  1083. new file: rust-server/target/debug/.fingerprint/httparse-0a930cfd42408671/dep-lib-httparse-0a930cfd42408671
  1084. new file: rust-server/target/debug/.fingerprint/httparse-0a930cfd42408671/lib-httparse-0a930cfd42408671
  1085. new file: rust-server/target/debug/.fingerprint/httparse-0a930cfd42408671/lib-httparse-0a930cfd42408671.json
  1086. new file: rust-server/target/debug/.fingerprint/hyper-017a3cdc6736a241/dep-lib-hyper-017a3cdc6736a241
  1087. new file: rust-server/target/debug/.fingerprint/hyper-017a3cdc6736a241/lib-hyper-017a3cdc6736a241
  1088. new file: rust-server/target/debug/.fingerprint/hyper-017a3cdc6736a241/lib-hyper-017a3cdc6736a241.json
  1089. new file: rust-server/target/debug/.fingerprint/iovec-9ed4889681d77b26/dep-lib-iovec-9ed4889681d77b26
  1090. new file: rust-server/target/debug/.fingerprint/iovec-9ed4889681d77b26/lib-iovec-9ed4889681d77b26
  1091. new file: rust-server/target/debug/.fingerprint/iovec-9ed4889681d77b26/lib-iovec-9ed4889681d77b26.json
  1092. new file: rust-server/target/debug/.fingerprint/language-tags-11629b31b81f3d22/dep-lib-language_tags-11629b31b81f3d22
  1093. new file: rust-server/target/debug/.fingerprint/language-tags-11629b31b81f3d22/lib-language_tags-11629b31b81f3d22
  1094. new file: rust-server/target/debug/.fingerprint/language-tags-11629b31b81f3d22/lib-language_tags-11629b31b81f3d22.json
  1095. new file: rust-server/target/debug/.fingerprint/lazycell-2b3419a41642dcca/dep-lib-lazycell-2b3419a41642dcca
  1096. new file: rust-server/target/debug/.fingerprint/lazycell-2b3419a41642dcca/lib-lazycell-2b3419a41642dcca
  1097. new file: rust-server/target/debug/.fingerprint/lazycell-2b3419a41642dcca/lib-lazycell-2b3419a41642dcca.json
  1098. new file: rust-server/target/debug/.fingerprint/libc-bb7c89f2ce8096c8/dep-lib-libc-bb7c89f2ce8096c8
  1099. new file: rust-server/target/debug/.fingerprint/libc-bb7c89f2ce8096c8/lib-libc-bb7c89f2ce8096c8
  1100. new file: rust-server/target/debug/.fingerprint/libc-bb7c89f2ce8096c8/lib-libc-bb7c89f2ce8096c8.json
  1101. new file: rust-server/target/debug/.fingerprint/log-2761e801ce580074/dep-lib-log-2761e801ce580074
  1102. new file: rust-server/target/debug/.fingerprint/log-2761e801ce580074/lib-log-2761e801ce580074
  1103. new file: rust-server/target/debug/.fingerprint/log-2761e801ce580074/lib-log-2761e801ce580074.json
  1104. new file: rust-server/target/debug/.fingerprint/log-5ab3018dbdb6887a/dep-lib-log-5ab3018dbdb6887a
  1105. new file: rust-server/target/debug/.fingerprint/log-5ab3018dbdb6887a/lib-log-5ab3018dbdb6887a
  1106. new file: rust-server/target/debug/.fingerprint/log-5ab3018dbdb6887a/lib-log-5ab3018dbdb6887a.json
  1107. new file: rust-server/target/debug/.fingerprint/mime-269c0d61b3074e73/dep-lib-mime-269c0d61b3074e73
  1108. new file: rust-server/target/debug/.fingerprint/mime-269c0d61b3074e73/lib-mime-269c0d61b3074e73
  1109. new file: rust-server/target/debug/.fingerprint/mime-269c0d61b3074e73/lib-mime-269c0d61b3074e73.json
  1110. new file: rust-server/target/debug/.fingerprint/mio-ee9b720c06a280c7/dep-lib-mio-ee9b720c06a280c7
  1111. new file: rust-server/target/debug/.fingerprint/mio-ee9b720c06a280c7/lib-mio-ee9b720c06a280c7
  1112. new file: rust-server/target/debug/.fingerprint/mio-ee9b720c06a280c7/lib-mio-ee9b720c06a280c7.json
  1113. new file: rust-server/target/debug/.fingerprint/net2-1683912ed6087d42/dep-lib-net2-1683912ed6087d42
  1114. new file: rust-server/target/debug/.fingerprint/net2-1683912ed6087d42/lib-net2-1683912ed6087d42
  1115. new file: rust-server/target/debug/.fingerprint/net2-1683912ed6087d42/lib-net2-1683912ed6087d42.json
  1116. new file: rust-server/target/debug/.fingerprint/num_cpus-1af4c2bd3d90b5f5/dep-lib-num_cpus-1af4c2bd3d90b5f5
  1117. new file: rust-server/target/debug/.fingerprint/num_cpus-1af4c2bd3d90b5f5/lib-num_cpus-1af4c2bd3d90b5f5
  1118. new file: rust-server/target/debug/.fingerprint/num_cpus-1af4c2bd3d90b5f5/lib-num_cpus-1af4c2bd3d90b5f5.json
  1119. new file: rust-server/target/debug/.fingerprint/percent-encoding-849f8f474757eb59/dep-lib-percent_encoding-849f8f474757eb59
  1120. new file: rust-server/target/debug/.fingerprint/percent-encoding-849f8f474757eb59/lib-percent_encoding-849f8f474757eb59
  1121. new file: rust-server/target/debug/.fingerprint/percent-encoding-849f8f474757eb59/lib-percent_encoding-849f8f474757eb59.json
  1122. new file: rust-server/target/debug/.fingerprint/rand-8ab0e1ffb77ce137/dep-lib-rand-8ab0e1ffb77ce137
  1123. new file: rust-server/target/debug/.fingerprint/rand-8ab0e1ffb77ce137/lib-rand-8ab0e1ffb77ce137
  1124. new file: rust-server/target/debug/.fingerprint/rand-8ab0e1ffb77ce137/lib-rand-8ab0e1ffb77ce137.json
  1125. new file: rust-server/target/debug/.fingerprint/rand-d6fc38bfb757149d/dep-lib-rand-d6fc38bfb757149d
  1126. new file: rust-server/target/debug/.fingerprint/rand-d6fc38bfb757149d/lib-rand-d6fc38bfb757149d
  1127. new file: rust-server/target/debug/.fingerprint/rand-d6fc38bfb757149d/lib-rand-d6fc38bfb757149d.json
  1128. new file: rust-server/target/debug/.fingerprint/relay-9cc332244b2cc58c/dep-lib-relay-9cc332244b2cc58c
  1129. new file: rust-server/target/debug/.fingerprint/relay-9cc332244b2cc58c/lib-relay-9cc332244b2cc58c
  1130. new file: rust-server/target/debug/.fingerprint/relay-9cc332244b2cc58c/lib-relay-9cc332244b2cc58c.json
  1131. new file: rust-server/target/debug/.fingerprint/safemem-a440e1062e1babf4/dep-lib-safemem-a440e1062e1babf4
  1132. new file: rust-server/target/debug/.fingerprint/safemem-a440e1062e1babf4/lib-safemem-a440e1062e1babf4
  1133. new file: rust-server/target/debug/.fingerprint/safemem-a440e1062e1babf4/lib-safemem-a440e1062e1babf4.json
  1134. new file: rust-server/target/debug/.fingerprint/scoped-tls-48bd784f27683b7b/dep-lib-scoped_tls-48bd784f27683b7b
  1135. new file: rust-server/target/debug/.fingerprint/scoped-tls-48bd784f27683b7b/lib-scoped_tls-48bd784f27683b7b
  1136. new file: rust-server/target/debug/.fingerprint/scoped-tls-48bd784f27683b7b/lib-scoped_tls-48bd784f27683b7b.json
  1137. new file: rust-server/target/debug/.fingerprint/server-341294d4fd6de71b/dep-lib-server-341294d4fd6de71b
  1138. new file: rust-server/target/debug/.fingerprint/server-341294d4fd6de71b/lib-server-341294d4fd6de71b
  1139. new file: rust-server/target/debug/.fingerprint/server-341294d4fd6de71b/lib-server-341294d4fd6de71b.json
  1140. new file: rust-server/target/debug/.fingerprint/server-62fe6fe44909e662/bin-server-62fe6fe44909e662
  1141. new file: rust-server/target/debug/.fingerprint/server-62fe6fe44909e662/bin-server-62fe6fe44909e662.json
  1142. new file: rust-server/target/debug/.fingerprint/server-62fe6fe44909e662/dep-bin-server-62fe6fe44909e662
  1143. new file: rust-server/target/debug/.fingerprint/slab-10607eee97d8cc21/dep-lib-slab-10607eee97d8cc21
  1144. new file: rust-server/target/debug/.fingerprint/slab-10607eee97d8cc21/lib-slab-10607eee97d8cc21
  1145. new file: rust-server/target/debug/.fingerprint/slab-10607eee97d8cc21/lib-slab-10607eee97d8cc21.json
  1146. new file: rust-server/target/debug/.fingerprint/slab-7007c22aeb7cc13c/dep-lib-slab-7007c22aeb7cc13c
  1147. new file: rust-server/target/debug/.fingerprint/slab-7007c22aeb7cc13c/lib-slab-7007c22aeb7cc13c
  1148. new file: rust-server/target/debug/.fingerprint/slab-7007c22aeb7cc13c/lib-slab-7007c22aeb7cc13c.json
  1149. new file: rust-server/target/debug/.fingerprint/smallvec-4407db67158e0130/dep-lib-smallvec-4407db67158e0130
  1150. new file: rust-server/target/debug/.fingerprint/smallvec-4407db67158e0130/lib-smallvec-4407db67158e0130
  1151. new file: rust-server/target/debug/.fingerprint/smallvec-4407db67158e0130/lib-smallvec-4407db67158e0130.json
  1152. new file: rust-server/target/debug/.fingerprint/take-bc568e2c8ab4b320/dep-lib-take-bc568e2c8ab4b320
  1153. new file: rust-server/target/debug/.fingerprint/take-bc568e2c8ab4b320/lib-take-bc568e2c8ab4b320
  1154. new file: rust-server/target/debug/.fingerprint/take-bc568e2c8ab4b320/lib-take-bc568e2c8ab4b320.json
  1155. new file: rust-server/target/debug/.fingerprint/time-68e5083ad2f08f9d/dep-lib-time-68e5083ad2f08f9d
  1156. new file: rust-server/target/debug/.fingerprint/time-68e5083ad2f08f9d/lib-time-68e5083ad2f08f9d
  1157. new file: rust-server/target/debug/.fingerprint/time-68e5083ad2f08f9d/lib-time-68e5083ad2f08f9d.json
  1158. new file: rust-server/target/debug/.fingerprint/tokio-core-7e1292d3e601fa73/dep-lib-tokio_core-7e1292d3e601fa73
  1159. new file: rust-server/target/debug/.fingerprint/tokio-core-7e1292d3e601fa73/lib-tokio_core-7e1292d3e601fa73
  1160. new file: rust-server/target/debug/.fingerprint/tokio-core-7e1292d3e601fa73/lib-tokio_core-7e1292d3e601fa73.json
  1161. new file: rust-server/target/debug/.fingerprint/tokio-io-2fac47cad3f4ad6c/dep-lib-tokio_io-2fac47cad3f4ad6c
  1162. new file: rust-server/target/debug/.fingerprint/tokio-io-2fac47cad3f4ad6c/lib-tokio_io-2fac47cad3f4ad6c
  1163. new file: rust-server/target/debug/.fingerprint/tokio-io-2fac47cad3f4ad6c/lib-tokio_io-2fac47cad3f4ad6c.json
  1164. new file: rust-server/target/debug/.fingerprint/tokio-proto-dea9f63c6b9d13d8/dep-lib-tokio_proto-dea9f63c6b9d13d8
  1165. new file: rust-server/target/debug/.fingerprint/tokio-proto-dea9f63c6b9d13d8/lib-tokio_proto-dea9f63c6b9d13d8
  1166. new file: rust-server/target/debug/.fingerprint/tokio-proto-dea9f63c6b9d13d8/lib-tokio_proto-dea9f63c6b9d13d8.json
  1167. new file: rust-server/target/debug/.fingerprint/tokio-service-57bbf273942aac20/dep-lib-tokio_service-57bbf273942aac20
  1168. new file: rust-server/target/debug/.fingerprint/tokio-service-57bbf273942aac20/lib-tokio_service-57bbf273942aac20
  1169. new file: rust-server/target/debug/.fingerprint/tokio-service-57bbf273942aac20/lib-tokio_service-57bbf273942aac20.json
  1170. new file: rust-server/target/debug/.fingerprint/unicase-b162822e1c5df7cf/dep-lib-unicase-b162822e1c5df7cf
  1171. new file: rust-server/target/debug/.fingerprint/unicase-b162822e1c5df7cf/lib-unicase-b162822e1c5df7cf
  1172. new file: rust-server/target/debug/.fingerprint/unicase-b162822e1c5df7cf/lib-unicase-b162822e1c5df7cf.json
  1173. new file: rust-server/target/debug/.fingerprint/unicase-ceb190194fd27abe/build-script-build_script_build-ceb190194fd27abe
  1174. new file: rust-server/target/debug/.fingerprint/unicase-ceb190194fd27abe/build-script-build_script_build-ceb190194fd27abe.json
  1175. new file: rust-server/target/debug/.fingerprint/unicase-ceb190194fd27abe/dep-build-script-build_script_build-ceb190194fd27abe
  1176. new file: rust-server/target/debug/.fingerprint/unicase-f6143644b03f7075/build
  1177. new file: rust-server/target/debug/.fingerprint/unicase-f6143644b03f7075/build.json
  1178. new file: rust-server/target/debug/.fingerprint/version_check-cb9a6d9a9342a363/dep-lib-version_check-cb9a6d9a9342a363
  1179. new file: rust-server/target/debug/.fingerprint/version_check-cb9a6d9a9342a363/lib-version_check-cb9a6d9a9342a363
  1180. new file: rust-server/target/debug/.fingerprint/version_check-cb9a6d9a9342a363/lib-version_check-cb9a6d9a9342a363.json
  1181. new file: rust-server/target/debug/build/unicase-ceb190194fd27abe/build-script-build
  1182. new file: rust-server/target/debug/build/unicase-ceb190194fd27abe/build_script_build-ceb190194fd27abe
  1183. new file: rust-server/target/debug/build/unicase-f6143644b03f7075/output
  1184. new file: rust-server/target/debug/build/unicase-f6143644b03f7075/stderr
  1185. new file: rust-server/target/debug/deps/libbase64-6f6980d819e166d8.rlib
  1186. new file: rust-server/target/debug/deps/libbyteorder-c1d259c809265431.rlib
  1187. new file: rust-server/target/debug/deps/libbytes-b7a2512c1ce59276.rlib
  1188. new file: rust-server/target/debug/deps/libcfg_if-fe1616571f9f26ae.rlib
  1189. new file: rust-server/target/debug/deps/libfutures-2141d10505bea9de.rlib
  1190. new file: rust-server/target/debug/deps/libfutures_cpupool-7f363b00d1214dde.rlib
  1191. new file: rust-server/target/debug/deps/libhttparse-0a930cfd42408671.rlib
  1192. new file: rust-server/target/debug/deps/libhyper-017a3cdc6736a241.rlib
  1193. new file: rust-server/target/debug/deps/libiovec-9ed4889681d77b26.rlib
  1194. new file: rust-server/target/debug/deps/liblanguage_tags-11629b31b81f3d22.rlib
  1195. new file: rust-server/target/debug/deps/liblazycell-2b3419a41642dcca.rlib
  1196. new file: rust-server/target/debug/deps/liblibc-bb7c89f2ce8096c8.rlib
  1197. new file: rust-server/target/debug/deps/liblog-2761e801ce580074.rlib
  1198. new file: rust-server/target/debug/deps/liblog-5ab3018dbdb6887a.rlib
  1199. new file: rust-server/target/debug/deps/libmime-269c0d61b3074e73.rlib
  1200. new file: rust-server/target/debug/deps/libmio-ee9b720c06a280c7.rlib
  1201. new file: rust-server/target/debug/deps/libnet2-1683912ed6087d42.rlib
  1202. new file: rust-server/target/debug/deps/libnum_cpus-1af4c2bd3d90b5f5.rlib
  1203. new file: rust-server/target/debug/deps/libpercent_encoding-849f8f474757eb59.rlib
  1204. new file: rust-server/target/debug/deps/librand-8ab0e1ffb77ce137.rlib
  1205. new file: rust-server/target/debug/deps/librand-d6fc38bfb757149d.rlib
  1206. new file: rust-server/target/debug/deps/librelay-9cc332244b2cc58c.rlib
  1207. new file: rust-server/target/debug/deps/libsafemem-a440e1062e1babf4.rlib
  1208. new file: rust-server/target/debug/deps/libscoped_tls-48bd784f27683b7b.rlib
  1209. new file: rust-server/target/debug/deps/libserver-341294d4fd6de71b.rlib
  1210. new file: rust-server/target/debug/deps/libslab-10607eee97d8cc21.rlib
  1211. new file: rust-server/target/debug/deps/libslab-7007c22aeb7cc13c.rlib
  1212. new file: rust-server/target/debug/deps/libsmallvec-4407db67158e0130.rlib
  1213. new file: rust-server/target/debug/deps/libtake-bc568e2c8ab4b320.rlib
  1214. new file: rust-server/target/debug/deps/libtime-68e5083ad2f08f9d.rlib
  1215. new file: rust-server/target/debug/deps/libtokio_core-7e1292d3e601fa73.rlib
  1216. new file: rust-server/target/debug/deps/libtokio_io-2fac47cad3f4ad6c.rlib
  1217. new file: rust-server/target/debug/deps/libtokio_proto-dea9f63c6b9d13d8.rlib
  1218. new file: rust-server/target/debug/deps/libtokio_service-57bbf273942aac20.rlib
  1219. new file: rust-server/target/debug/deps/libunicase-b162822e1c5df7cf.rlib
  1220. new file: rust-server/target/debug/deps/libversion_check-cb9a6d9a9342a363.rlib
  1221. new file: rust-server/target/debug/deps/server-62fe6fe44909e662
  1222. new file: rust-server/target/debug/libserver.d
  1223. new file: rust-server/target/debug/libserver.rlib
  1224. new file: rust-server/target/debug/server
  1225. new file: rust-server/target/debug/server.d
  1226.  
  1227. Untracked files:
  1228. (use "git add <file>..." to include in what will be committed)
  1229.  
  1230. fs
  1231.  
  1232. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git reset HEAD
  1233. Unstaged changes after reset:
  1234. M rust-server/Cargo.toml
  1235. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  1236. client.py Makefile rop_gadgets.txt server.py test_get.py
  1237. example-files PyServer.py run_tests.py setup_tests.sh test_post_file.py
  1238. files README.md rust-server SOURCES.md test_put_file.py
  1239. fs RESOURCES.md server.c test_get_harder.py
  1240. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1241. On branch master
  1242. Your branch is up-to-date with 'origin/master'.
  1243.  
  1244. Changes not staged for commit:
  1245. (use "git add <file>..." to update what will be committed)
  1246. (use "git checkout -- <file>..." to discard changes in working directory)
  1247.  
  1248. modified: rust-server/Cargo.toml
  1249.  
  1250. Untracked files:
  1251. (use "git add <file>..." to include in what will be committed)
  1252.  
  1253. fs
  1254. rust-server/Cargo.lock
  1255. rust-server/src/main.rs
  1256. rust-server/src/main.rs~
  1257. rust-server/target/
  1258.  
  1259. no changes added to commit (use "git add" and/or "git commit -a")
  1260. testvm@testvm:~/Desktop/project2/file-server-group-sec$ cd rust-server/
  1261. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1262. Cargo.lock Cargo.toml src target
  1263. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs .gitignore
  1264. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1265. Cargo.lock Cargo.toml src target
  1266. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd ..
  1267. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1268. On branch master
  1269. Your branch is up-to-date with 'origin/master'.
  1270.  
  1271. Changes not staged for commit:
  1272. (use "git add <file>..." to update what will be committed)
  1273. (use "git checkout -- <file>..." to discard changes in working directory)
  1274.  
  1275. modified: rust-server/Cargo.toml
  1276.  
  1277. Untracked files:
  1278. (use "git add <file>..." to include in what will be committed)
  1279.  
  1280. fs
  1281. rust-server/.gitignore
  1282. rust-server/Cargo.lock
  1283. rust-server/src/main.rs
  1284. rust-server/src/main.rs~
  1285.  
  1286. no changes added to commit (use "git add" and/or "git commit -a")
  1287. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add rust-server/.gitignore
  1288. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add rust-server/Cargo.lock
  1289. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1290. On branch master
  1291. Your branch is up-to-date with 'origin/master'.
  1292.  
  1293. Changes to be committed:
  1294. (use "git reset HEAD <file>..." to unstage)
  1295.  
  1296. new file: rust-server/.gitignore
  1297. new file: rust-server/Cargo.lock
  1298.  
  1299. Changes not staged for commit:
  1300. (use "git add <file>..." to update what will be committed)
  1301. (use "git checkout -- <file>..." to discard changes in working directory)
  1302.  
  1303. modified: rust-server/Cargo.toml
  1304.  
  1305. Untracked files:
  1306. (use "git add <file>..." to include in what will be committed)
  1307.  
  1308. fs
  1309. rust-server/src/main.rs
  1310. rust-server/src/main.rs~
  1311.  
  1312. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add rust-server/src/main.rs
  1313. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1314. On branch master
  1315. Your branch is up-to-date with 'origin/master'.
  1316.  
  1317. Changes to be committed:
  1318. (use "git reset HEAD <file>..." to unstage)
  1319.  
  1320. new file: rust-server/.gitignore
  1321. new file: rust-server/Cargo.lock
  1322. new file: rust-server/src/main.rs
  1323.  
  1324. Changes not staged for commit:
  1325. (use "git add <file>..." to update what will be committed)
  1326. (use "git checkout -- <file>..." to discard changes in working directory)
  1327.  
  1328. modified: rust-server/Cargo.toml
  1329.  
  1330. Untracked files:
  1331. (use "git add <file>..." to include in what will be committed)
  1332.  
  1333. fs
  1334. rust-server/src/main.rs~
  1335.  
  1336. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git commit -m "starting on the rust server, also added a git ignore file
  1337. > "
  1338. [master 1492cb2] starting on the rust server, also added a git ignore file
  1339. 3 files changed, 464 insertions(+)
  1340. create mode 100644 rust-server/.gitignore
  1341. create mode 100644 rust-server/Cargo.lock
  1342. create mode 100644 rust-server/src/main.rs
  1343. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1344. On branch master
  1345. Your branch is ahead of 'origin/master' by 1 commit.
  1346. (use "git push" to publish your local commits)
  1347.  
  1348. Changes not staged for commit:
  1349. (use "git add <file>..." to update what will be committed)
  1350. (use "git checkout -- <file>..." to discard changes in working directory)
  1351.  
  1352. modified: rust-server/Cargo.toml
  1353.  
  1354. Untracked files:
  1355. (use "git add <file>..." to include in what will be committed)
  1356.  
  1357. fs
  1358. rust-server/src/main.rs~
  1359.  
  1360. no changes added to commit (use "git add" and/or "git commit -a")
  1361. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git add rust-server/Cargo.toml
  1362. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git commit -m" Forgot the toml file"
  1363. [master 966dedf] Forgot the toml file
  1364. 1 file changed, 2 insertions(+)
  1365. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git push upstream master
  1366. Username for 'https://github.com': chtodd@haverford.edu
  1367. Password for 'https://chtodd@haverford.edu@github.com':
  1368. To https://github.com/fordsec/file-server-group-sec
  1369. ! [rejected] master -> master (fetch first)
  1370. error: failed to push some refs to 'https://github.com/fordsec/file-server-group-sec'
  1371. hint: Updates were rejected because the remote contains work that you do
  1372. hint: not have locally. This is usually caused by another repository pushing
  1373. hint: to the same ref. You may want to first integrate the remote changes
  1374. hint: (e.g., 'git pull ...') before pushing again.
  1375. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  1376. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git pull upstream master
  1377. Username for 'https://github.com': chtodd@haverford.edu
  1378. Password for 'https://chtodd@haverford.edu@github.com':
  1379. remote: Counting objects: 18, done.
  1380. remote: Compressing objects: 100% (10/10), done.
  1381. remote: Total 18 (delta 10), reused 16 (delta 8), pack-reused 0
  1382. Unpacking objects: 100% (18/18), done.
  1383. From https://github.com/fordsec/file-server-group-sec
  1384. * branch master -> FETCH_HEAD
  1385. 4ddf928..19bc101 master -> upstream/master
  1386. error: The following untracked working tree files would be overwritten by merge:
  1387. fs
  1388. Please move or remove them before you merge.
  1389. Aborting
  1390. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  1391. client.py Makefile rop_gadgets.txt server.py test_get.py
  1392. example-files PyServer.py run_tests.py setup_tests.sh test_post_file.py
  1393. files README.md rust-server SOURCES.md test_put_file.py
  1394. fs RESOURCES.md server.c test_get_harder.py
  1395. testvm@testvm:~/Desktop/project2/file-server-group-sec$ rm fs
  1396. testvm@testvm:~/Desktop/project2/file-server-group-sec$ ls
  1397. client.py Makefile RESOURCES.md rust-server setup_tests.sh test_get.py
  1398. example-files PyServer.py rop_gadgets.txt server.c SOURCES.md test_post_file.py
  1399. files README.md run_tests.py server.py test_get_harder.py test_put_file.py
  1400. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git pull upstream master
  1401. Username for 'https://github.com': chtodd@haverford.edu
  1402. Password for 'https://chtodd@haverford.edu@github.com':
  1403. From https://github.com/fordsec/file-server-group-sec
  1404. * branch master -> FETCH_HEAD
  1405. Auto-merging client.py
  1406. CONFLICT (content): Merge conflict in client.py
  1407. Automatic merge failed; fix conflicts and then commit the result.
  1408. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1409. On branch master
  1410. Your branch is ahead of 'origin/master' by 2 commits.
  1411. (use "git push" to publish your local commits)
  1412.  
  1413. You have unmerged paths.
  1414. (fix conflicts and run "git commit")
  1415. (use "git merge --abort" to abort the merge)
  1416.  
  1417. Changes to be committed:
  1418.  
  1419. new file: .server.c.swp
  1420. new file: fs
  1421. new file: old_client.py
  1422.  
  1423. Unmerged paths:
  1424. (use "git add <file>..." to mark resolution)
  1425.  
  1426. both modified: client.py
  1427.  
  1428. Untracked files:
  1429. (use "git add <file>..." to include in what will be committed)
  1430.  
  1431. rust-server/src/main.rs~
  1432.  
  1433. testvm@testvm:~/Desktop/project2/file-server-group-sec$ emacs client.py
  1434. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1435. On branch master
  1436. Your branch is ahead of 'origin/master' by 2 commits.
  1437. (use "git push" to publish your local commits)
  1438.  
  1439. All conflicts fixed but you are still merging.
  1440. (use "git commit" to conclude merge)
  1441.  
  1442. Changes to be committed:
  1443.  
  1444. new file: .server.c.swp
  1445. modified: client.py
  1446. new file: fs
  1447. new file: old_client.py
  1448.  
  1449. Untracked files:
  1450. (use "git add <file>..." to include in what will be committed)
  1451.  
  1452. rust-server/src/main.rs~
  1453.  
  1454. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git commit -m "fixing some issues, hopefully has everything now"
  1455. [master 36517e3] fixing some issues, hopefully has everything now
  1456. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git status
  1457. On branch master
  1458. Your branch is ahead of 'origin/master' by 8 commits.
  1459. (use "git push" to publish your local commits)
  1460.  
  1461. Untracked files:
  1462. (use "git add <file>..." to include in what will be committed)
  1463.  
  1464. rust-server/src/main.rs~
  1465.  
  1466. nothing added to commit but untracked files present (use "git add" to track)
  1467. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git push origin master
  1468. Username for 'https://github.com': chtodd@haverford.edu
  1469. Password for 'https://chtodd@haverford.edu@github.com':
  1470. Counting objects: 32, done.
  1471. Compressing objects: 100% (31/31), done.
  1472. Writing objects: 100% (32/32), 20.46 KiB | 1.57 MiB/s, done.
  1473. Total 32 (delta 15), reused 0 (delta 0)
  1474. remote: Resolving deltas: 100% (15/15), completed with 4 local objects.
  1475. To https://github.com/ChandlerTodd/file-server-group-sec.git
  1476. a4509c6..36517e3 master -> master
  1477. testvm@testvm:~/Desktop/project2/file-server-group-sec$ git push upstream master
  1478. Username for 'https://github.com': chtodd@haverford.edu
  1479. Password for 'https://chtodd@haverford.edu@github.com':
  1480. Counting objects: 17, done.
  1481. Compressing objects: 100% (16/16), done.
  1482. Writing objects: 100% (17/17), 5.25 KiB | 896.00 KiB/s, done.
  1483. Total 17 (delta 7), reused 0 (delta 0)
  1484. remote: Resolving deltas: 100% (7/7), completed with 4 local objects.
  1485. To https://github.com/fordsec/file-server-group-sec
  1486. 19bc101..36517e3 master -> master
  1487. testvm@testvm:~/Desktop/project2/file-server-group-sec$ cd rust-server/
  1488. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1489. Cargo.lock Cargo.toml src target
  1490. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1491. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1492. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1493. error[E0405]: cannot find trait `Handler` in this scope
  1494. --> src/main.rs:12:6
  1495. |
  1496. 12 | impl Handler for myServer {
  1497. | ^^^^^^^ not found in this scope
  1498.  
  1499. error[E0412]: cannot find type `myServer` in this scope
  1500. --> src/main.rs:12:18
  1501. |
  1502. 12 | impl Handler for myServer {
  1503. | ^^^^^^^^ not found in this scope
  1504.  
  1505. error[E0425]: cannot find value `PHRASE` in this scope
  1506. --> src/main.rs:21:65
  1507. |
  1508. 21 | .with_header(ContentLength(PHRASE.len() as u64))
  1509. | ^^^^^^ not found in this scope
  1510.  
  1511. error[E0425]: cannot find value `PHRASE` in this scope
  1512. --> src/main.rs:22:49
  1513. |
  1514. 22 | .with_body(PHRASE)
  1515. | ^^^^^^ not found in this scope
  1516.  
  1517. error[E0425]: cannot find value `myServer` in this scope
  1518. --> src/main.rs:33:51
  1519. |
  1520. 33 | let server = Http::new().bind(&address, || Ok(myServer)).unwarp();
  1521. | ^^^^^^^^ not found in this scope
  1522.  
  1523. warning: unused import: `ContentType`
  1524. --> src/main.rs:7:36
  1525. |
  1526. 7 | use hyper::header::{ContentLength, ContentType};
  1527. | ^^^^^^^^^^^
  1528. |
  1529. = note: #[warn(unused_imports)] on by default
  1530.  
  1531. warning: unused import: `Service`
  1532. --> src/main.rs:8:46
  1533. |
  1534. 8 | use hyper::server::{Http, Request, Response, Service};
  1535. | ^^^^^^^
  1536.  
  1537. warning: unused imports: `Body`, `Chunk`, `Method`
  1538. --> src/main.rs:9:13
  1539. |
  1540. 9 | use hyper::{Method, Chunk, Body};
  1541. | ^^^^^^ ^^^^^ ^^^^
  1542.  
  1543. error: cannot continue compilation due to previous error
  1544.  
  1545. error: Could not compile `server`.
  1546.  
  1547. To learn more, run the command again with --verbose.
  1548. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1549. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1550. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1551. error[E0407]: method `handle` is not a member of trait `Service`
  1552. --> src/main.rs:24:5
  1553. |
  1554. 24 | / fn handle(&self, req: Request) -> Self::Future {
  1555. 25 | | futures::future::ok(match (req.method(), req.path()) {
  1556. 26 | | (&Get, "/") | (&Get, "/echo") => {
  1557. 27 | | Response.new()
  1558. ... |
  1559. 42 | | })
  1560. 43 | | }
  1561. | |_____^ not a member of trait `Service`
  1562.  
  1563. error[E0412]: cannot find type `FutureResult` in this scope
  1564. --> src/main.rs:21:19
  1565. |
  1566. 21 | type Future = FutureResult<Response, hyper::Error>;
  1567. | ^^^^^^^^^^^^ not found in this scope
  1568. |
  1569. help: possible candidate is found in another module, you can import it into scope
  1570. |
  1571. 4 | use futures::future::FutureResult;
  1572. |
  1573.  
  1574. error[E0423]: expected value, found struct `Response`
  1575. --> src/main.rs:27:17
  1576. |
  1577. 27 | Response.new()
  1578. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1579.  
  1580. warning: unused import: `futures::future::Future`
  1581. --> src/main.rs:4:5
  1582. |
  1583. 4 | use futures::future::Future;
  1584. | ^^^^^^^^^^^^^^^^^^^^^^^
  1585. |
  1586. = note: #[warn(unused_imports)] on by default
  1587.  
  1588. warning: unused import: `ContentType`
  1589. --> src/main.rs:7:36
  1590. |
  1591. 7 | use hyper::header::{ContentLength, ContentType};
  1592. | ^^^^^^^^^^^
  1593.  
  1594. error[E0046]: not all trait items implemented, missing: `call`
  1595. --> src/main.rs:16:1
  1596. |
  1597. 16 | / impl Service for Echo {
  1598. 17 | | type Request = Request;
  1599. 18 | | type Response = Response;
  1600. 19 | | type Error = hyper::Error;
  1601. ... |
  1602. 44 | |
  1603. 45 | | }
  1604. | |_^ missing `call` in implementation
  1605. |
  1606. = note: `call` from trait: `fn(&Self, <Self as hyper::client::Service>::Request) -> <Self as hyper::client::Service>::Future`
  1607.  
  1608. error: aborting due to 4 previous errors
  1609.  
  1610. error: Could not compile `server`.
  1611.  
  1612. To learn more, run the command again with --verbose.
  1613. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rsc
  1614. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rsc
  1615. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1616. Cargo.lock Cargo.toml src target
  1617. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd src/
  1618. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  1619. lib.rs main.rs main.rs~
  1620. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs main.rs~
  1621. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs main.rs
  1622. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  1623. lib.rs main.rs main.rs~
  1624. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ rm main.rs~
  1625. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  1626. lib.rs main.rs
  1627. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ cd ..
  1628. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1629. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1630. error[E0423]: expected value, found struct `Response`
  1631. --> src/main.rs:27:17
  1632. |
  1633. 27 | Response.new()
  1634. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1635.  
  1636. warning: unused import: `ContentType`
  1637. --> src/main.rs:7:36
  1638. |
  1639. 7 | use hyper::header::{ContentLength, ContentType};
  1640. | ^^^^^^^^^^^
  1641. |
  1642. = note: #[warn(unused_imports)] on by default
  1643.  
  1644. error[E0599]: no method named `unwarp` found for type `std::result::Result<hyper::Server<[closure@src/main.rs:50:42: 50:53], hyper::Body>, hyper::Error>` in the current scope
  1645. --> src/main.rs:50:55
  1646. |
  1647. 50 | let server = Http::new().bind(&addr, || Ok(Echo)).unwarp();
  1648. | ^^^^^^
  1649.  
  1650. error: aborting due to 2 previous errors
  1651.  
  1652. error: Could not compile `server`.
  1653.  
  1654. To learn more, run the command again with --verbose.
  1655. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs main.rs
  1656. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cd src/
  1657. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  1658. lib.rs main.rs
  1659. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ emacs main.rs
  1660. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ ls
  1661. lib.rs main.rs
  1662. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server/src$ cd ..
  1663. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ ls
  1664. Cargo.lock Cargo.toml src target
  1665. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1666. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1667. error[E0423]: expected value, found struct `Response`
  1668. --> src/main.rs:27:17
  1669. |
  1670. 27 | Response.new()
  1671. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1672.  
  1673. error[E0599]: no method named `unwarp` found for type `std::result::Result<hyper::Server<[closure@src/main.rs:50:42: 50:53], hyper::Body>, hyper::Error>` in the current scope
  1674. --> src/main.rs:50:55
  1675. |
  1676. 50 | let server = Http::new().bind(&addr, || Ok(Echo)).unwarp();
  1677. | ^^^^^^
  1678.  
  1679. error: aborting due to 2 previous errors
  1680.  
  1681. error: Could not compile `server`.
  1682.  
  1683. To learn more, run the command again with --verbose.
  1684. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs main.rs
  1685. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs main.rs
  1686. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1687. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1688. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1689. error[E0423]: expected value, found struct `Response`
  1690. --> src/main.rs:26:17
  1691. |
  1692. 26 | Response.new()
  1693. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1694.  
  1695. error: aborting due to previous error
  1696.  
  1697. error: Could not compile `server`.
  1698.  
  1699. To learn more, run the command again with --verbose.
  1700. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1701. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1702. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1703. error[E0423]: expected value, found struct `Response`
  1704. --> src/main.rs:26:17
  1705. |
  1706. 26 | Response.new()
  1707. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1708.  
  1709. error[E0308]: mismatched types
  1710. --> src/main.rs:25:46
  1711. |
  1712. 25 | (&Get, "/") | (&Get, "/echo") => {
  1713. | ______________________________________________^
  1714. 26 | | Response.new()
  1715. 27 | | .with_header(ContentLength(INDEX.len() as u64))
  1716. 28 | | .with_body(INDEX);
  1717. | | - help: consider removing this semicolon
  1718. 29 | | },
  1719. | |_____________^ expected struct `hyper::Response`, found ()
  1720. |
  1721. = note: expected type `hyper::Response`
  1722. found type `()`
  1723.  
  1724. error: aborting due to 2 previous errors
  1725.  
  1726. error: Could not compile `server`.
  1727.  
  1728. To learn more, run the command again with --verbose.
  1729. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1730. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1731. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1732. error[E0423]: expected value, found struct `Response`
  1733. --> src/main.rs:26:17
  1734. |
  1735. 26 | Response.new()
  1736. | ^^^^^^^^ did you mean `Response { /* fields */ }`?
  1737.  
  1738. error: aborting due to previous error
  1739.  
  1740. error: Could not compile `server`.
  1741.  
  1742. To learn more, run the command again with --verbose.
  1743. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1744. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo build
  1745. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1746. Finished dev [unoptimized + debuginfo] target(s) in 4.44 secs
  1747. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1748. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  1749. Running `target/debug/server`
  1750. Listening on http://127.0.0.1:1337 with 1 thread.
  1751. ^C
  1752. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1753. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1754. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  1755. Running `target/debug/server`
  1756. Listening on http://127.0.0.1:1337 with 1 thread.
  1757. ^C
  1758. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1759. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1760. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1761. error: incorrect close delimiter: `}`
  1762. --> src/main.rs:37:13
  1763. |
  1764. 37 | };
  1765. | ^
  1766. |
  1767. note: unclosed delimiter
  1768. --> src/main.rs:27:13
  1769. |
  1770. 27 | (&Method::Get, "/" => {
  1771. | ^
  1772.  
  1773. error: unexpected close delimiter: `}`
  1774. --> src/main.rs:42:1
  1775. |
  1776. 42 | }
  1777. | ^
  1778.  
  1779. error: Could not compile `server`.
  1780.  
  1781. To learn more, run the command again with --verbose.
  1782. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1783. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1784. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1785. error[E0425]: cannot find value `reponse` in this scope
  1786. --> src/main.rs:34:18
  1787. |
  1788. 34 | reponse.set_status(StatusCode::NotFound);
  1789. | ^^^^^^^ did you mean `response`?
  1790.  
  1791. warning: unused import: `hyper::header::ContentLength`
  1792. --> src/main.rs:7:5
  1793. |
  1794. 7 | use hyper::header::ContentLength;
  1795. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1796. |
  1797. = note: #[warn(unused_imports)] on by default
  1798.  
  1799. error: aborting due to previous error
  1800.  
  1801. error: Could not compile `server`.
  1802.  
  1803. To learn more, run the command again with --verbose.
  1804. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1805. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1806. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1807. warning: unused import: `hyper::header::ContentLength`
  1808. --> src/main.rs:7:5
  1809. |
  1810. 7 | use hyper::header::ContentLength;
  1811. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1812. |
  1813. = note: #[warn(unused_imports)] on by default
  1814.  
  1815. warning: static item is never used: `INDEX`
  1816. --> src/main.rs:12:1
  1817. |
  1818. 12 | static INDEX: &'static [u8] = b"Try POST /echo";
  1819. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1820. |
  1821. = note: #[warn(dead_code)] on by default
  1822.  
  1823. Finished dev [unoptimized + debuginfo] target(s) in 4.33 secs
  1824. Running `target/debug/server`
  1825. Listening on http://127.0.0.1:1337 with 1 thread.
  1826. ^C
  1827. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1828. Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
  1829. Running `target/debug/server`
  1830. Listening on http://127.0.0.1:1337 with 1 thread.
  1831. ^C
  1832. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1833. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ cargo run
  1834. Compiling server v0.1.0 (file:///home/testvm/Desktop/project2/file-server-group-sec/rust-server)
  1835. warning: unused import: `hyper::header::ContentLength`
  1836. --> src/main.rs:7:5
  1837. |
  1838. 7 | use hyper::header::ContentLength;
  1839. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1840. |
  1841. = note: #[warn(unused_imports)] on by default
  1842.  
  1843. Finished dev [unoptimized + debuginfo] target(s) in 4.91 secs
  1844. Running `target/debug/server`
  1845. Listening on http://127.0.0.1:1337 with 1 thread.
  1846. ^C
  1847. testvm@testvm:~/Desktop/project2/file-server-group-sec/rust-server$ emacs src/main.rs
  1848.  
  1849. File Edit Options Buffers Tools Help
  1850. match (req.method(), req.path()) {
  1851. (&Method::Get, "/") => {
  1852. let body: Box<Stream<Item=_, Error=_>> = Box::new(Body::from("Try POSTing data to /echo"));
  1853. response.set_body(body);
  1854. },
  1855. (&Method::Post, "/echo") => {
  1856. let mapping = req.body().map(to_uppercase as fn(Chunk) -> Chunk);
  1857. let body: Box<Stream<Item=_, Error=_>> = Box::new(mapping);
  1858. response.set_body(body);
  1859. },
  1860. _ => {
  1861. response.set_status(StatusCode::NotFound);
  1862. },
  1863.  
  1864. };
  1865.  
  1866. Box::new(futures::future::ok(response))
  1867. }
  1868.  
  1869. fn to_uppercase(chunk: Chunk) -> {
  1870. let uppered = chunk.iter()
  1871. .map(|byte| byte.to_ascii_uppercase())
  1872. .collect::<Vec<u8>>();
  1873. Chunk::from(uppered)
  1874. }
  1875. }
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881. fn main() {
  1882. let addr = "127.0.0.1:1337".parse().unwrap();
  1883.  
  1884. let server = Http::new().bind(&addr, || Ok(Echo)).unwrap();
  1885. println!("Listening on http://{} with 1 thread.", server.local_addr().unwrap());
  1886. server.run().unwrap();
  1887. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement