Mobile Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 25 December 2009

Parsing Excel Spreadsheets in Perl

Posted on 08:56 by Unknown
Last week at work I was playing around trying to read Nessus Scan results which were pre dumped in an Excel file. I used Jon McNamara's Perl modules to parse and write Excel files. They largely worked very well, just as it was documented.

One place though where I got a little stuck was when I was reading rows from one file and conditionally writing it to another Excel file. So for eg. My first Excel file had say 5 rows and I wanted to write only 2,4 and 5 but not 1 and 3. What kept happening was that 2,4 and 5 did get written, but 1 and 3 also got written as blank rows leaving gaps in the Excel sheet. I worked around it by forcing zeros to get written for Rows 1 and 3 as I didn't want blank rows in the destination file (Cant Autofilter if they are present) but it did get a little messy as complexity increased.

So I decided to use the modules just for vanilla read and write. I read data from Excel and instead of parsing it then and there dumped it into a TAB separated text file. I parsed , stripped and did what I wanted with the contents of the text file and then used the WriteExcel module to write it back to the new Excel sheet. That got the job done just like I wanted it.

Now maybe I was missing something and should have RTFM more carefully, but this little hack kind of helped me when I was under a little time pressure so figured I'd put it out so someone else stuck..could try this out.
Read More
Posted in | No comments

Formshield Captcha Advisory

Posted on 08:50 by Unknown
Tested the Formshield Captcha a while back and published an advisory on Bugtraq for the same.
Read More
Posted in | No comments

Writing Code in a New Language

Posted on 08:40 by Unknown
I'm not a developer by profession. I do enjoy a little bit of programming though. It keeps me not being utterly bored with my job following procedures that are put down by me or someone else. Also considering the fact that we do a lot of Source Code Reviews it makes sense how to learn how to write Secure Code. So I decided to learn PHP. I learnt a few things during the same; which should be globally applicable, thought I'd share it here.

-- Decide your requirements first of all. What do you need to do? You need to learn code just enough to do that.

-- Don't sit down with a huge 800 page book and learn its syntax inside out. It'll only get you frustrated. You might not want to learn a lot of it right now so read just enough so you can start writing. Its best to start writing..fast.

--Once your reqs are clear. Decide your program flow. What should happen when you click on that link? Where should it go? Get that entire flow clear in your head and even draw a little diagram ensuring your clear about the same.

--Once your "click click" flow is clear design your database if you have one. Decide which clicks need to display something on the screen. Those clicks will most probably need DB interaction. Based on what data you need to display - create your database and as many tables as you can. Don't make it too complex at this stage - design only as much as you can think of and visualize clearly. The further you can think though, the easier you will find it at a later stage.

--Once your database arch is clear decide what part of your code needs to read from which table and what part needs to write. Create database users and GRANT rights accordingly. Again like above.. you can change as you code but the further you can envision here the easier it is.

--Document all your database queries, all your GRANTS..everything. You'll be suprised at how helpful it is if you want to recreate from scratch. And trust me .. when you're new to a language you WILL recreate from scratch ..many times ;)

--Now read your first requirement - write pseudo code for it. Decide what function names you will use. Try and maintain a pattern here. You'll be surprised how much you forget about your own code.

--Once you know the structure of your code, open all the online references for the relevant functions as well as your book if you studied from one. Understand if there is existing code / functions which does what you want to do(Remember your requirements phase?)

--Start coding. Run code regularly. After every 10-20 lines print things out and see if things are working as you expected them to work. This is much better than writing 200 lines and finding out nothing works. Later when you're experienced(even then I wonder) you might not need this approach but initially when you're getting your feet wet - please code-run-code-run as much as you can.

--Enable warning/strict/all security protections you know of while you start to code. Helps you know what you're doing wrong.

--Lastly comment your code. Please.PLEASE.
Read More
Posted in | No comments

Management

