mediastreamsegmenter on a public dropbox link not working - media

I have a streamable url from my dropbox public link:
https://dl.dropboxusercontent.com/1/view/taf4hn5q1lbppmx/Public/01Track1.mp3
I would like to stream this to my ios device so I read upon HTTP Live Streaming doc from Apple.
So, i am trying to use the mediastreamsegmenter to get the index file in .m3u8 format.
mediastreamsegmenter -f ./test/ https://dl.dropboxusercontent.com/1/view/taf4hn5q1lbppmx/Public/01Track1.mp3
The above gave me an invalid port error and so i listed :8080 and tried but it still does not work.
Does mediastreamsegmenter work on https/TCP? or only with UDP? Where am i going wrong here?

Related

Arduino IDE falied to connect Blynk USB

Im using Arduino IDE to connect blink cloud with my Smartphone, but when I run the tools> Blynk > Run USB script I receive the flowing message:
socat[11716] E SSL_connect(): error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
I find how to solve this problem (Only for studies propose). In Arduino Home folder, I go to libraries->Blynk->scripts, I open the blynk-ser.sh in a text editor and search for line when socat is used, i find this
socat $GEN_ATTR "$FROM_ATTR" "$TO_ATTR"
So, I change to
socat $GEN_ATTR "$FROM_ATTR" "$TO_ATTR",verify=0
This issue is because in the certs folder client.pem is missing, I dont find how to generate this, but, I avoid ssl validation for the connection.
WARN: DO NOT USE THIS TIP IN PRODUCTION, BECAUSE YOU WILL MAKE YOUR PROJECT UNSAFE

How can I dump and decrypt HTTPS traffic from the command line under linux?

I have a web application that I need to debug because I suspect that the request send is altered on its way to the server.
I want to dump the HTTPS traffic received on port localhost:443 and decrypt it so I can check the packages.
Obviously I do have the private hey from the server.
Is there a way to do this from the command line?
You can use ssldump.(it works on top of libpcap).
ssldump -r <File_Name>.pcap -k <Key_File>.key -d host <IP_Address>
You specify the following options with the ssldump utility:
-r: Read data from the <File_Name>.pcap file instead of from the network.
-k: Use <Key_File>.key file as the location for the SSL keyfile.
-d: Display the application data traffic.
You may refer the complete example here
You can import the SSL key in wireshark to decrypt https if Wireshark is compiled with SSL decryption support:
http://www.etherlook.com/howto/use-wireshark-to-decrypt-https/
http://wiki.wireshark.org/SSL

Google places API data in linux(ubuntu 12.04)

I want to get the data of a url and store it in a file. I used this command
wget -O output_file.txt "http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true"
and it worked fine , and the data got stored in output_file.txt. Now when I used another url like this :
wget -O output_file.txt "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=YOUR_API_KEY"
, its showing an error
Resolving maps.googleapis.com (maps.googleapis.com)... 74.125.135.95, 2404:6800:4001:c01::5f
Connecting to maps.googleapis.com (maps.googleapis.com)|74.125.135.95|:443... failed:
Connection refused. Connecting to maps.googleapis.com (maps.googleapis.com)|2404:6800:4001:c01::5f|:443... failed: Network is unreachable.
Also the data is not getting stored in the mentioned file. Also i tried with other url, it worked fine, except the google places api url just mentioned above. I would like to mention that the problematic url is working fine, if i just type it in some browser. But that way, i can only vbiew the data. But i want that data to be stored in some file.
all problems are in linux (ubuntu 12.04)

Uploading to EC2 problems. How do you do FTP?

