{"id":21007974,"url":"https://github.com/lflxp/showme-rs","last_synced_at":"2026-07-12T23:31:09.679Z","repository":{"id":150080938,"uuid":"410559543","full_name":"lflxp/showme-rs","owner":"lflxp","description":"showme by rust","archived":false,"fork":false,"pushed_at":"2022-04-14T15:17:11.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T15:59:07.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lflxp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-26T13:28:11.000Z","updated_at":"2022-03-23T03:28:38.000Z","dependencies_parsed_at":"2023-06-05T03:00:09.876Z","dependency_job_id":null,"html_url":"https://github.com/lflxp/showme-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lflxp/showme-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Fshowme-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Fshowme-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Fshowme-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Fshowme-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lflxp","download_url":"https://codeload.github.com/lflxp/showme-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lflxp%2Fshowme-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35405750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T09:11:03.368Z","updated_at":"2026-07-12T23:31:09.653Z","avatar_url":"https://github.com/lflxp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RUN\n\n\u003e cargo run -- monitor --lazy\n\n```\n➜  clapdemo git:(master) ✗ cargo run -- monitor --lazy\n   Compiling clapdemo v0.1.0 (/root/code/clapdemo)\n    Finished dev [unoptimized + debuginfo] target(s) in 1.79s\n     Running `target/debug/clapdemo monitor --lazy`\nValue for config: default.conf\nNo verbose info\n     Uptime       : 0 days\n     Hostname     : DESKTOP-DVBN0M3\n     Load         : 0.43 0.59 0.80\n     DISK         : Total 250 Used 65 Free 172 Percent 27.60\n     MEM          : Total 25 Available 16 Used 7 Free 10 Percent 27.60\n     SWAP         : Total 7 Used 0 Free 6 Percent 0.00\n  oops\n-------- -----load-avg---- ----cpu-usage--- ---swap--- ----net(A)---- \n  time  |  1m    5m   15m | usr sys idl iow|   si   so|   recv   send|\n02:19:17| 0.43  0.59  0.80|   1   1  95   0|    0    1|      0      0|\n02:19:18| 0.43  0.59  0.80|   0   0  98   0|    0    0|     1k     3k|\n02:19:19| 0.47  0.60  0.80|   0   0  99   0|    0    0|    216     1k|\n02:19:20| 0.47  0.60  0.80|   0   0  99   0|    0    0|     1k     2k|\n02:19:21| 0.47  0.60  0.80|   0   0  99   0|    0    0|    454     2k|\n02:19:22| 0.47  0.60  0.80|   0   0  98   0|    0    0|     4k    63k|\n02:19:23| 0.47  0.60  0.80|   1   1  96   0|    0    0|    908     3k|\n02:19:24| 0.84  0.67  0.83|   0   0  99   0|    0    0|     7k     5k|\n02:19:25| 0.84  0.67  0.83|   0   0  98   0|    0    0|     3k     7k|\n02:19:26| 0.84  0.67  0.83|   0   0  98   0|    0    0|    508     2k|\n02:19:27| 0.84  0.67  0.83|   0   0  99   0|    0    0|    289     1k|\n02:19:28| 0.84  0.67  0.83|   0   0  99   0|    0    0|     2k     4k|\n02:19:29| 0.77  0.66  0.82|   0   0  98   0|    0    0|     6k     6k|\n02:19:30| 0.77  0.66  0.82|   0   0  99   0|    0    0|     1k     4k|\n02:19:31| 0.77  0.66  0.82|   2   5  91   0|    0    0|     2k    14k|\n02:19:32| 0.77  0.66  0.82|   2  74   0   0|    0    0|     2k     5k|\n02:19:33| 0.77  0.66  0.82|   2  74   0   0|    0    0|     1k     3k|\n02:19:34| 3.03  1.13  0.97|   2  73   0   0|    0    0|     2k     4k|\n02:19:35| 3.03  1.13  0.97|   1  74   0   0|    0    0|     4k     7k|\n-------- -----load-avg---- ----cpu-usage--- ---swap--- ----net(A)---- \n  time  |  1m    5m   15m | usr sys idl iow|   si   so|   recv   send|\n02:19:37| 3.03  1.13  0.97|   2  73   0   0|    0    0|     2k     4k|\n02:19:38| 3.03  1.13  0.97|   2  75   0   0|    0    0|    981     3k|\n02:19:39| 5.03  1.58  1.12|   2  74   0   0|    0    0|    11k     5m|\n02:19:40| 5.03  1.58  1.12|   1  74   0   0|    0    0|    26k    15m|\n02:19:41| 5.03  1.58  1.12|   1  76   0   0|    0    0|     6k     2m|\n02:19:42| 5.03  1.58  1.12|   1  73   0   0|    0    0|    48k    23m|\n02:19:43| 5.03  1.58  1.12|   2  74   0   0|    0    0|    20k    11m|\n02:19:44| 5.99  1.83  1.20|   1  71   0   0|    0    0|    47k    18m|\n02:19:45| 5.99  1.83  1.20|   2  73   0   0|    0    0|    55k    17m|\n02:19:46| 5.99  1.83  1.20|   1  72   0   0|    0    0|    49k    12m|\n02:19:47| 5.99  1.83  1.20|   2  73   0   0|    0    0|    55k    20m|\n02:19:48| 5.99  1.83  1.20|   2  73   0   0|    0    0|    51k    20m|\n02:19:49| 7.75  2.27  1.35|   1  72   0   0|    0    0|    52k    17m|\n02:19:50| 7.75  2.27  1.35|   1  73   0   0|    0    0|    42k    18m|\n02:19:51| 7.75  2.27  1.35|   1  72   0   0|    0    0|    30k    14m|\n02:19:52| 7.75  2.27  1.35|   1  73   0   0|    0    0|     2k     4k|\n02:19:53| 7.75  2.27  1.35|   2  76   0   0|    0    0|     2k     4k|\n^CSay Good Bye!\n```\n\n## fzf\n\n```\n Press Esc to stop editing, Enter to record the message 41/9842 3\n  ┌功能项─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n  │ Files │ Command │ Core │ Host │ Env │ TODO                                                                                                                                                                │\n  └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n  ┌搜索框─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n  │.rs                                                                                                                                                                                                        │\n  └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n  ┌文件或文件夹─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐┌./src/colorrun.rs───────────────────────────────────────────────────────────────┐\n  │  ./src/c2.rs                                                                                                            ││use log::{info};                                                                │\n  │  ./src/clapsed.rs                                                                                                       ││                                                                                │\n  │  ./src/color.rs                                                                                                         ││extern crate colored; // not needed in Rust 2018                                │\n  │\u003e ./src/colorrun.rs                                                                                                      ││                                                                                │\n  │  ./src/host/all.rs                                                                                                      ││use colored::*;                                                                 │\n  │  ./src/host/mod.rs                                                                                                      ││                                                                                │\n  │  ./src/host/sys/linux/hostname.rs                                                                                       ││// 这个函数仅当操作系统是 Linux 的时候才会编译                                  │\n  │  ./src/host/sys/linux/mod.rs                                                                                            ││#[cfg(target_os = \"linux\")]                                                     │\n  │  ./src/host/sys/macos/hostname.rs                                                                                       ││fn are_you_on_linux() {                                                         │\n  │  ./src/host/sys/macos/mod.rs                                                                                            ││    println!(\"You are running linux!\")                                          │\n  │  ./src/host/sys/mod.rs                                                                                                  ││}                                                                               │\n  │  ./src/scan/mod.rs                                                                                                      ││                                                                                │\n  │  ./src/scan/output.rs                                                                                                   ││// 而这个函数仅当操作系统**不是** Linux 时才会编译                              │\n  │  ./src/scan/parse.rs                                                                                                    ││#[cfg(not(target_os = \"linux\"))]                                                │\n  └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘└────────────────────────────────────────────────────────────────────────────────┘\n```\n\n\n```\nuse std::env;\nuse std::io::{stdin, stdout, Write};\nuse std::path::Path;\nuse std::process::{Child, Command, Stdio};\n\nfn main(){\n    loop {\n        // use the `\u003e` character as the prompt\n        // need to explicitly flush this to ensure it prints before read_line\n        print!(\"\u003e \");\n        stdout().flush().unwrap();\n\n        let mut input = String::new();\n        stdin().read_line(\u0026mut input).unwrap();\n\n        // read_line leaves a trailing newline, which trim removes\n        // this needs to be peekable so we can determine when we are on the last command\n        let mut commands = input.trim().split(\" | \").peekable();\n        let mut previous_command = None;\n\n        while let Some(command) = commands.next()  {\n\n            // everything after the first whitespace character is interpreted as args to the command\n            let mut parts = command.trim().split_whitespace();\n            let command = parts.next().unwrap();\n            let args = parts;\n\n            match command {\n                \"cd\" =\u003e {\n                    // default to '/' as new directory if one was not provided\n                    let new_dir = args.peekable().peek().map_or(\"/\", |x| *x);\n                    let root = Path::new(new_dir);\n                    if let Err(e) = env::set_current_dir(\u0026root) {\n                        eprintln!(\"{}\", e);\n                    }\n\n                    previous_command = None;\n                },\n                \"exit\" =\u003e return,\n                command =\u003e {\n                    let stdin = previous_command\n                        .map_or(Stdio::inherit(),\n                                |output: Child| Stdio::from(output.stdout.unwrap()));\n\n                    let stdout = if commands.peek().is_some() {\n                        // there is another command piped behind this one\n                        // prepare to send output to the next command\n                        Stdio::piped()\n                    } else {\n                        // there are no more commands piped behind this one\n                        // send output to shell stdout\n                        Stdio::inherit()\n                    };\n\n                    let output = Command::new(command)\n                        .args(args)\n                        .stdin(stdin)\n                        .stdout(stdout)\n                        .spawn();\n\n                    match output {\n                        Ok(output) =\u003e { previous_command = Some(output); },\n                        Err(e) =\u003e {\n                            previous_command = None;\n                            eprintln!(\"{}\", e);\n                        },\n                    };\n                }\n            }\n        }\n\n        if let Some(mut final_command) = previous_command {\n            // block until the final command has finished\n            final_command.wait().unwrap();\n        }\n\n    }\n}\n```\n\n# TODO\n\n1. [x] blackwater ip scan\n2. gui\n3. static http server\n4. gotty\n5. mqtt =\u003e https://zhuanlan.zhihu.com/p/264181114 =\u003e https://gitee.com/lflxp/mqtt-example-rust\n6. git log + git show + git reset + git stash/status + rs popus\n7. kubectl get po + kubectl edit + $*\n8. rust shell =\u003e https://www.cnblogs.com/ishenghuo/p/12550142.html\n\n# BUG\n\n1. HOME/END","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flflxp%2Fshowme-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flflxp%2Fshowme-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flflxp%2Fshowme-rs/lists"}