Skip to content

strstr() and exit(0) trouble in C

so I’m working on a simulated linux shell using C (homework), and I have it exiting the program if the user just simply types in “quit”. However, if they throw “exit” somewhere inside a command… “cat file ; exit” I need it to execute the command like normal, the…

Executing mv command with Java.exec();

I am trying to move an file via the linux mv command. I have following code: During execution it translates to /bin/sh -c “mv “/home/test/update/Test-test-23afi369890Ajk/build/libs/*” “/home/test/test.jar”” While this command executes perfectly via the command line, it fail…

DNS Resolver does not contain answer

I’m trying to automate some of the tasks with python. I have to chcek if some domains are still in ours DNS servers. So searching through stack i found script with dns.resolver and tryied to suit it to my needs. So, the script looks like this: My domainfile.txt looks like this: And error message i reciv…

linux kernel crypto API for ECB AES

I am trying to write a sample code for using linux kernel crypto userspace interface. And I do found a example really helped me a lot, thanks to nibrunie: This is quite useful for CBC AES, but not for ECB AES. For What I understand, the variable iov is for Plaintext, iv for initialization Vector, and call ALG…