Posted on 08:38 by Unknown
This is a post where I put in a lot of my thoughts based on my experiences at work with people on and off projects. It isn't something that is unique or anything, just things that I have learnt over the years and feel that anyone new to the job might benefit from. I plan to add to this list .. all the time.

Juniors:
Keep your calm, at all times specially in a crisis and in front of your juniors.
Set an example for your juniors ; follow yourself what you tell them.
Keep taking feedback from your juniors and peers.. its the best way that you will learn about yourself.
Give people chances, a lot of them - Don't write them off or judge them on 1 instance.
Trust people - give them responsibility , you wont know how good or bad they are at it unless you do.
Delegate Work where you can - Don't get greedy and want to do it all yourself...you can't raise your own level if you don't do this.

People in general:
Argue when you need to , not just for the heck of it each time you disagree a little.
Remain open to newer ideas , you wont grow if you're not.
Don't be scared of being wrong - in public or in private..you only learn from this.

Your own Work Ethics:
Automate boring time taking tasks , don't be lazy- its worth the effort you put in just that once.
Reply to every personal Email - its shocking to see how few do it
In a positive environment a weak guy goes up, try and help create one
Try and get rid of negativity - as far as you can; it isn't easy but its worth trying
Live selfishly - Have a deep desire to obtain only the best around you - on merit. Don't settle for something less if you can help it
Do not delay things you can do now
Remain grateful - Remain humble - No matter how big you become -- Remember there was a time you knew nothing
Read More
Posted in | No comments

FWAuto

Posted on 08:35 by Unknown
I wrote a little parser for analyzing Firewall Rulebases of a PIX firewall. It works nicely and gives you an idea of where all your rules are over flexible. Not working on it anymore - but the latest version works well.

Here it is:
https://sourceforge.net/projects/fwauto/
Read More
Posted in | No comments

Contests I played

Posted on 08:35 by Unknown
I do enjoy taking part in hacking contests online, off and on. Recently took part in a little contest on Chris Christianson's site and hey...I won it :) . Here's the challenge solution that I submitted.

Another one which I did but wasn't as lucky in is here. I got to the semifinals though for what its worth.

And another where I got even closer.
Read More
Posted in | No comments
Newer Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Nvidia has a Logan-powered Shield 2 console in development!!!
    Nvidia CEO Jen-Hsun Huang has revealed to  Engadget  that a successor to the Shield is in development, and it will likely be powered by a ne...
  • John Carmack isn't convinced that Steam Machines will be a hit!!!
    Gaming legend John Carmack recently took the stage at  Nvidia’s Montreal conference  where he  talked  a bit on the subject of Valve and the...
  • Yahoo Tops Google In Web Traffic Again!!!
    NEW YORK (AP) — For the third month in a row, more Americans visited Yahoo's websites than Google's, according to comScore Inc.'...
  • Google Nexus 5: The geekysupport Review!!!
    It’s that time of the year again, where Google releases a new Nexus handset for those wanting a cheap yet powerful device running stock Andr...
  • 20 Life Hacks and Tools to Boost Productivity on Your Computer!!!
    With the flood of  new technologies , websites, apps, news, work files, pictures, articles and the like, staying organized and focused is be...
  • A peek at the inside of Sony's PlayStation 4!!!
    See  what's inside the PlayStation 4 with these exclusive photos  Inside Sony headquarters, at the heart of Tokyo’s Shinagawa district, ...
  • EMC Defenders CTF - Week 3 - Contest 14 - Reversing
    I played the EMC defenders CTF with a few of my friends a while back. We sadly couldn't complete all the challenges. All the same it was...
  • Asus reveals Chromecast-like Miracast Dongle, has new smartphone and Chromebook line-ups on the way!!!
    Asus has made its way mainly in the PC business for quite some time now, but new reports have  surfaced pointing at the company looking to e...
  • ASRock unveils a pair of motherboards designed specifically for Bitcoin mining!!!
    Those looking to generate some extra cash by mining for Bitcoin now have a couple of new hardware options courtesy of ASRock. The motherboar...
  • Why and how to set up your own wiki with Dokuwiki!!!
    DokuWiki is a simple but versatile wiki. Find out how to install, configure, and begin using DokuWiki.  A couple of weeks ago, I had to set ...

