User ratings in Google play console - terminal

I have figured out a way to install app ratings from gsutil by giving a command in terminal.
gsutil -m cp gs://pubsite_prod_rev_17/stats/ratings/ratings_com._201806_overview.csv /Users/abhishekgupta/Downloads.
201806 represents year and month.I want it to dynamically change it for current month and run the command daily in terminal.

Changing how you run things in the command line like this is normally known as "shell programming" or "shell scripting". In order to know how to help you, people will need to know what OS (Windows? Mac? Linux) and shell (DOS? Bash? sh?) you are using. Please update your question to let people know what kind of computer you are using.
You might also want to read a tutorial on shell scripting like this one
For doing something daily, you might want to read about cron if you use a linux box.

Related

Windows App Store execute simply cmd command

I need execute simply command in cmd.exe, for example:
ls -l
I care to read the result of executing this command, but I know I didn't Process library. Could you help me?
You can use so called "brokered components" to achieve this. This worked for Windows 8.1, I'm not 100% sure but think it still works for W10.
It's a little hacky. The reason is that it requires extra steps to get along with the security restrictions in Windows and therefore you need some additional projects and stuff
Here's a link to a blogpost on this:https://blogs.msdn.microsoft.com/mim/2014/06/24/create-a-winrt-brokered-component-feedback-from-a-real-life-developement/ You will find more details if you search for "brokered components".
You can see it in action in a video I recorded for YouTube some month ago: https://www.youtube.com/watch?v=3yiZBG6PQmY

CalDAV/CardDAV Radicale backup

Now that I am runing Radicale on my own Linux server (to manage calendars and contacts), I am trying to figure out how to backup Addressbooks via a bash script (which I could then cron or manually launch).
The exporting part is not going to be so difficult thanks to Duplicity.
But where the ... is located the Addressbook ?
There is no *.vcf related to Radicale anywhere on my system.
I've found it.
It is in located in the personal directory :
~/.config/radicale/collections/contact/AddressBook.vcf
In ~/.config/radicale/collections/contact you there are as well the calendars.
Hum. This seems to me to be (remotly) a programing question, since its answer is program for who want to program its own bash backup script.

Process running when starting terminal on Mac OSX

Whenever I start terminal on my Macbook Pro it is running a process. I have to use ctrl+C to kill it. If I close the window directly it warns me that following processs are running: login, bash, bash, perl5.12.
Any idea what might be going on here and how I get back to the normal state?
I personally had this issue a while ago. First check to see if it is from one of your profiles. Assuming you are using bash, we will look at your bash profile.
First, make sure the problem is actually stemming from your bash profile. Source the scrips as follows.
source ~/.bash_profile
source ~/.profile
If after running those you observe the same hanging problem where you have to cntrl+c, then you know what script has the problem.
The best way to remedy the situation is to comment out different parts of your script to figure out where the problem is. Backup your profile and then comment out half of your profile and do a
source ~/.bash_profile
and if it hangs or not will tell you what half the problem is on. Keep repeating this until you find the problem. It sounds longer than it actually is.

protect WiFi shell-scripts against shell injection (sh, tcsh)

Ever saw a WiFi base station named "| rm -rf ~ | rm -rf /?
When scripting some kind of simple analysis or logging of WiFi base station data, how would one ensure that an attacker won't be able to inject shell commands into your expressions?
For example, I want to log data from ifconfig run0 scan on OpenBSD and airport -s on OS X, and I already have some scripts in sh/tcsh that work great for my needs. But how could I ensure that I don't become a victim of shell injections?
this problem has been addressed to the OpenBSD lists (misc#) many times, as well as in other places.
first of all i would advise you to NOT execute things that you get from the network, specially in a script. Maybe you can edit your question to be more specific on what you want to do with these data so our answers could be tailored to it.
if you want to use this info to connect to networks (as a network manager), put yourself between the script and the input. So after getting the output of scan just copy the nwid that you approve in your actual script. check out this discussion on undeadly
if you need to run automated scripts on the input for some other purpose (data gathering?), consider creating a chrooted dir , with your script and your statically compiled shell in it and run it chrooted. Of course you shouldn't rely on that approach for more sophisticated attacks than the one you mentioned in your question.
Hope this helps.

Best way to make a script to SSH?

My university has quite a lot files (like past papers etc) which I need to be on the uni network to access them. I ssh, using port forwarding, into the network and set my browser (Firefox) to go through that port. I know it would be quite easy to write something in most languages that would enter the command into a terminal, but which language/method could I use to make this happen? I expect some sort of scripting language could but I really know nothing about them, but I'd be willing to learn one just to have a little fun with this.
I'm using a cygwin terminal on Windows 7, if that will make a difference.
To neaten up my question: Which language would be best to acheive the above effect? Not necessarily the best, just possible and relatively simple to learn. I used the word best so I suppose I'll put a subjective tag.
EDIT:
Just in case anyway wants to do this precise thing, I'll show my solution. I ended up using a batch file because a few things made the bash more difficult. Anyway, in order to SSH into the network and open a new firefox window with the proxy changed, I just have to open this batch file and enter my password.
cd C:/cygwin/bin
ssh -fND 9001 username#your.website.here
cd "C:/Program Files/Mozilla Firefox"
firefox -no-remote -P SSH_profile
Save as .bat
In order for this to work you need to set up a profile with name SSH_profile (or whatever) and set the connection settings to go through port 9001. The script will open use the ssh command in /cygwin/bin and enter in the information. You enter your password and then it goes to your firefox directory, uses those arguments which opens a separate profile with the connection settings changed (means you can view unaccessible files in one window and anything else you don't want to be on your uni network in another. Just close the windows when you are done.
Quite a specific case but I thought I'd share my answer in the hope of helping someone, some day.
Since you are using cygwin, write a bash shell script.. If you don't want to rely on bash, powershell would be what you want, although you could probably get it working using a batch file.
This is exactly the kind of thing shell scripting is for.
Edit
You can change the firefox settings on the command line by passing the -override flag. This will let you have special settings for the invoked process.

Resources