emotional_soup_88

joined 5 months ago
 

Good day! If I may be so bold as to ask a rudimentary question, I stumbled upon a phenomenon that I don't seem to fully understand.

If I define the length of intCheck with [] or [1], the program goes into an endless loop from the very start. No user input required. If, however, I define it as [2] or greater, the program works as intended, as long as the user input is less than the number of bytes defined in the char array. If, however, the user input is greater than the predefined byte size, the program repeats the else condition of the while loop - here, printf - the number of times that corresponds with the byte size defined for char intCheck. Is this an overflow of choice?

//Bank of Haruhi

//TODO
// - Create user account: require user first name, last name, user name, password, age (deny if < 20 yrs)
// - Prompt login (deny if != password && username)
// - Display menu ("About the Bank of Haru", "Account Settings", "Check your balance", "Deposit", "Withdraw", "Close account", "Logout")

#include <stdio.h>
#include <string.h>
#include <stdbool.h>

int main(void) {

//Base 
char intCheck[3] = ""; //Will "if (sscanf(char,%d,&int) == true)" check for ANY "char" or a predetermined amount of "char"?

//Registration and login
char firstName[] = "";
char lastName[] = "";
char password[] = "";
int age = 0;

//Menues and selections
int choice = 0;
int arithmeticChoice = 0;

//Balance, deposit and withdrawal
float balance = 0.0;
float deposit = 0.0;
float withdraw = 0.0;

printf("Welcome to the Bank of Haruhi! Please login (1) or create an account (2): ");

while (fgets(intCheck, sizeof(intCheck),stdin)) {
intCheck[strlen(intCheck) - 1] = '\0';
if (sscanf(intCheck, "%d", &choice) == true && sizeof(intCheck) == 4 && choice == 1 || choice == 2) break; //I'm keeping "sizeof(intCheck)" in order to excercise byte size input validation, but I could just remove it and let "if choice == 1 || 2" restrict the valid input.
else printf("Please enter ""1"" to login or ""2"" to create a new account: ");
}

return 0;

}

The program is, of course, not nearly complete. I just stopped doing anything else, as soon as I stumbled upon this phenomenon.

I'm using Internxt at the moment, but Koofr seems pretty neat.

Hackerman.jpg

I know. Got me a senior position at IBM.

Panel 6: how to write gibberish in Japanese

On a more serious note, the concept is fun but the execution ruines it 😟

No idea, but I put it out as a bundle with a few games, controllers and such for $100 and within 24 hours nine people have saved it. I have absolutely no evidence to back this up, but I'm imagining that it'll go for 150 - 200.

Thanks! I'm going to try that and I'm also going to clear system cache and reboot.

[–] emotional_soup_88@programming.dev 1 points 4 weeks ago (2 children)

The miracle of rebirth. Thank you for sharing this. Made my day(night). <3

Added some info to the OP.

25
submitted 4 weeks ago* (last edited 4 weeks ago) by emotional_soup_88@programming.dev to c/degoogle@lemmy.ml
 

I was just wondering if maybe you wanted to go to the ball with me 🤓

And also, do you happen to know a way to remove the leftover "artifact" after having removed Samsung's Honeyboard? Just installed Heliboard as part of my degoogling processs and it's GREAT.

Rooted Samsung Galaxy S23
One UI 7.0
Android 15
Keyboards: Heliboard and Simeji

[–] emotional_soup_88@programming.dev 9 points 4 weeks ago (2 children)

Creepy. 🤣 It's precisely what I'm selling and what I'm being asked about: a launch day Switch (European, if that matters). I of course gave them the number.

[–] emotional_soup_88@programming.dev 1 points 4 weeks ago (2 children)

Sweet! About ten years ago, I did want to mod my 3DS with an HDMI connector. Perhaps that being possible was just an urban legend? It would've been so cool to play Smash Bros 3DS on a big screen, back then.

Were there any performance benefits that came with modding Nintendo consoles or was it "just" region unlocking?

<3 there is still good in this world

 

I'm auctioning off ~~out/away (? Non native speaker 😅)~~ my old-ish gaming consoles and this person is asking about a unit's serial number. Why? I mean, I put up more than ten images of the console from various angles and such... What's the significance?

25
Current degoogle progress (programming.dev)
submitted 1 month ago* (last edited 4 weeks ago) by emotional_soup_88@programming.dev to c/degoogle@lemmy.ml
 

I implore you not to advise me to ditch the phone for Pixel. That's a topic for another day. This post is about how far I can push the limits on an inherently spyware riddled Samsung. I use the Play Store for USB Audio Player (paid) and an electronic ID app required to do most payment and government related tasks here. I am not logged into Google or Samsung. Here are my apps, which I manage with Obtainium:

I have blocked most internal trackers and "dangerous" permissions/app ops with the AppManager. I have also removed all the safe and some expert level stuff with Universal Android Debloater. Any and all constructive advice is welcome! :D

 