Categories

  • 100
  • 12.04
  • 2.2
  • 2013
  • 21
  • 4848
  • 8080
  • add
  • alternative
  • analysis
  • android
  • apk
  • app
  • applet
  • applets
  • appletviewer
  • application
  • appsec
  • asmx
  • assembly
  • attack
  • attacks
  • basic
  • basics
  • beginner
  • blazeds
  • blog
  • book
  • books
  • breakpoint
  • breakpoints
  • browser
  • burp
  • CALL
  • capture
  • certificate
  • chain
  • cheops
  • client side
  • code
  • conference
  • console
  • content-type
  • coverage
  • CRLF
  • cross
  • crossdomain
  • csrf
  • ctf
  • customer service
  • database
  • deblaze
  • debug
  • debugger
  • decision
  • defcon
  • delete
  • deleting
  • dll
  • dogbert
  • dom
  • dynamic
  • element
  • emulator
  • encryption
  • engineering
  • entity
  • environment
  • example
  • executable
  • external
  • firebug
  • flash
  • flex
  • FlourineFX
  • flow
  • flowchart
  • forensics
  • fs
  • fuzz
  • glassfish
  • graph
  • handbook
  • harden
  • hash
  • hints
  • hit
  • hittrace
  • howto
  • IDA
  • idapro
  • IDB
  • immunity
  • in use
  • incremental
  • inetsim
  • injection
  • install
  • introduction
  • java
  • java.policy
  • javaee
  • javascript
  • jks
  • jump
  • keyboard
  • lab
  • loaderdata
  • malware
  • management
  • mapper
  • market
  • MD Description
  • MD FAQ
  • MD Technical Support
  • MD Updates
  • MD User Guide
  • md5deep
  • mount
  • msdn
  • network
  • newbie
  • olly
  • ollydbg
  • options
  • packet
  • password
  • pbkdf
  • pcap
  • peb
  • peb_ldr_data
  • penetration
  • pentest
  • permissions
  • phone
  • pkcs12
  • policytool
  • port
  • practical
  • procedure
  • proxy
  • resign
  • resignation
  • response
  • restrict
  • reverse
  • reversing
  • review
  • salt
  • same origin
  • sample
  • scripting
  • sdk
  • secure
  • security
  • set
  • setup
  • sharif
  • shortcuts
  • SI
  • signed
  • site
  • snapshot
  • soapui
  • source
  • splitting
  • ssl
  • start
  • static
  • steps
  • stunnel
  • superblock
  • support
  • test
  • thoughts
  • thread
  • tips
  • tool
  • tools
  • tor
  • trace
  • truecrypt
  • tutorial
  • ubuntu
  • umask
  • understand
  • university
  • unsigned
  • video
  • view
  • virgin
  • virtual
  • virtual box
  • virtual machine
  • virtualbox
  • vm
  • watch
  • web
  • web application
  • web service
  • work
  • wsdl
  • xhr
  • xml
  • xss
  • xxe

