Wednesday 24 April 2013

Forbidden You don't have permission to access / on this server While IIS and WAMP installed i faced

I have configure my Apache by myself and try to load phpMyAdmin on virtual host, but received "403 Forbidden You don't have permission to access / on this server".


ANS
Are you using Wamp Server then try this...
*Single click on the WAMP server icon at taskbar
*Select the option put online
*Your server will restart automatically
*Then try to access your localwebsit
To run in both ways

http://localhost/phpmyadmin/

http://192.168.136/phpmyadmin/

Edit this file. Previously localhost or Machine_IP permission do't consider.

Best Solution

Change the file content of c:\wamp\alias\phpmyadmin.conf to the following.
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
        Allow from all
</Directory>
Here my WAMP installation is in the c:\wamp folder. Change it according to your installation.
Previously, it was like this:
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Directory>
Restart your Apache server after making these changes.

share|improve this answer

visti this link for further details.
--------------------------------------------------------------------------------------------------
http://stackoverflow.com/questions/8366976/wamp-error-forbidden-you-dont-have-permission-to-access-phpmyadmin-on-this-s


solution :1

Wamp server 2.4 Installed and test for machine IP address 192.168.1.36
 Error: Forbidden
You don’t have permission to access /mysql/ on this server.


httpd.config file
---------------------
# "c:/wamp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "c:/wamp/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

-----
#   onlineoffline tag - don't remove
     Order Allow,Deny
     Allow from all
     
Solution 1.2
I have installed wamp on machine A. When I am on the local server that I installed it on I can access PHPMyAdmin from [127.0.0.1] or [localhost]
But I want to be able to access it from my computer and when I type in IP address of the Server I can see the pages I have put in but when I type [192.168.0.3], PHPMyAdmin comes up saying
Forbidden
You don’t have permission to access /mysql/ on this server.

Solution:
Go to C:\wamp\alias. Open the file phpmyadmin.conf and add

Options Indexes FollowSymLinks MultiViews
Allow Override all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from MACHINE_IP



solution : 2

httpd.conf (restarted it afterwards)

Though localhost/phpmyadmin works fine..
I got this in my httpd.conf

<Directory /home/renat/www>
AllowOverride All
Options +Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName fabbro.fm
    DocumentRoot /home/renat/www/fabbro
</VirtualHost>




solution 3


DocumentRoot "/var/www/html"

<Directory "/var/www/html/">
    AllowOverride all
    # Allow open access:
    Require all granted
    Options Indexes FollowSymLinks Multiviews
</Directory>

Thursday 11 April 2013

Android: Save your apk files from Google Play Store and reverse engg / Determine Android published App



Determining if my app was published

One tip that helped me in determining if my app was published or not was knowing what the URL looked like to access the app in the market, because Google won't tell you how to reach it from the Developer Console. This is the format
 https://play.google.com/store/apps/details?id=app.package.name where app.package.name is your application package.
