Bash, Curl, and logging into sites with complex passwords [solved]

I'm working on a little script to help check deviantArt messages, but I'm stuck at the moment. Below is the code so far:
#!/bin/sh
#checks your dA messages for you
#FIXME: store username and password in file?
curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" \
--cookie /tmp/cjar --cookie-jar /tmp/cjar \
--data "username=$1" \
--data "password=$2" \
--data "action=Login" \
--location "https://www.deviantart.com/users/login" >/tmp/tmp.html
It works fine with simple passwords, but as soon as it involves special characters like !@#$%^&*(), the following page that's churned out says "Wrong Password" even though the given password is correct. Is curl parsing one of these special characters as a special character (like when merging the input given to the site) or is there something I need to do with any of these special characters before they're passed onto the site?
Last edited by ShadowKyogre (2010-10-15 00:36:04)

You might try using the --data-urlencode option instead of the --data option. Special characters should be url-encoded (that funky %20 stuff you see in the URL bar) which --data does not appear to do automatically.

Similar Messages

  • Just updated ipod 8gb touch to 4.2.1 and cannot sync applications, even though logged into iTunes 10.2 and they are there and logged into ipod with same account and syncing does not work

    appreciate any assistance

    I had also faced the same problem. After weeks of hunting, I found many apps compatible with ios 4.2.1
    Gun Bros
    Super KO Fight
    Gravity Guy
    I Must Run
    Men vs Machines
    Hit Tennis 2
    Optime Games
    Air Hockey Gold
    Real Tennis
    Football Kicks
    Frisbee Forever
    Spy Mouse
    Ninjump
    Office Jerk: Zombies
    The Walking Dead
    Angry Birds
    Angry Birds Season
    Office Jerk: Holidays
    Real Skijump
    MotoGP 2010
    Real Racing GTI 2010
    Asphalt Audi RS 3
    GTA Chinatown Wars
    Max Adventures
    Samurai Dojo
    Deer Hunter Challenge
    Cricket: Defend the Wicket
    Airport Madness Control
    There are lots more...Some of these games will probably be unavailable as it must've been upgraded
    Also check out this site: https://sites.google.com/site/appleclubfhs/support/advice-and-articles/finding-a pps-for-older-devices
    Hope this helps!

  • I have connected my ipad to my computer and logged into iTunes website. To restore my Ipad I have chosen language, country then it asks you to connect with cable and log into iTunes, I have done that, but cannot find this other information I need to resto

    I have connected my ipad to my computer and logged into iTunes website. On my iPad to restore my my data Ipad I have chosen language, country then it asks you to connect with cable and log into iTunes, I have done that, but cannot find this other information I need to restore from the website. Can you help me please? the 2 replies, I thank you, but this has not helped with my problem.

    Your post is somewhat confusing. To restore your iPad you use the iTunes application on your computer and connect your iPad. Select your iPad in the left column of iTunes on your computer and select General in the right column. You should find the restore choice there.

  • When I try and log into iclouds on my iphone it comes up with the max free accounts have been used on this device. How do I reset this

    When I try and log into iclouds on my iphone it comes up with the max free accounts have been used on this device. How do I reset this

    See this previous discussion.
    icloud: The maximum number of free...: Apple Support Communities

  • My Macbook Pro's iTunes App was logged in as someone else. I logged out of that account and logged into mine, but I found that the app still shows all of the previous account's content. None of my apps, songs, or movies are there!

    My Macbook Pro's iTunes App was logged in as someone else. I logged out of that account and logged into mine, but I found that the app still shows all of the previous account's content. None of my apps, songs, or movies are there! iTunes 12.1.0.50 on OS X Yosemite version 10.10. Why is iCloud doing this, and how do I view my content again?

    MacBook Pro  / Mozilla Firefox / Netflix / Silverlight Update solved - DON'T DWNLOAD FROM NETFLIX
    I solved this problem tonight. I have a MacBook Pro with 10.5.8. I know, it's old. But I love my Netflix and I recently noticed that Firefox plays Netflix much better.  Then I suddenly got this message that I needed to download the latest Silverlight - it only takes 30 seconds! - WRONG.   However, after much searching, I finally did the steps in order and it worked.  
    This was after repeatedly downloading Silverlight from the Netflix site without success.  So here's what I did:
    1. Went to http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx
    2. Followed the directions. I felt like such an idiot for not doing it right before.
    3. Go to your hard drive and search for "Silverlight" to locate ANY existing Silverlight files: .dmg, etc.
        [also check your Libary/ Internet Plug-ins, but the above search is faster]
    4. Drag it all to the trash and empty it.
    5. Go back to the Get  Silverlight page and click on the Install on that page, not the Netflix site.
    6. Note the steps for Safari or Mozilla Firefox - I wanted Firefox, so I follwed those instructions.
    7. Once it's installed, close all the browsers and Restart that bad boy. Right away.
    8. Open a browser, go to Netflix and proceed to joyfully rot your brain with Netflix content. Yay!

  • I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    Apple doesn't have anything to do with this other than enforcing the DRM protection. The developers of this content expect to be paid if someone wants to use their content. When you purchase content in the app store, you purchase a license to use the content. This license does not permit you or anyone else to resell or give this content away. The individual you purchased the phone from simply does not have the right to sell or give away any purchased content on the phone. You were deceived.

  • HT204053 Can I log into iCloud with an alias email?

    Noob here, did a search and couldn't seem to find an answer. (or I didnt look hard enough. ) So aplogies if these have already been asked before.
    I want to change my iCloud email address, but I've searched around here and read that you can't change it once you create it and link it to your apple ID. So, I created an alias and was wondering if you could log into iCloud with an alias email?
    For example if my iCloud address is [email protected] and my alias was [email protected], could I go to icloud.com and login using [email protected]?
    Also, what are the proper steps to get the alias email to behave like the icloud primary email;I stupidly chose a dumb icloud email address and regret it, and if I set the alias to be the only email to be able to send mail in my iphone and macbook, can I basically ignore the primary icloud email and use the alias the whole time to send and compose mail?
    Also, I don't necessarily need to know/use the primary icloud email, since I use my apple ID to log into icloud.com?
    From what I understand, the primary icloud that is linked to your apple ID is mail server, right? I'm not really sure, to be honest.
    Thanks!

    In the Mail application on your Mac, add the aliases, separated by commas, to the 'Email address' field in Preferences>Accounts>General. They will then appear in the drop-down menu for the 'From' address in the New message pane.
    They already appear in the equivalent place in the new message pane at icloud.com.

  • I cannot log into messages with my aol/aim account

    Hi,
    When I try to log into messages with my aol/aim account, it keeps on saying that the username and/or password is incorrect. Neither are incorrect as I can log into the account on the aim web settings page and on the aol page.
    Any help?
    Thanks

    If you change your passord on AOL, for security they block your new password on your iPad but not on your PC. I downloaded the AOL application on my iPad and then used that to change my password on AOL and then my Mail on my iPad fully works. I then used my AOL new password on my PC and now everything works.

  • I am logging into iTunes with a new device.  This was my wife's computer. When I log into iTunes I see her music.  Did I lose my music library?

    I am logging into iTunes with a new device.  This was my wife's computer.  When I log into iTunes with my login and password I see her music.  Did I lose my music libary?

    never mind. New Itunes seemed to have solved issue.

  • Logging into outlook with an apple email address

    i have a windows laptop but I want to log into outlook with my apple email adress and it is asking for my outgoing and incoming email server in order to do this. I dont know what i meant to put exactly is there anyway you can help?

    Hello eharding
    Download the iCloud Control Panel; it will automatically setup iCloud email for you as well as other syncing other options.
    iCloud Control Panel 3.0 for Windows
    http://support.apple.com/kb/dl1455
    Regards,
    -Norm G.

  • My computer logs into Skype with my wife's Skype n...

    My wife has never used my computer to log on and use skype.  Presently when I turn my computer on it now displays my wife's skype name with her contacts etc. I am unable to use skype from my computer now... It does allow me to sign her out, and log into my account with my skype name and password, that shows me that I have Skype credit and displays my profile, etc. But I am unable to use skype...  I have been using my computer for skyping for a couple of years with absolutely NO problems... 

    Each iPod and iOS device has its own sync preferences with iTunes - under the various tabs for the device sync preferences with iTunes. Nothing under the various tabs for sync preferences for a device can be selected by itself.
    Disable automatic syncing when your iPhone is connected and make your selections under the various tabs for your iPhone sync preferences with iTunes followed by a sync.

  • My macbook wont allow me to use the same hotmail address as i used on my other computers. How can I keep the same email and log into it on a macbook?

    my macbook wont allow me to use the same hotmail address as i used on my other computers. How can I keep the same email and log into it on a macbook?

    That indicates a hardware failure. Read here:
    http://support.apple.com/kb/ts1559
    If nothing works, you most likely have a hardware failure. Make an appointment at an Apple store to confirm.

  • I try and log into icloud but the get the message valid apple id but not an icloud account. help anyone

    I try and log into icloud but it wont let me. It saya my appleid is valid but I dont have an icloud account. how do I get one?

    Welcome to the Apple Support Communities
    You have to log in iCloud on an iPhone, iPod touch, iPad or Mac first before being able to use iCloud on your PC. See > http://www.apple.com/icloud/setup
    If you haven't got an iPhone, iPod touch, iPad or Mac, you can't use iCloud

  • I have an ipad I used with a computer which's now broken. I bought a new Macbook Pro and signed into iTunes with my usual Apple id and pw. I connected my ipad to the new Macbook but it won't back up my photos or Apps from the ipad to the new macbook. Help

    I have an ipad I used with a computer which's now broken. I bought a new Macbook Pro and signed into iTunes with my usual Apple id and pw. I connected my ipad to the new Macbook but it won't back up my photos or Apps from the ipad to the new macbook. Help

    What do you mean " back up my photos or Apps"?
    The photo sync is one way - computer to ipad.
    You can transfer itunes purchases.  Without syncing:  File>Transfer Purchases
    Copy everything from your backup copy of your old computer to your new one.

  • How do i put my songs onto a cd and log into my account?

    i just downloaded this to my computer i usually do it on my phone how do i put my songs onto a cd and log into my account on the computer it wont let me
    <Re-Titled By Host>

    Downloaded what? No idea what you're talking about.
    Please have your keyboard checked. It seems the punctuation keys are not functioning, making it difficult to read your post.

Maybe you are looking for

  • Error on SSO

    Oracle SSO Failure - Unable to process request Either the requested URL was not specified in terms of a fully-qualified host name or OHS single sign-on is incorrectly configured. Please notify your administrator. I followed the instructions and on th

  • RSC3 in RH 5 and 6

    We have licenses for RH5 and for RH 6. We want to start using the Robo Source Control 3 for multi-authoring. Can we use RSC3 with both RH 5 and RH 6 projects?

  • Can't Edit in Adobe Soundbooth

    Hi everyone, I have run into a problem... When I select "edit in adobe soundbooth", then change my audio, quit soundbooth (saving work), then the modified audio is now in my audio track, and also as a separate file in the project panel.  Super. BUT,

  • Does iMac 2009 A1224 support DDR3 1333MHz Ram or not?

    Hi, I got lucky and came across a free set of 4GB 2Rx8 PC3-10600S-09-11-F3 Ram. My question is, if an iMac model A1224 supports 1333MHz or not? Any help greatly appreciated Cheers

  • Preview opens old PDF's

    In Snow leopard when I opened a PDF and quit preview and opened another pdf only the most recent PDF would open, IN LION every PDF opens unless I close it in Under prefences and general what is the difference between Open all files in one window Open