Blog Archive

  • ▼  2013 (496)
    • ▼  November (143)
      • EMC Defenders CTF - Week 3 - Contest 14 - Reversing
      • Report details Intel Broadwell-K CPUs, Iris Pro gr...
      • What happens if you plug an Xbox One into... itsel...
      • Google completes upgrading its SSL certificates to...
      • Honda, Hyundai and Toyota showcase vehicles powere...
      • Valve readying invites for local game streaming be...
      • Liquid metal alloy could allow hobbyists to print ...
      • AMD is giving away 1,000 copies of Battlefield 4 o...
      • Acer's replacement CEO resigns before taking offic...
      • Jury awards Apple $290 million in patent infringem...
      • HBO Go now supports Chromecast on both iOS and And...
      • Half-Life mod Black Mesa approved for sale on Stea...
      • Xbox One teardown reveals standard PC hardware com...
      • University in Cyprus becomes world's first to acce...
      • Adobe opens $9.99 per month Photoshop + Lightroom ...
      • Building a coding machine becomes fun with the $99...
      • Motorola signs deal with 3D Systems to help build ...
      • Google sends out developer invites to Chromecast h...
      • Sprint finishes dead last in Consumer Reports' lat...
      • MediaFire's new desktop file-sharing client brings...
      • Infographic: A timeline of Sony's PlayStation fran...
      • FCC may allow passengers to make in-flight cellula...
      • Pogoplug launches $49 Safeplug to anonymize your h...
      • Silk Road mastermind allegedly ordered six murders...
      • Intel Atom SoC roadmap updated, new chips and 64-b...
      • Upcoming MMORPG by Ex-Blizzard devs, WildStar to b...
      • A Software Challenge: Why Users Uninstall Apps!!!
      • geeky support 2013 gift Guide/recommendations!!!
      • Yahoo to announce the hire of Katie Couric as 'Glo...
      • Microsoft matches Sony, sells over a million Xbox ...
      • What Black Friday deals are you eyeballing this ye...
      • Instagram said to be working on private messaging ...
      • Doom co-creator John Carmack resigns from id Softw...
      • Motorola signs deal with 3D Systems to help build ...
      • The state of self-driving cars, Intel details upco...
      • Xbox One Review!!!
      • Qualcomm reveals new Snapdragon 805 processor with...
      • MediaTek showcases world's first true octa-core mo...
      • Logitech releases PowerShell controller with integ...
      • Firefox’s streamlined “Australis” user interface l...
      • Flickr rolls out new printed photo book options st...
      • Greedy wireless carriers aren't interested in smar...
      • New details on Elder Scrolls Online campaign, stor...
      • Google launches free prepaid debit card, links to ...
      • End of an era: Winamp is shutting down after more ...
      • Are you sure you're clean?
      • John McAfee Responds To Wrongful Death Lawsuit!!!
      • Google Nexus 5: The geekysupport Review!!!
      • Tesla chief Elon Musk updates Model S warranty to ...
      • Command & Conquer not dead after all, revival immi...
      • MOGA unveils the Ace Power gamepad for iPhone, iPo...
      • Yahoo to encrypt all products in light of NSA spyi...
      • Call of Duty: Ghosts patch adds e-sports features,...
      • Sony's $399 PlayStation 4 costs roughly $381 to bu...
      • Snapchat turns down $3 billion acquisition offer f...
      • Samsung has now shipped 800,000 Galaxy Gears, new ...
      • Snapchat surpasses photo sharing activities of Fac...
      • Nokia Lumia 2520 available at Verizon this week, p...
      • Valve set to reveal its own Steam integrated virtu...
      • Google to pay $17 million for unauthorized trackin...
      • New Toshiba Kira Ultrabook lasts 22 hours on a sin...
      • Senate hosts hearing on Bitcoin and other virtual ...
      • Apple reportedly buying PrimeSense, the company be...
      • Decade-long study claims video games don't affect ...
      • FBI memo claims Anonymous has been hacking US gove...
      • ZTE Open smartphone with Firefox OS review!!!
      • Sony sells more than a million PlayStation 4s with...
      • Ouya unveils limited edition white console with do...
      • Qualcomm's $350 Toq smartwatch releases on Decembe...
      • A behind-the-scenes look at how YouTube handles an...
      • NFL and MLB ask the Supreme Court to hear a challe...
      • Trademark application points to impending Fallout ...
      • Raspberry Pi has now sold 2 million units, doubles...
      • Hackers breach vBulletin support forum using zero-...
      • Sony publishes guide to troubleshoot PlayStation 4...
      • 12 Ways Black Friday 2013 Will Be Different!!!
      • Apple iPad Air: The geekysupport Review!!!
      • VMware Tools now available for nested ESXi with th...
      • VMware Tools now available for nested ESXi with th...
      • VMware Tools now available for nested ESXi with th...
      • Prepare yourself for the looming deadline of Windo...
      • Final PS4 & Xbox One specs compared, why users uni...
      • What's the oldest gadget you still use regularly?!!!
      • Newly appointed FCC chairman calls for wireless ca...
      • ASRock unveils a pair of motherboards designed spe...
      • Europe allows airlines to install 3G and LTE netwo...
      • The PlayStation 4 is officially here, some systems...
      • Republic Wireless offers Moto X for $299 contract-...
      • FCC's Speed Test app for Android now available on ...
      • Jolla to launch inaugural smartphone with Sailfish...
      • Quantum computers looking more realistic with majo...
      • Samsung reportedly planning to launch smartphone w...
      • Minecraft: The Story of Mojang now available on Yo...
      • Jawbone's first wireless fitness tracker Up24 is a...
      • Yahoo to auction off more than 100 long-lost domai...
      • Computer History Museum publishes Apple II DOS sou...
      • CyanogenMod one-click installer for Android arrive...
      • PlayStation 4 Review: (In Progress), But Do You Ne...
      • MIT showcases impressive dynamic shape display tec...
      • snapchat turns down $3 billion acquisition offer f...
      • Intel's 9-series chipsets not expected to support ...
      • Xperia Z1 Review: Testing Sony's Latest Android Fl...
      • Google and HP pause sales of the Chromebook 11 fol...
      • AMD's upcoming mobile APUs make 'Jaguar' next-gen ...
      • 24 accidental scientific discoveries that reshaped...
      • Firefox OS Review!!!
      • IBM's new Watson supercomputer developer platform ...
      • Leaked Dragon Age: Inquisition video showcases com...
      • Asus reveals Chromecast-like Miracast Dongle, has ...
      • Double-sided YotaPhone will go on sale this holida...
      • New bill would give online video services protecti...
      • Coin is the all-in-one credit card designed to sli...
      • Blizzard says it was wrong to include offline mode...
      • Isis Mobile Wallet launches across the country wit...
      • Western Digital hoping for 5x larger hard drives w...
      • Hot PC Games for the 2013 Holiday Season!!!
      • Amazon and USPS team up to offer Sunday delivery!!!
      • A peek at the inside of Sony's PlayStation 4!!!
      • Smartphone adoption forecasted to reach 5.6 billio...
      • Microsoft's Xbox One arrives two weeks early for s...
      • Netflix and YouTube account for 50% of North Ameri...
      • Moto X customization with Moto Maker now available...
      • FCC seeks your help in testing mobile broadband sp...
      • Next iPhones to have large curved displays and bet...
      • Original iPod first went on sale 12 years ago with...
      • Latest Google Chrome beta makes it easy to locate ...
      • Microsoft releases hotfix for Windows 8.1 mouse ac...
      • Sony expects to sell three million PlayStation 4 c...
    • ►  October (297)
    • ►  September (51)
    • ►  August (2)
    • ►  March (1)
    • ►  January (2)
  • ►  2012 (16)
    • ►  October (3)
    • ►  September (1)
    • ►  August (4)
    • ►  June (1)
    • ►  May (4)
    • ►  April (2)
    • ►  February (1)
  • ►  2011 (22)
    • ►  October (1)
    • ►  September (2)
    • ►  August (1)
    • ►  July (9)
    • ►  June (1)
    • ►  May (2)
    • ►  April (6)
  • ►  2010 (8)
    • ►  August (3)
    • ►  April (2)
    • ►  January (3)
  • ►  2009 (6)
    • ►  December (6)
Powered by Blogger.

About Me

Unknown
View my complete profile