------------------------------------------------------------------------------------------------
  • Method 1: Use SaveAPK + OI File Manager
    1. Install OI File Explorer from Google Play Store
    2. Install SaveAPK from Google Play Store
    3. Run SaveAPK and select the application(apk) you want to save, then select the directory to store the apk (on SD card)
  • Method 2: Use Astro File Manager
    1. Install Astro File Manager from Google Play Store
    2. Start Astro File Manager then select Application Backup, backup the applications and the apk files will be store in backups/ directory on SD car
  • Procedure for decoding .apk files, step-by-step method:

    Step 1:

    Make a new folder and put .apk file in it (which you want to decode). Now rename the extension of this .apk file to .zip (eg.: rename from filename.apk to filename.apk.zip) and save it. Now you get classes.dex files, etc. At this stage you are able to see drawable but not xml and java files, so continue.

    Step 2:

    Now extract this zip apk file in the same folder (or NEW FOLDER). Now download dex2jar from this linkhttp://code.google.com/p/dex2jar/ and extract it to the same folder (or NEW FOLDER). Now open command prompt and change directory to that folder (or NEW FOLDER). Then write dex2jar classes.dex and press enter. Now you get classes.dex.dex2jar file in the same folder. Then download java decompiler from http://java.decompiler.free.fr/?q=jdgui and now double click on jd-gui and click on open file. Then open classes.dex.dex2jar file from that folder. Now you get class files and save all these class files (click on file then click "save all sources" in jd-gui) by src name. At this stage you get java source but the xml files are still unreadable, so continue.

    Step 3:

    Now open another new folder and put these files
    1. put .apk file which you want to decode
    2. download apktool v1.x AND apktool install window using google and put in the same folder
    3. download framework-res.apk file using google and put in the same folder (Not all apk file need framework-res.apk file)
    4. Open a command window
    5. Navigate to the root directory of APKtool and type the following command: apktool if framework-res.apk
    6. apktool d "fname".apk ("fname" denotes filename which you want to decode)
    now you get a file folder in that folder and now you can easily read xml files also.

    Step 4:

    It's not any step just copy contents of both folder(in this case both new folder)to the single one
    and now enjoy with source code...
    REVERSE ENGG PROCESS 

    How to avoid reverse engineering of an APK file?



    1. Recently, I discovered how to convert an APK file into readable Java source code and XML files. There are three tools you will need: apktool, dex2jar, and jd-gui (or any other java decompiler, JD Gui happens to be the best one I’ve found so far). You can download them from the following URLs:
      http://code.google.com/p/dex2jar/
      http://code.google.com/p/android-apktool/
      http://java.decompiler.free.fr/?q=jdgui
      Make sure you follow the installation instructions for APKTool. Windows users will have to download two files to get it working.
      Once you have these downloaded and installed, the next thing you will need is an APK. With a bit of googling you can easily find APKs for just about anything (e.g. Facebook, Twitter, Amazon App Store).
      Now, that you have everything you will need to do the following:
      1) Extract the APK using APKTool. Run: apktool d <apk>
      2) Extract the classes.dex file found in the APK file. Run: jar xvf <apk> classes.dex
      3) Extract the classes from classes.dex file. Run: dex2jar classes.dex
      4) Extract the classes.dex.dex2jar.jar. Run: jar xvf classes.dex.dex2jar.jar
      You now have the raw data available to you. You can use JD-Gui to peruse the extracted classes and even save the source down as Java. All of the layouts, manifest, strings, images, and assets are also available to you in the appropriate folders.
      Some things I’ve discovered while playing around with this:
      1) Hardly anyone actually runs Proguard on their source code.
      2) Some developers (e.g. Rovio) have encoded much of their assets into proprietary files. This leads me to my next topic: safe guarding your applications.
      There are several things you can do to help safeguard your application against hackers:
      1) Run Proguard on your release APK. This obfuscates all class names, method names, and variables to make it more difficult for hackers to read.
      2) Sensitive data should be encoded in a proprietary binary format.
      3) If you have sensitive logic (e.g. encoding / decoding mechanisms), I would suggest writing native code and calling it from Java.
      These safeguards aren’t 100% fool proof, but it will at least slow down hackers from easily gaining access to sensitive information.
      EDIT: I’ve written another article on how to pull APKs from non-rooted Android devices. Give it a read if you are curious.

      THESE ARE REFERENCE POST. THANKS for sharing these ideas . Wel come to to that corresponding bloggers.

Pearl Getting start guide Reference link

Install pearl in window step by step guide:
--------------------------------------------

http://perl.about.com/od/gettingstartedwithperl/ss/installperlwin.htm

Run pearl first programm in windows:
---------------------------------------

http://www.editrocket.com/articles/perl_windows.html

run command for pearl script:
------------------------------

C:\Pearlscripts>C:\Pearl\bin\perl hello.pl
Hello World!
C:\Pearlscripts>
---========================================
http://www.activestate.com/activeperl/

Click on the appropriate download link. You can leave the registration form blank and just hit continue to proceed. Download the windows msi installer. Run the installer. The areas of interest in the installer are the install location. If you are only running Perl on Windows machines, you can use the default location. If you also have Perl programs running on Linux or Mac OS X, you may want to change the install location to C:\usr. This will allow you to maintain portability in your programs. You can also check the box so that Perl gets added to the path, and check the box to create the perl file extension association. After the installer completes, you now have Perl on your machine.
Perl programs can be created using any text editor such as EditRocket. Perl programs and scripts typically end with the .pl extension. EditRocket will automatically recognize files with the .pl extension as Perl programs, and will color the syntax accordingly.
To create a Perl program, simply create a new file, such as hello.pl. In the file, place the following:
#!/perl/bin/perl
print "Hello World!";
Notice the first line of the file. Perl scripts should start with the path to Perl on the first line. The path to Perl should be the location where you installed Perl on your Windows machine.
The above script can be executed using the EditRocket Tools -> Perl -> Execute Program option, or you can execute it from a command prompt. To execute the script in the command prompt, use the cd command to cd to the directory where the hello.pl file was saved, such as

cd C:\scripts

If when installing Perl, you selected the option for Perl to be added to the path, type the following:

perl hello.pl

Hello World! should then be printed to the screen.

If Perl is not in your Path, you will need to type the full location of the perl executable to run the program, such as C:\Perl\bin\perl hello.pl

Saturday 6 April 2013

Python Development with PyDev in Eclipse



2.1. Python

Download Python from http://www.python.org. Download version 2.6.x from Python. If you are using Windows you can use the native installer for Python.

2.2. Eclipse Python Plugin

The following assume that you have already Eclipse installed. For an installation description of Eclipse please seeEclipse IDE for Java .
For Python development under Eclipse you can use the PyDev Plugin which is an open source project. Install PyDev via the Eclipse update manager via the following update site. http://pydev.org/updates .

2.3. Configuration of Eclipse

You also have to maintain in Eclipse the location of your Python installation. Open in the menu Window -> Preference and select Pydev-> Interpreter Python
Press new and maintain the path to "python.exe" in your installation directory.
The result should look like the following.

