Author Topic: Help with automation :(  (Read 754 times)

toorist

  • Newbie
  • Posts: 3
  • Reputation: 0
Help with automation :(
« on: June 22, 2012, 01:19:41 pm »
Hello! This isn't hacking, strictly speaking, but I am a neophyte trying to come up with a windows batch file to automate http post and I've run into a bit of a bump in the road.

What I am trying to do is, every X minutes, I would like the script to log in, fill out the form and post (not sure if it's relevant, but the submit button has no name). This is a two-stage post (both pages sharing the same url) and the first post will call either a failure page or a verification page. IF it is the verification page (tricky to distinguish due to url conflation, but I'm thinking maybe outputting the page and setting up an if statement to scan the result for a certain word that will exist only in the verification stage) => I would like it to fill out the resulting form (case sensitive) and post.

I have some vague ideas about using cURL to do this, but beyond that I seem to have gotten a bit turned around. Please see attached txt for comments. I started off in a windows batch file, but I could switch to iOS bash or terminal scripting if they are better suited for the task. Finally, I apologise for the ridiculously puny script I've commented on, but I have no prior experience in this and have had to learn as I went along in a couple of hours due to a certain urgency in the matter. If anyone could point me even vaguely in the right direction, I would be very much grateful. Thank you!

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: Help with automation :(
« Reply #1 on: June 22, 2012, 01:21:32 pm »
Does it have to be a batch file, or can it be something else (eg python)?

toorist

  • Newbie
  • Posts: 3
  • Reputation: 0
Re: Help with automation :(
« Reply #2 on: June 22, 2012, 01:37:32 pm »
It doesn't have to be a batch file and I'm willing to learn/implement whatever method works.

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: Help with automation :(
« Reply #3 on: June 22, 2012, 02:18:41 pm »
Batch files are so ugly and weak. Python would be a MUCH better choice for the job. It would be relatively easy to implement this in python. Look into urllib and urllib2, mechanize, and beautifulsoup. And maybe cookielib

toorist

  • Newbie
  • Posts: 3
  • Reputation: 0
Re: Help with automation :(
« Reply #4 on: June 22, 2012, 02:48:21 pm »
Thanks so much C0deH4cker. Python seemed the more complex of the two at face-value, but I'll try tinkering around with those!

Don't like seeing ads? Click here to register!

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: Help with automation :(
« Reply #5 on: June 22, 2012, 03:16:57 pm »
Batch is way too basic to do something like that. Python is simple and complex. You can do much much more with python.

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: Help with automation :(
« Reply #6 on: June 22, 2012, 04:26:23 pm »
Agreed, it may be worth looking into vb as an alternative to python.  It's not as good, but many find it easier an plus it's embedded into windows, no need to install anything else. 

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: Help with automation :(
« Reply #7 on: June 22, 2012, 06:03:58 pm »
True

B0mb3d

  • Full Member
  • ***
  • Posts: 218
  • Reputation: 3
Re: Help with automation :(
« Reply #8 on: June 24, 2012, 11:19:54 pm »
I use a vb script to download a payload and execute it from my evil server. Works great.. Although Dynamic DNS is still a pain to set up on my phone