I'm using HaGeZi's Ultimate DNS Blocklist with AdAway as a base and am now trying to add my own "tweaks", according to what connections my phone makes.

I set PCAPdroid to automatically start capturing after reboot. Before reboot, I kill-ed as many apps and processes as possible without crashing Android and then cleared system memory. I then rebooted and left the phone untouched for five minutes. The following is a heavily edited excerpt of the resulting pcap file. I removed the source IPs, ports, package sizes and protocols, so that the excerpt only contains the destination hosts and the "issuing" apps/packages.

**Google Play Services**
playatoms-pa.googleapis.com
digitalassetlinks.googleapis.com
www.googleapis.com
mtalk.google.com
android.googleapis.com

**Google Play Store**
play-fe.googleapis.com
play.googleapis.com

**IronFox**
firefox.settings.services.mozilla.com
firefox-settings-attachments.cdn.mozilla.net
content-signature-2.cdn.mozilla.net

**Android**
es11.samsung-sm-ds.com

Here are four screenshots of the PCAPdroid capture, in which you additionally can see the protocols, destination ports, captured times, packet sizes and connection states. Let me know if the Buzzheavier link is broken.

Do you have any insights regarding these hosts? What they do, whether they are necessary for an Android system that still runs on the proprietary Google libraries and Google Play Services or whether they can be blocked? I am already blocking the Play Store with a firewall, so the hosts associated with it might not even be getting through. Unfortunately, my firewall doesn't come with granular enough control to allow blocking of individual hosts, which I guess I could do with AdAway instead and see what happens. Anyway, lend me your wisdom! :)

 

I'm using Mullvad because I like their company. F***! These is no way I can formulate this sentence without it sounding weird...

Anyway!

It seems like the state's websites and the municipalities' websites allow Mullvad but the counties' websites block it.

What the actual f.... 😂

What's the situation in YOUR country/region? Are you able to do taxes, surf on healthcare related websites (hospitals etc) and on government bodies' sites without issues?

8
submitted 1 month ago* (last edited 1 month ago) by emotional_soup_88@programming.dev to c/gaming@beehaw.org
 

If you're a fan of the strange, dark and mysterious, then you've come to the r...

Sorry, wrong community.

Do you like horror? Do you like waifus? Then I cannot recommend the indie game MiSide enough. The music, the visuals, the twists, everything is great! The story is quite plain, but the way AIHASTO presents it is great! I can't say much without spoiling the game, so just give it a try!

 

cross-posted from: https://programming.dev/post/48972893

Please share any knowledge or experience that you have on packet inspection using smartphones. I would like to sniff at my switch, which is switching between my (two LANs)^[I put "two LANs" within parentheses to denote that the two LANs are not being switched between.] and my ISP. For this, I have mirrored all ports that are in use to a port that is currently not in use. Can I simply buy one of those USB-C to Ethernet dongles and use tcpdump in Termux? Will Android recognize the dongle as a sniffable network interface? The phone is rooted.

 

Thank you @ScoffingLizard@lemmy.dbzer0.com for telling me about the pcap app! On rooted devices, you can even be running a VPN simultaneously, because then the pcap app doesn't need to take that slot.

Please share any knowledge or experience that you have on packet inspection using smartphones. I would like to sniff at my switch, which is switching between my (two LANs)^[I put "two LANs" within parentheses to denote that the two LANs are not being switched between.] and my ISP. For this, I have mirrored all ports that are in use to a port that is currently not in use. Can I simply buy one of those USB-C to Ethernet dongles and use tcpdump in Termux? Will Android recognize the dongle as a sniffable network interface? The phone is rooted.

44
submitted 1 month ago* (last edited 1 month ago) by emotional_soup_88@programming.dev to c/piracy@lemmy.dbzer0.com
 

I cannot believe how insignificantly low my power draw is when seeding about 200 Linux ISOs on my Ryzen 5700G system with four 4TB SSDs.

Some time ago, I made a post in which I wanted your input on how I could decrease power^[https://programming.dev/post/47150919]. Well, this is the result of turning on all those various energy saving options in the BIOS and some undervolting (all cores set to -30).

Oh, and I also took out all but two chassi fans: the exhaust fan behind the CPU and one above the CPU.

I did try replacing the Gold certified PSU with a Platinum one, but the Platinum one ended up in my gaming rig because the Gold one had more SATA "outlets" and I'm going to need them soon, as the combined Linux ISOs now take up 14TB (and I'm going to continue using SSDs until shit hits the remaining fans).

Thank you people!

 

I'm offering my engineering services for $50/hour. I got my degree at Mars University, graduated year 2069.

 

You rub two insulators against each other and attain a charge imbalance. Is there a rule as to which of the materials will end up with a negative charge and vice versa? Does it depend on which one has more or less lose valence electrons?

view more: next ›