3. Your first Python program in Eclipse

Select File -> New -> Project. Select Pydev -> Pydev Project.
Create a new project with the name "de.vogella.python.first". Select Python version 2.6 and your interpreter.
Press finish.
Select Window->Open Perspective ->Other. Select the PyDev perspective.
Select the "src" folder of your project, right-click it and select New -> PyDev Modul. Create a module "FirstModule".
Create the following source code.
'''
Created on 18.06.2009

@author: Lars Vogel
'''
def add(a,b):
    return a+b

def addFixedValue(a):
  y = 5
  return y +a
  
print add(1,2)
print addFixedValue(1) 
Right-click your model and select Run As -> Python run.
able 1. Debugging Key bindings
CommandDescription
F5Goes to the next step in your program. If the next step is a method / function this command will jump into the associated code.
F6F6 will step over the call, e.g. it will call a method / function without entering the associated code.
F7F7 will go to the caller of the method/ function. So this will leave the current code and go to the calling code.
F8Use F8 to go to the next breakpoint. If no further breakpoint is encountered then the program will normally run.

Python = Getting start with python install and Run sample program


Getting Started with Python Programming for Windows Users

I tried in windows:

Installation of Python

  • Download the current production version of Python (3.0) from the Python Download site.
  • Double click on the icon of the file that you just downloaded.
  • Accept the default options given to you until you get to the Finish button. Your installation is complete.

Setting up the Environment

  • Starting at My Computer go to the following directory C:\Python30. In that folder you should see all the Python files.
  • Copy that address starting with C: and ending with 30 and close that window.
  • Click on Start. Right Click on My Computer.
  • Click on Properties. Click on Advanced System Settings or Advanced.
  • Click on Environment Variables.
  • Under System Variables search for the variable Path.
  • Select Path by clicking on it. Click on Edit.
  • Scroll all the way to the right of the field called Variable value using the right arrow.
  • Add a semi-colon (;) to the end and paste the path (to the Python folder) that you previously copied. Click OK.

Writing Your First Python Program

  • Create a folder called PythonPrograms on your C:\ drive. You will be storing all your Python programs in this folder.
  • Go to Start and either type Run in the Start Search box at the bootom or click on Run.
  • Type in notepad in the field called Open.
  • In Notepad type in the following program exactly as written:
# File: Hello.py

print "Hello World!"

  • Go to File and click on Save as.
  • In the field Save in browse for the C: drive and then select the folder PythonPrograms.
  • For the field File name remove everything that is there and type in Hello.py.
  • In the field Save as type select All Files
  • Click on Save. You have just created your first Python program.

Running Your First Program

  • Go to Start and click on Run.
  • Type cmd in the Open field and click OK.
  • A dark window will appear. Type cd C:\ and hit the key Enter.
  • If you type dir you will get a listing of all folders in your C: drive. You should see the folder PythonPrograms that you created.
  • Type cd PythonPrograms and hit Enter. It should take you to the PythonPrograms folder.
  • Type dir and you should see the file Hello.py.
  • To run the program, type python Hello.py and hit Enter.
  • You should see the line Hello World!
  • Congratulations, you have run your first Python program.

Getting Started with Python Programming for Mac Users

Python comes bundled with Mac OS X. But the version that you have is quite likely an older version. Download the latest binary version of Python that runs on both Power PC and Intel systems and install it on your system.

Writing Your First Python Program

  • Click on File and then New Finder Window.
  • Click on Documents.
  • Click on File and then New Folder.
  • Call the folder PythonPrograms. You will be storing all class related programs there.
  • Click on Applications and then TextEdit.
  • Click on TextEdit on the menu bar and select Preferences.
  • Select Plain Text.
  • In the empty TextEdit window type in the following program, exactly as given:
# File: Hello.py

print ("Hello World!") 

  • From the File menu in TextEdit click on Save As.
  • In the field Save As: type Hello.py.
  • Select Documents and the file folder PythonPrograms.
  • Click Save.

Running Your First Program

  • Select Applications, then Utilities and Terminal.
  • In your Terminal window type ls and Return. It should give a listing of all the top level folders. You should see the Documents folder.
  • Type cd Documents and hit Return.
  • Type ls and hit Return and you should see the folder PythonPrograms.
  • Type cd PythonPrograms and hit Return.
  • Type ls and hit return and you should see the file Hello.py.
  • To run the program, type python Hello.py and hit Return.
  • You should see the line Hello World!
  • Congratulations, you have run your first Python program.

Starting IDLE on Mac

  • In a Terminal window, type python. This will start the Python shell. The prompt for that is >>>
  • At the Python shell prompt type import idlelib.idle
  • This will start the IDLE IDE

Using IDLE on either Windows or Mac

  • Start IDLE
  • Go to File menu and click on New Window
  • Type your program in
  • Go to File menu and click on Save. Type in filename.py This will save it as a plain text file, which can be opened in in any editor you choose (like Notepad or TextEdit).
  • To run your program go to Run and click Run Module