imsnif/bandwhich 5855
Terminal bandwidth utilization tool
imsnif/diskonaut 662
Terminal disk space navigator 🔭
imsnif/Awesome-Linux-Software 4
A list of awesome applications, software, tools and other materials for Linux distros.
A curated list of Rust code and resources.
rak resha
Generate background noise with varying volume
Useful resources for the Test Anything Protocol
📨 An open letter to GitHub from the maintainers of open source projects
Lightweight job scheduling for node
Under construction
pull request commentimsnif/bandwhich
Adding --add-payload-offset flag (macos only) to allow for some utun interfaces
Hey @thepacketgeek - looking good. I re-ran the failing test because it's sometimes a little flaky. It's okay now (sorry about that :) ).
Is this strictly a mac behaviour? If we're adding this as a manual flag, would it be wrong to have the flag be cross-platform and not mac-only?
comment created time in 3 days
issue commentimsnif/bandwhich
Bandwhich loses interface after resume from sleep, only solution is to kill the app and restart.
Hey, cool - thanks for helping out debugging this! So what we're seeing here is that bandwhich detects the interface being disconnected (that's the error on interface in the middle there), and then resets the channel. It seems to be doing so correctly. So on the surface, things here seem to be doing what they're supposed to.
I'm attaching another version here with some more debugging messages. This time it writes out debug messages when traffic is received on the interface (so it might be a little spammy, my apologies!) I want to see if we get traffic from this interface after we re-establish the channel. I'm thinking maybe we're getting some and for some reason not handling them correctly. Thanks! bandwhich-temp-debug-with-more-logs.tar.gz
comment created time in 3 days
pull request commentimsnif/bandwhich
Removing payload offset for Macos utun interfaces
Aha. I sadly don't have access to one either. Do you think we can go with that assumption and provide some workaround flag in case we're either wrong or half right in one way or another? :)
comment created time in 7 days
issue commentimsnif/bandwhich
Bandwhich loses interface after resume from sleep, only solution is to kill the app and restart.
Thanks for all the debugging here and for suggesting some ideas.
So first, a little bit about bandwhich's relationship with the network interfaces so we're all on the same page. :)
When bandwhich starts, it scans all network interfaces on the machine that are up and then starts 1 thread for each one of them. It uses that thread to sniff the network traffic. If it does not manage to access the interface, it retries every one second indefinitely.
This would explain why the experiment with the USB dongle didn't work, I guess. Because it didn't show up in the initial scan, so a thread was never allocated for it. We can fix that, but that's an extra feature, and I think is not related to the behaviour we're seeing here. :)
I feel I'd still like to get some more information. I think if we know more, the cause will hopefully become clearer.
I made another binary that I'm attaching here. This one doesn't draw the UI at all, but rather prints some debugging messages in relevant places (when it gets a timeout from the network channel, which for me happens quite often, when it gets an error from the channel, when it recreates the channel and when the sniffing thread dies).
What do you think about running it under the scenario you mentioned and seeing what happens when? bandwhich-temp-debug-with-logs.tar.gz
comment created time in 7 days
issue commentimsnif/bandwhich
Bandwhich loses interface after resume from sleep, only solution is to kill the app and restart.
Every time bandwhich attempts to query the network device and receives an error, it waits for 1 second and then attempts to re-establish a link with that network device. It will do this indefinitely until it succeeds, so this should work. The only case it doesn't do this is when it receives a timeout from the network device.
I'm attaching a binary here that does this even when we receive a timeout from the network device. Let's see if it works for you? bandwhich-temp-debug.tar.gz
comment created time in 7 days
startedpjsier/echomap
started time in 7 days
push eventimsnif/diskonaut
commit sha 2cf5c7bd061f42443288e538ae75fedf7a846d76
docs(changelog): small files legend change
push time in 7 days
push eventimsnif/diskonaut
commit sha f330d852848305b002200e53cee3e10de8e4fb6a
feat(ui): only show small files legend when visible (#75) * feat: only show small files legend when visible * refactor: add render_small_files_legend function
push time in 7 days
PR merged imsnif/diskonaut
Only show the small files legend when small files are present, updates snapshots, closes #15. Doesn't address the edge case in that issue though. A few notes:
- I wasn't sure about splitting the rendering of the small files legend into a separate function like
render_controls_legendthat would return the length of the string since it's used for the other functions, but to keep things simple for now I left it as is. - Based on the changes, it seems like this might break the usefulness of
enter_folder_small_widthas a test case if it's supposed to show a partial display of the status row - The
hide_small_files_legendfunction is potentially confusing because unlikehide_deleteit takes an argument of whether or not it should be hidden. Because of the context where it's used, this seemed more straightforward than calling it conditionally, but let me know if that doesn't work.
Let me know if I should make any changes, thanks!
pr closed time in 7 days
issue closedimsnif/diskonaut
Feature: only show "(x = Small files)" legend when there are small files on the screen
Otherwise it might be a little confusing...
closed time in 7 days
imsnifpull request commentimsnif/diskonaut
feat: only show small files legend when visible
Looks great. Thanks for this!
comment created time in 7 days
push eventimsnif/bandwhich
commit sha fde53ddb3bcb769bc3474ba3d739d268619bf138
style(clippy): minor fix
push time in 8 days
issue commentimsnif/bandwhich
rDNS might not work on latest macos
New version released. You can now use the --dns-server flag eg. bandwhich -d 1.1.1.1 to manually specify a DNS server as a workaround for this issue.
comment created time in 8 days
release imsnif/bandwhich
released time in 8 days
push eventimsnif/bandwhich
commit sha a703513412d4da71085e55fd9d62a080527b2800
chore(release): 0.20.0
push time in 8 days
issue commentimsnif/bandwhich
Bandwhich loses interface after resume from sleep, only solution is to kill the app and restart.
Hey @ioogithub - are you using the latest version of bandwhich (0.19.0)? We included a fix that should address this.
Bandwhich should try to reconnect the interface indefinitely. If you're on 0.19.0 and this isn't working for you, I'd be happy to investigate further.
comment created time in 8 days
issue commentimsnif/bandwhich
Hey @UweKrause - thanks for bringing this up. The line from the readme is indeed a little old and as we upgrade our dependencies occasionally it becomes outdated.
How about if we change it to something like "If you're having trouble compiling bandwhich, try upgrading cargo to the latest available version using rustup"? Do you feel that would have been more clear for you?
comment created time in 8 days
pull request commentimsnif/bandwhich
Adding a --no-payload-offset flag for macos target
Hey @thepacketgeek - could you help me understand what's the current status here? What do we know, what aren't we sure about, which types of interfaces need it, which don't, what will break, etc? It'll help me make a decision about how to include this change. Thanks!
comment created time in 8 days
pull request commentimsnif/diskonaut
Add GitHub Actions (GHA) CICD workflow
Hey @rivy - thanks for your patience! I'm finally getting to this. :)
Because of the nature of this change, I think it's going to require some back-and-forth between us. I hope you're up to it, and I promise not to take so long to reply from now on.
So a few things:
- I'm not a big fan of test coverage reporting, in all honesty. While it's a good tool for manually checking what one might be missing in their tests, I feel that publishing it can create blind-spots and overconfidence. So I think I'd rather not include it.
- Elsewhere, I've seen that it's possible to trigger releases manually rather than with a commit regex. I greatly prefer that approach because it gives me finer control over the release process. Would changing it be a great deal of work?
- I really like that the releases would include prebuilt binaries for windows and mac. I feel that would be very meaningful to new users wanting to try out diskonaut. I think I would prefer to have just 1 file per OS in order to make things simpler for those looking to download the right version. What do you think?
- I'm aware of the clippy warnings unfortunately. :/ That's why I didn't include the check originally when releasing diskonaut. Some of them aren't very trivial to fix iirc. Could we include this check in a disabled mode somehow and when I or someone else gets to fixing them we can enable it? (If you're feeling adventurous and want to fix them, I'd be happy to guide you through what I think needs to be done - but no stress of course).
Otherwise, this looks really cool and I'm looking forward to using it when releasing. Thanks for doing this!
comment created time in 8 days
pull request commentimsnif/diskonaut
feat: only show small files legend when visible
Hey @pjsier - thanks again for your patience!
I played around with this and it looks great. I also went over the changes in the code and I'm very happy with the way you went about it. Aside from replying to your comments below, I honestly have nothing else to add.
So after addressing these, I'd be happy to merge this. I promise not to take so long this time!
I wasn't sure about splitting the rendering of the small files legend into a separate function like
render_controls_legendthat would return the length of the string since it's used for the other functions, but to keep things simple for now I left it as is.
How about moving everything inside if !self.hide_small_files_legend into a render_small_files_legend function? I think that can create a nice separation while allowing us not to pass stuff around too much. What do you think?
Based on the changes, it seems like this might break the usefulness of
enter_folder_small_widthas a test case if it's supposed to show a partial display of the status row
Eh, that's not too bad I think. :) It still tests other stuff (eg. the shorter length quit message). We could adjust the test to have unrenderable small files in order to really be sure the lines never overlap, but I think this is grand as it is right now. Thanks for spotting this and bringing it up.
The
hide_small_files_legendfunction is potentially confusing because unlikehide_deleteit takes an argument of whether or not it should be hidden. Because of the context where it's used, this seemed more straightforward than calling it conditionally, but let me know if that doesn't work.
I agree completely. I like how you did it. Only thing I would possibly change would be the boolean variable name to something like "should_be_hidden", to avoid any possible confusion. But that would be really going overboard. :)
comment created time in 8 days
pull request commentimsnif/diskonaut
Add GitHub Actions (GHA) CICD workflow
Hey @rivy - I'm sorry it's taking me some time to get to this. Going through some busy days. I promise to review this soon.
comment created time in 15 days
pull request commentimsnif/diskonaut
feat: only show small files legend when visible
@pjsier - I'm sorry for taking some time to get to this. Busy days, I promise to get to it soon.
comment created time in 15 days
startedxxh/xxh
started time in 15 days
startedyxdunc/lipl
started time in 19 days
issue commentimsnif/diskonaut
Feature: only show "(x = Small files)" legend when there are small files on the screen
Cool - sounds like a good direction. There is an edge case described in more detail here: https://github.com/imsnif/diskonaut/issues/62, but that's probably out of scope for this issue.
comment created time in 20 days
issue commentimsnif/bandwhich
rDNS might not work on latest macos
Hey @DianaNites (and others experiencing this issue),
I added a feature that would allow users to explicitly specify a dns server to use for the rDNS lookups as a workaround. Something like bandwhich --dns-server 1.1.1.1
I'm going to release a new version with it in the next few days (I'm waiting on another fix I'd like to see in that version too). Thanks for your patience. :)
comment created time in 21 days
push eventimsnif/bandwhich
commit sha 1e0849b0d1c1a0fa82580fef29e81114e081dfc2
docs(changelog): CLI dns server address flag
push time in 21 days
push eventimsnif/bandwhich
commit sha e813362e5cfaa8452bd3df3adb65acfd9d76a3c3
feat(dns): allow custom dns server as cli flag (#193) * feat(dns): allow custom dns server as cli flag * fix(style): remove commented debugging line (oops)
push time in 21 days
PR merged imsnif/bandwhich
Since there are some cases in which we don't properly detect the system dns servers to performs reverse dns lookup, I added a CLI option that would allow users to manually specify a dns server as a workaround.
Usage example:
sudo bandwhich --dns-server 1.1.1.1
pr closed time in 21 days
pull request commentimsnif/bandwhich
feat(dns): allow custom dns server as cli flag
Thanks for the review @TheLostLambda !
comment created time in 21 days
Pull request review commentimsnif/bandwhich
feat(dns): allow custom dns server as cli flag
pub trait Lookup { pub struct Resolver(TokioAsyncResolver); impl Resolver {- pub async fn new(runtime: Handle) -> Result<Self, failure::Error> {- let resolver = TokioAsyncResolver::from_system_conf(runtime).await?;+ pub async fn new(+ runtime: Handle,+ dns_server: &Option<Ipv4Addr>,+ ) -> Result<Self, failure::Error> {+ let resolver = match dns_server {+ Some(dns_server_address) => {+ let mut config = ResolverConfig::new();+ let options = ResolverOpts::default();+ // let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(1, 1, 1, 1), 53));+ let socket = SocketAddr::V4(SocketAddrV4::new(*dns_server_address, 53));+ let nameserver_config = NameServerConfig {+ socket_addr: socket,+ protocol: Protocol::Udp,+ tls_dns_name: None,+ };+ config.add_name_server(nameserver_config);+ TokioAsyncResolver::new(config, options, runtime).await?
Yeah, for sure. I mostly want this feature as a workaround for issues where we fail to parse resolv.conf, so we'd be panicking by then.
comment created time in 21 days
push eventimsnif/bandwhich
commit sha f32692846da412a85d7086ca5cb9993de6829ac4
fix(style): remove commented debugging line (oops)
push time in 21 days
Pull request review commentimsnif/bandwhich
feat(dns): allow custom dns server as cli flag
pub trait Lookup { pub struct Resolver(TokioAsyncResolver); impl Resolver {- pub async fn new(runtime: Handle) -> Result<Self, failure::Error> {- let resolver = TokioAsyncResolver::from_system_conf(runtime).await?;+ pub async fn new(+ runtime: Handle,+ dns_server: &Option<Ipv4Addr>,+ ) -> Result<Self, failure::Error> {+ let resolver = match dns_server {+ Some(dns_server_address) => {+ let mut config = ResolverConfig::new();+ let options = ResolverOpts::default();+ // let socket = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(1, 1, 1, 1), 53));
Hot damn, thanks for catching this :)
comment created time in 21 days
startedvinayak-mehta/present
started time in 22 days
pull request commentimsnif/bandwhich
Fix VPN traffice not displayed bug
Hey, so - before I move to reviewing the PR. So that I understand, what's the situation now? What sort of interfaces/os combinations need the offset and which don't?
comment created time in 22 days
PR opened imsnif/bandwhich
Since there are some cases in which we don't properly detect the system dns servers to performs reverse dns lookup, I added a CLI option that would allow users to manually specify a dns server as a workaround.
Usage example:
sudo bandwhich --dns-server 1.1.1.1
pr created time in 22 days
issue closedimsnif/bandwhich
100% CPU usage when network interface disconnects while computer is asleep
Bandwhich will use 100% of the CPU until quit when the network interface disconnects while computer is asleep.
- Plug in an ethernet adapter
- Tell Bandwhich to watch that interface
- Put computer to sleep
- Unplug adapter
- Wake computer
MacOS 10.14.6 (18G3020)
closed time in 23 days
ReagentXissue commentimsnif/bandwhich
100% CPU usage when network interface disconnects while computer is asleep
Fixed in 0.19.0
comment created time in 23 days
issue closedimsnif/bandwhich
Cargo build failure on FreeBSD
Cargo install of bandwhich 0.18.1 on freebsd servers running 12.1 RELEASE p9 results in the following failure:
error[E0308]: mismatched types
--> /home/denningsrogue/.cargo/registry/src/github.com-1ecc6299db9ec823/crossterm_terminal-0.1.0/src/sys/unix.rs:29:43
|
29 | let r = unsafe { ioctl(STDOUT_FILENO, TIOCGWINSZ, &us) };
| ^^^^^^^^^^
| |
| expected u64, found u32
| help: you can convert an u32 to u64: TIOCGWINSZ.into()
error: aborting due to previous error
For more information about this error, try rustc --explain E0308.
error: could not compile crossterm_terminal.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile bandwhich v0.18.1, intermediate artifacts can be found at /tmp/cargo-installySajL6
Caused by: build failed
Updated 0 packages. Failed to update bandwhich.
Package Installed Latest Needs update
No git packages need updating. Overall updated 0 packages. Overall failed to update 1 package: bandwhich.
closed time in 23 days
denningsrogueissue commentimsnif/bandwhich
Cargo build failure on FreeBSD
Fixed in 0.19.0
comment created time in 23 days
release imsnif/bandwhich
released time in 23 days
push eventimsnif/bandwhich
commit sha 4af7abaae256e2c5cd0c1775e98aec4389288b75
chore(release): 0.19.0
push time in 23 days
push eventimsnif/bandwhich
commit sha 15ec5c02152a03b3dfc13a249f1a71938cd6100d
docs(changelog): reconnect disconnected interfaces
push time in 23 days
push eventimsnif/bandwhich
commit sha 0737704d4e62bb3065a69d401e88e7bfc12f31c0
fix(sniffer): handle disconnected interfaces (and periodically attempt to re-connect) (#191) * Panic on non-Timeout errors in packet Sniffer * Attempt to Re-establish interface channels after disconnect Sniffer::next() now returns an io::Result so the thread in main can determine between no packets & a sniffing error - Matching on EtherType to remove duplicate code determining IP Version Added Sniffer::reset_channel to allow main to poll a previously connected interface * Error handling & timeout delay performed in Sniffer::next * Removing no longer needed Ether layer in test packet builder
push time in 23 days
PR merged imsnif/bandwhich
Addresses #150, which I was able to repro on a Mac by disconnecting an Ethernet dongle during sniffing. The timeout suggestion fix works and I'd like some guidance around the following:
Timeout selection
Currently, there's no timeout so Sniffer.next() is called in rapid succession. I used a timeout of 10 ms here as it's a good middle ground for keeping sniffing real-time and not spinning too much on a quiet interface.
Interface disconnects handled silently There's no more CPU spike @ 100% after an interface is disconnected. The thread will silently continue to re-establish the channel for that interface. Should this be handled silently and should bandwhich periodically attempt to reconnect (currently at the same 1 second interval of display updates)

pr closed time in 23 days
pull request commentimsnif/bandwhich
Handle disconnected interfaces (and periodically attempt to re-connect)
Awesome, thanks for this @thepacketgeek!
comment created time in 23 days
Pull request review commentimsnif/bandwhich
fix(ui): upgrade tui to latest version and fix breaking changes
const TEXT_TAB_TIP: &str = " Use <TAB> to rearrange tables."; impl HelpText { pub fn render(&self, frame: &mut Frame<impl Backend>, rect: Rect) {- let text = {- let pause_content = if self.paused {- TEXT_WHEN_PAUSED- } else {- TEXT_WHEN_NOT_PAUSED- };-- let dns_content = if rect.width <= FIRST_WIDTH_BREAKPOINT {- ""- } else if self.show_dns {- TEXT_WHEN_DNS_SHOWN- } else {- TEXT_WHEN_DNS_NOT_SHOWN- };+ let pause_content = if self.paused {+ TEXT_WHEN_PAUSED+ } else {+ TEXT_WHEN_NOT_PAUSED+ }; - let tab_text = if rect.width <= SECOND_WIDTH_BREAKPOINT {- ""- } else {- TEXT_TAB_TIP- };+ let dns_content = if rect.width <= FIRST_WIDTH_BREAKPOINT {+ ""+ } else if self.show_dns {+ TEXT_WHEN_DNS_SHOWN+ } else {+ TEXT_WHEN_DNS_NOT_SHOWN+ }; - [Text::styled(- format!("{}{}{}", pause_content, tab_text, dns_content),- Style::default().modifier(Modifier::BOLD),- )]+ let tab_text = if rect.width <= SECOND_WIDTH_BREAKPOINT {+ ""+ } else {+ TEXT_TAB_TIP };- Paragraph::new(text.iter())- .alignment(Alignment::Left)- .render(frame, rect);++ let text = Span::styled(+ format!("{}{}{}", pause_content, tab_text, dns_content),
Btw, @TheLostLambda - I sent you an email on a different subject. Mentioning it here because I remember there were some spam-filtering issues between us in the past. :)
comment created time in 23 days
push eventimsnif/bandwhich
commit sha f9d397c7c90a5e262428fe909d44f1d81f0e88c6
docs(changelog): TUI upgrade
push time in 23 days
push eventimsnif/bandwhich
commit sha 19b956e6d5adcf834a7fa10e49662f0530192a62
fix(ui): upgrade tui to latest version and fix breaking changes (#190) * fix(ui): upgrade tui to latest version and fix for breaking changes in the api * fix(style): address PR comments
push time in 23 days
PR merged imsnif/bandwhich
Recently, as part of adding Windows support, we switched our TUI backend to Crossterm. This broke the build for FreeBSD here: https://github.com/imsnif/bandwhich/issues/188. In short, TUI was depending on an old version of Crossterm that had a bug when building for FreeBSD. To fix this, I issued a hot fix here: https://github.com/imsnif/bandwhich/pull/189. This upgraded TUI from 0.5 to 0.6.2, which included the FreeBSD fix, but did not have all the breaking API changes from the latest published TUI version (0.10.0).
While this did solve the problem, it did break the UI. When running locally, I was unable to see the "Total Utilization" line at the top, as well as other small glitches.
This PR solves this issue by upgrading tui to the latest version (0.10.0), accounting for all the API changes.
For ease of review, I'm going to sum the relevant parts here:
- Instead of the deprecated
TextTUI widget, we're now usingSpan - Instead of rendering widgets through their render function (deprecated behaviour), we're now providing them to
Frame::render_widget - In
Paragraph, we can provide theSpans directly instead of wrapping them in something we can iterate over. (MUCH better IMO :) ). - In
Table, we now have to provide the widths as tuiConstraintinstances (not so nice for our use case, but the extra allocations are very minimal I think). - We now need to provide the
Crosstermbackend with the system stdout. In our case this is not very elegant, but we should still get cross-platform functionality from the ruststd::ioitself, and it doesn't interfere with our tests - so I think it's fine. - I changed some widths in the
Tablecolumns in a 2-column table-layout, because otherwise one of the titles (Remote Addresses) got cut off. - For some reason TUI now seems to invoke
hide_cursor/show_cursorbefore everyflush. I updated these in the tests - I don't think there is any user facing effect.
@TheLostLambda - if you have time to review this (can wait a few days or even a week if you don't have the time) that would be great. If not I'll get a different pair of eyes on this.
pr closed time in 23 days
PR opened agarrharr/awesome-cli-apps
<!--- Thank you for your pull request. Please fill out the fields below and check that your contribution adheres to our guidelines. -->
New App Submission
- [x] I've read the contribution guidelines.
Repo or homepage link: https://github.com/imsnif/diskonaut
Description: A visual disk space navigator for linux/mac/windows. It draws a tree-map in the terminal representing the disk space of a given folder (or the entire hard-drive), allowing you to delete files/folders and tracking how much disk space was freed in the current session.
Why you think it's awesome: I find it easier to visualize disk space utilization rather than looking at a list of numbers. Diskonaut does that for you in the terminal, and even lets you look at the map being drawn while it's still scanning. (full disclosure: I am the original author).
pr created time in 23 days
push eventimsnif/awesome-cli-apps
commit sha 2895b0a34cea0116b14d586741d505fd6f092a1f
Add diskonaut
push time in 23 days
pull request commentimsnif/bandwhich
Fix VPN traffice not displayed bug
Thanks for weighing in on this, @thepacketgeek and @jconley. IMO the best thing to do right now would be to hide this functionality behind a command line flag (unless you have other suggestions?). Would any of you like to work on this?
comment created time in 23 days
Pull request review commentimsnif/bandwhich
fix(ui): upgrade tui to latest version and fix breaking changes
const TEXT_TAB_TIP: &str = " Use <TAB> to rearrange tables."; impl HelpText { pub fn render(&self, frame: &mut Frame<impl Backend>, rect: Rect) {- let text = {- let pause_content = if self.paused {- TEXT_WHEN_PAUSED- } else {- TEXT_WHEN_NOT_PAUSED- };-- let dns_content = if rect.width <= FIRST_WIDTH_BREAKPOINT {- ""- } else if self.show_dns {- TEXT_WHEN_DNS_SHOWN- } else {- TEXT_WHEN_DNS_NOT_SHOWN- };+ let pause_content = if self.paused {+ TEXT_WHEN_PAUSED+ } else {+ TEXT_WHEN_NOT_PAUSED+ }; - let tab_text = if rect.width <= SECOND_WIDTH_BREAKPOINT {- ""- } else {- TEXT_TAB_TIP- };+ let dns_content = if rect.width <= FIRST_WIDTH_BREAKPOINT {+ ""+ } else if self.show_dns {+ TEXT_WHEN_DNS_SHOWN+ } else {+ TEXT_WHEN_DNS_NOT_SHOWN+ }; - [Text::styled(- format!("{}{}{}", pause_content, tab_text, dns_content),- Style::default().modifier(Modifier::BOLD),- )]+ let tab_text = if rect.width <= SECOND_WIDTH_BREAKPOINT {+ ""+ } else {+ TEXT_TAB_TIP };- Paragraph::new(text.iter())- .alignment(Alignment::Left)- .render(frame, rect);++ let text = Span::styled(+ format!("{}{}{}", pause_content, tab_text, dns_content),
Aha, good to know - thanks! I made the change.
comment created time in 23 days
push eventimsnif/bandwhich
commit sha eaec4fbe1c84a69584ea046de408958905727658
fix(style): address PR comments
push time in 23 days
Pull request review commentimsnif/bandwhich
Handle disconnected interfaces (and periodically attempt to re-connect)
fn build_ip_tcp_packet( let mut pkt_buf = [0u8; 1500]; let pkt = packet_builder!( pkt_buf,+ ether({set_source => MacAddr(0xa, 0xb, 0xc, 1, 1, 1), set_destination => MacAddr(0xa, 0xb, 0xc, 2, 2, 2)}) /
I think we can remove this now, right?
comment created time in 23 days
startedwfxr/code-minimap
started time in 24 days
pull request commentimsnif/bandwhich
Handle disconnected interfaces (and periodically attempt to re-connect)
@thepacketgeek - I saw your fixes, my apologies for not getting to them yet. I'm going to take a look tomorrow.
comment created time in 24 days
pull request commentimsnif/bandwhich
Handle disconnected interfaces (and periodically attempt to re-connect)
Hey @thepacketgeek, this looks like a good direction.
Currently, there's no timeout so
Sniffer.next()is called in rapid succession. I used a timeout of 10 ms here as it's a good middle ground for keeping sniffing real-time and not spinning too much on a quiet interface.
I think this would work well, seeing as it will only sleep if the network interface becomes unavailable. I think this is a relatively rare occurrence all-in-all.
There's no more CPU spike @ 100% after an interface is disconnected. The thread will silently continue to re-establish the channel for that interface. Should this be handled silently and should bandwhich periodically attempt to reconnect (currently at the same 1 second interval of display updates)
I think handling it silently is fine. Maybe in the future we can develop a warning box, interface status line or some such, but right now I feel this is out-of-scope information for the tool.
As for the PR itself: I glanced over it briefly, and it seems to me we're doing some extra work because we're handling the sleep in main. I feel this change can be much smaller if we handle it in sniffer.rs. Then we can still return an option and sleep within the iterator (with a while loop or some such maybe?). The only thing we'd then have to find a solution for is the case of quitting the app and closing the thread while the interface is still unavailable. Unless I'm missing something of course. :) What do you think?
comment created time in a month
issue closedimsnif/bandwhich
Panic when slice Chinese process name
Each Chinese character has three bytes. So your code in table.rs will cause a panic.
fn truncate_middle(row: &str, max_length: u16) -> String {
if row.len() as u16 > max_length {
let first_slice = &row[0..(max_length as usize / 2) - 2];
let second_slice = &row[(row.len() - (max_length / 2) as usize + 2)..row.len()];
format!("{}[..]{}", first_slice, second_slice)
} else {
row.to_string()
}
}
like that:
let s = "中文";
let s = &s[0..2];
panicked at 'byte index 2 is not a char boundary; it is inside '中' (bytes 0..3) of 中文
closed time in a month
zxlzyissue commentimsnif/bandwhich
Panic when slice Chinese process name
Fixed
comment created time in a month
issue openedtailhook/resolv-conf
Publish new version to crates.io?
Hey there,
Would it be possible to publish a new version to crates.io? We really need this fix: https://github.com/tailhook/resolv-conf/pull/22
Thanks so much!
created time in a month
issue commentimsnif/diskonaut
Released in 0.11.0, thanks @pm100 !!
comment created time in a month
issue closedimsnif/diskonaut
There are two main things I know of that we need to do to port diskonaut to work on windows:
- Currently we rely on hard disk blocks to scan the hard-drive. As far as I know, this does not work on windows, and so we need to find another solution.
- Termion doesn't(?) work on windows, so we would need to use another backend for TUI.
I am VERY interested in a solution for this. If you want to work on this and are unsure how to begin, or the points above are not clear, I would be very happy to discuss this with you further and clarify anything. Please do not hesitate. :)
closed time in a month
imsnifstartedlemunozm/termchat
started time in a month
release imsnif/diskonaut
released time in a month
push eventimsnif/diskonaut
commit sha 9f94e941fbadc83025384ef3aea44a4544e8736d
chore(release): 0.11.0
push time in a month
push eventimsnif/diskonaut
commit sha b6555a8e651018ad39c93441e1946f50762a1fcc
docs(readme): spacing
push time in a month
push eventimsnif/diskonaut
commit sha 34476f00d3cce747a47fcab6ba1abfa5b7185c9b
docs(readme): windows installation
push time in a month
push eventimsnif/diskonaut
commit sha 9d02321d6193c8c01ba5e271e94a9c3c192586f5
docs(changelog): windows support
push time in a month
push eventimsnif/diskonaut
commit sha 929f759f634034eccc0d9bcc595cb2d432a2d0f7
feat(platform): windows version (#74) * init checkin * tests now compile * Update linux.rs * fixed linux build * fmt * most tests pass * all tests pass * reinstate delete after test * remove old snaps * oops on the crossterm dep * fix fmt * add windows test to travis * travis windows tests linux messed up term after q * fmt * clean as per PR * more pr clean * tests done on windows * oops * non windows tests * more cleanup * fmt * one last clean * linux->unix * linux->unix * style(cleanup): minor fixes * style(cleanup): moar minor fixes Co-authored-by: Aram Drevekenin <[email protected]>
push time in a month
PR merged imsnif/diskonaut
100% conversion to crossterm (no dual mode)
seems to work fine, test on windows 10 using new windows terminal and powershell works on my rasp pi system too
tests all compile but dont run
pr closed time in a month
push eventpm100/diskonaut
commit sha 9142878135f8bd02ae5203a167094f5f22ac025b
style(cleanup): moar minor fixes
push time in a month
push eventpm100/diskonaut
commit sha 674204f85afeb5852df13558d9fd64a12099dc13
style(cleanup): minor fixes
push time in a month
Pull request review commentimsnif/diskonaut
source: src/tests/cases/ui.rs expression: "&terminal_draw_events_mirror[7]" --- - - - - - - - - - - - - - - - - - - - - ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ │ - │ │ - │ Are you sure you want to quit? │ - │ │ - │ │ - │ │ - │ │ - │ (y/n) │ - │ │ - └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ - - - - - - - - - - - - - - - - - + ─ ┬ + │ + │ + │ + │ + │ + │ + │ + │ + │ + file2 │ + │ + │ + 1.0M (41%) │ + │ + │ + │ + │ + │ + │ + │ + │ file1 + │ +├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ 392.0K (17%) + │ + │ + │ + │ + │ + │ + │ + │ + │ + file3 │ + │ + │ + 1.0M (41%) │ + │ + │ + │ + │ + │ + │ + │ + ├ + │ + ─ ┴
Thanks for fixing these!
comment created time in a month
Pull request review commentimsnif/diskonaut
where // TODO: we have to do this because otherwise we get "Trying to access area outside the // buffer" errors from tui // we need to investigate if it's a bug in TUI or with us++ // its because you start at 1 when you draw the rectangle grid
Aha! Good find, and good to know. :) Let's update the entire comment block here (and also delete the commented for loop below). Maybe something like We have to do this because the TUI buffer index starts at 1?
comment created time in a month
Pull request review commentimsnif/diskonaut
use ::std::fs::Metadata; use ::std::path::PathBuf; use ::std::sync::mpsc::Receiver;-use ::termion::event::Event as TermionEvent;+//use ::termion::event::Event as TermionEvent;
Let's remove this comment
comment created time in a month
Pull request review commentimsnif/diskonaut
fn create_temp_file<P: AsRef<Path>>(path: P, size: usize) -> Result<(), failure: #[test] fn two_large_files_one_small_file() {- let (terminal_events, terminal_draw_events, backend) = test_backend_factory(190, 50);+ let (_terminal_events, terminal_draw_events, backend) = test_backend_factory(190, 50);
I'm happy the tests pass now. Very good job with this. I would like to get these terminal_events assertions back though. I feel they're very helpful in preventing double-renders and such when changing code in the future. I understand this might be a little bit of repetitive work though, so let me know if you'd like a hand with this. I did something similar in bandwhich by running all the tests, seeing what events I get and copy/pasting them to the test assertions expected events.
comment created time in a month
Pull request review commentimsnif/diskonaut
impl<'a> Widget for TitleLine<'a> { } current_path_relative_to_base.to_string_lossy().into_owned() };-- let separator = if base_path.ends_with('/') {+ let separator = if base_path.ends_with(::std::path::MAIN_SEPARATOR) { // eg. if base_path is "/", we don't want current path to // also start with "/" otherwise we'll have "//path_to_my/location" // instead of "/path_to_my/location" format!("") } else { format!("{}", ::std::path::MAIN_SEPARATOR) };+ #[cfg(test)]+ let current_path = str::replace(¤t_path, "\\", "/");+ #[cfg(test)]+ let base_path = str::replace(&base_path, "\\", "/");+ #[cfg(test)]+ let separator = str::replace(&separator, "\\", "/");
Good call.
comment created time in a month
Pull request review commentimsnif/diskonaut
pub struct KeyboardEvents; impl Iterator for KeyboardEvents { type Item = Event; fn next(&mut self) -> Option<Event> {- match stdin().events().next() {- Some(Ok(ev)) => Some(ev),- _ => None,- }+ // note : these are all events not just kb+ // resize comes here too
Good catch on the naming here. What do you think of renaming KeyboardEvents to TerminalEvents or something like that?
comment created time in a month
Pull request review commentimsnif/diskonaut
impl TitleTelescope { fn draw_loading_chars(&self, text_length: u16, rect: Rect, buf: &mut Buffer) { let index_in_text = (self.loading_indicator as u16 % (text_length)) as u16; buf.get_mut(rect.x + 1 + index_in_text, rect.y)- .set_modifier(Modifier::BOLD);+ .set_style(Style::default().add_modifier(Modifier::BOLD)); if index_in_text >= text_length - 2 {- buf.get_mut(rect.x + 1, rect.y).set_modifier(Modifier::BOLD);- buf.get_mut(rect.x + 2, rect.y).set_modifier(Modifier::BOLD);+ buf.get_mut(rect.x + 1, rect.y)+ .set_style(Style::default().add_modifier(Modifier::BOLD));+ buf.get_mut(rect.x + 2, rect.y)+ .set_style(Style::default().add_modifier(Modifier::BOLD)); } else { buf.get_mut(rect.x + 1 + index_in_text + 1, rect.y)- .set_modifier(Modifier::BOLD);+ .set_style(Style::default().add_modifier(Modifier::BOLD)); buf.get_mut(rect.x + 1 + index_in_text + 2, rect.y)- .set_modifier(Modifier::BOLD);+ .set_style(Style::default().add_modifier(Modifier::BOLD));
Wow, this is weird. Here we use the set_style API even though we're actually just adding a modifier (if it was green, it's not bold green, if it was yellow, it's now bold yellow, etc). Nothing we can do ofc, just... weird.
comment created time in a month
Pull request review commentimsnif/diskonaut
+// for not windows - linux or mac
I think we can rename this file to unix.rs and then it would include both linux and mac
comment created time in a month
Pull request review commentimsnif/diskonaut
pub fn start<B>( ); } - if SHOULD_HANDLE_WIN_CHANGE {
Getting rid of this block fills me with joy ;P
comment created time in a month
Pull request review commentimsnif/diskonaut
-use ::signal_hook::iterator::Signals;
I think we can get rid of this file now, right?
comment created time in a month
Pull request review commentimsnif/diskonaut
pub struct KeyboardEvents; impl Iterator for KeyboardEvents { type Item = Event; fn next(&mut self) -> Option<Event> {- match stdin().events().next() {- Some(Ok(ev)) => Some(ev),- _ => None,- }+ // note : these are all events not just kb+ // resize comes here too++ Some(read().unwrap()) } }- macro_rules! key { (char $x:expr) => {- Event::Key(Key::Char($x))+ Event::Key(KeyEvent {+ code: KeyCode::Char($x),+ modifiers: KeyModifiers::NONE,+ })+ };+ (sh_char $x:expr) => {
What do you think of renaming sh_char to shift?
comment created time in a month
Pull request review commentimsnif/diskonaut
+ Total: 20.0K (3 files), freed: 0 | /tmp/diskonaut_tests/two_large_files_one_small_file
I think we can remove this file
comment created time in a month
Pull request review commentimsnif/diskonaut
license = "MIT" edition = "2018" [dependencies]-tui = "0.9"-termion = "1.5"+tui = {git="https://github.com/fdehau/tui-rs", default-features = false, features = ['crossterm'] }
hrm... I'm not very thrilled about getting tui from github. I think you mentioned they have something fixed in main but have not published it yet. Is there a timeline for them publishing it? Can you link to the issue? Maybe we can ask them.
comment created time in a month