I have setup a new EC2 instance on AWS and I'm trying to get FTP working to upload my application. I have installed VSFTPD as standard, so I haven't changed anything in the config file (/etc/vsftpd/vsftpd.conf).
I have not set my port 21 in the security group, because I'm doing it through SSH. I log into my EC2 through termal like so
sudo ssh -L 21:localhost:21 -vi my-key-pair ec2-user#ec2-instance
I open up filezilla and log into local host. Everything goes fine until it comes to listing the directory structure. I can log in and right and everything seems fine as you can see below:
Status: Resolving address of localhost
Status: Connecting to [::1]:21...
Status: Connection established, waiting for welcome message...
Response: 220 Welcome to EC2 FTP service.
Command: USER anonymous
Response: 331 Please specify the password.
Command: PASS ******
Response: 230 Login successful.
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: EPSV
Response: 229 Entering Extended Passive Mode (|||37302|).
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing
Is there something which I'm missing in my config file. A setting which needs to be set or turned off. I thought it was great that it connected but when it timed out you could picture my face. It meant time to start trawling the net try and find the answer! Now with no luck.
I'm using the standard Amazon AMI 64 bit. I have a traditional lamp setup.
Can anyone steer me in the right direction? I have read a lot about getting this working but they are all incomplete, as if they got bored half way through typing up how to do it.
I would love to hear how you guys do it as well. If it makes life easier. How do you upload your apps to a EC2 instance? (Steps please - it saves a lot of time plus it is a great resource for others.)
I figured it out, after the direction help by Antti Haapala.
You don't even need VSFTP setup on the instance created. All you have to do is make sure the settings are right in FileZilla.
This is what I did (I'm on a mac so it should be similar on windows):
Open up file zilla and go to preferences.
Under preferences click sftp and add a new key. This is your key pair for your ec2 instance. You will have to convert it to the format FileZilla uses. It will give you a prompt for the conversion
Click okay and go back to site manager
In site manager enter in your EC2 public address, this can also be your elastic IP
Make sure the protocol is set to SFTP
Put in the user name of ec2-user
Remove everything from the password field - make it blank
All done! Now connect.
That's it you can now traverse your EC2 system. There is a catch. Because you are logged in as ec2-user and not root you will not be able to modify anything. To get around this, change the group ownership of the directory where your application will lie (/var/www/html) or what ever. I would change it so it is on a EBS volume. ;) Also make sure this group has read write and execute permissions. The group for the ec2-user is ec2-user. Leave everyone else as nothing. So the command you use while logged in via ssh
sudo chgrp ec2-user file/folder
sudo chmod 770 file/folder
Hope this helps someone.
FTP is a very troublesome protocol because it requires a secondary pipe for the actual data transfer and does not definitely work well when piped. With ssh you should use SFTP which has nothing to do with FTP but is a completely different protocol.
Read also on Wikipedia
Adding the key to www is a recipe for disaster! Any minor issue with your app will become a security nightmare.
As an alternative to ftp, consider using rsync or a more "mature" deploy strategy based on capistrano for instance. There are plenty of tools for that around.
Antti Haapala's tips are the only way to work around with EC2 SFTP. It works just fine! Just note that you need to create the /var/www/.ssh/ folder and copy the authorized_keys file there.
After that you'll need to change authorized_keys ownership to www-data so ssh connection can recognize it. Amazon should let people know that. I looked for this in there forums, FAQ, etc. No clue at all... Cheers once more to stackoverflow, the way to go haha!

How can you download a file/zip from the commandline using putty?

I'm trying to write a batch script (CMD # Windows XP Pro) that will automatically download and unzip packages with the help of 7zip and putty/psftp
If I have a URL to a package to download http://somesite.org/packages/package.zip how do I download it on command line using putty?
Also if you have a better way to do this that would be helpful too.
wget is of course an obvious solution, but I also suggest to have a look at cURL. From their website:
curl is a command line tool for
transferring files with URL syntax,
supporting FTP, FTPS, HTTP, HTTPS,
SCP, SFTP, TFTP, TELNET, DICT, LDAP,
LDAPS and FILE. curl supports SSL
certificates, HTTP POST, HTTP PUT, FTP
uploading, HTTP form based upload,
proxies, cookies, user+password
authentication (Basic, Digest, NTLM,
Negotiate, kerberos...), file transfer
resume, proxy tunneling and a busload
of other useful tricks.
Of course free and open source, and despite its huge list of supported protocols it's as simple to use as wget, so to use your example
curl -O http://somesite.org/packages/package.zip
downloads package.zip to a local file with the same name
curl -o myname.zip http://somesite.org/packages/package.zip
downloads package.zip as myname.zip
curl http://somesite.org/packages/package.zip > package.zip
redirects curl's stdout to package.zip
EDIT - example corrected, with thanks to #PrabhakarKasi
win32 version of wget:
http://pages.interlog.com/~tcharron/wgetwin.html
Putty isn't really a download tool. Unless you want to download something via SCP/SFTP. So yes, wget is more helpful here.
I don't know putty, but certainly wget can do. If you are in Windows, you can get it by cygwin or just google a win32 version.
pscp.exe -pw yourpassword you#somesite.org:/packages/package.zip .\
The path to /packages/package.zip should be whatever the path to the public web files are on the server. So, for example, on some old apache server, it might be:
pscp.exe -pw yourpassword you#somesite.org:/users/httpd/vhosts/default/packages/package.zip .\
Use pscp, which comes with PuTTY:
pscp user#host:/path/to/file.7z .
7z e file.7z
If you set this up with SSH keys, pscp won't have to ask you for a password.

Resources