Showing posts with label Hacking. Show all posts
Showing posts with label Hacking. Show all posts

Saturday, January 27, 2018

Lenovo android phone not visible on android studio

My Lenovo K6 power was not visible on device chooser window. I did enable the developer option and usb debugging option. Even after that my phone was not visible on Android studio device chooser window. Then finally I followed following link and it worked :

https://lenovomobilesupport.lenovo.com/in/en/solutions/ht502856

Saturday, February 4, 2017

Using 4G Jio sim on 3G phones

A lot of articles are there on internet which serves as a tutorial to allow 4g Jio sim to be used with 3G handsets.

After doing some research and spending mu half day over it, I can confidently say that it is not possible to use Jio sim with 3G only phone.

I tried all the techniques on my moto E and samsung galaxy S4 but no help.

Finally I read an articled which explains that you need special hardware support to run 4G.

No software can be used as a replacement.

Tuesday, January 31, 2017

List of all the websites a programmer or a codes or a techie must visit in his lifetime.


Blogs
Coding Style Guides
General Advice and Tips
Github
Interview Preparation
News
Online Courses
Programming Contests
Programming Practice
Reddit
Resources
Tutorials
Social Interaction
Wikipedia

Wednesday, January 25, 2017

Interesting android codes

Dial these codes from android phone to see the results.

Following are the secret codes for you. Please read the subsequent result before trying them out, since a few codes are meant to wipe your entire system, pressing which you can lose your valuable data.
*#*#4636#*#* Display information about Phone, Battery and Usage statistics
*#*#7780#*#* Resetting your phone to factory state-Only deletes application data and applications
*2767*3855# It's a complete wiping of your mobile also it reinstalls the phones firmware
*#*#34971539#*#* Shows completes information about the camera
*#*#7594#*#* Changing the power button behavior-Enables direct poweroff once the code enabled
*#*#273283*255*663282*#*#* For a quick backup to all your media files
*#*#197328640#*#* Enabling test mode for service activity*#*#232339#*#* OR *#*#526#*#* Wireless Lan Tests
 *#*#232338#*#* Displays Wi-Fi Mac-address
*#*#1472365#*#* For a quick GPS test
*#*#1575#*#* A Different type GPS test
*#*#0283#*#* Packet Loopback test
*#*#0*#*#* LCD display test
*#*#0673#*#* OR *#*#0289#*#* Audio test
*#*#0842#*#* Vibration and Backlight test
*#*#2663#*#* Displays touch-screen version
*#*#2664#*#* Touch-Screen test
*#*#0588#*#* Proximity sensor test
*#*#3264#*#* Ram version
*#*#232331#*#* Bluetooth test
*#*#232337#*#* Displays bluetooth device address
*#*#8255#*#* For Google Talk service monitoring
*#*#4986*2650468#*#* PDA, Phone, Hardware, RF Call Date firmware info
*#*#1234#*#* PDA and Phone firmware info
*#*#1111#*#* FTA Software version
*#*#2222#*#* FTA Hardware version
*#*#44336#*#* Displays Build time and change list number
*#06#Displsys IMEI number
*#*#8351#*#* Enables voice dialing logging mode
*#*#8350#*#*Disables voice dialing logging mode

Tuesday, May 14, 2013

Six Interesting Facebook Tricks That You Might Not Know

Almost everyone of us have now been using Facebook since years, but there are a lot of things that we still are unaware of. Here are 6 interesting tricks that you might not know about Facebook. 

1.Trick to update blank status:

Simply enter @[3:3: ] in your status update box. To update your blank status as a long statement, paste the code one below another as showed below:
@[3:3: ]
@[3:3: ]
@[3:3: ]

2. Download Full Facebook Album in a single click:

Now you can download a full Facebook album in a single click. Just visit this app called Facebook2zip. Facebook2zip.com

3. Go offline for a particular person:

Instead of going offline for all of your friends, now you can go OFFLINE for a particular person. Just open that person's chat pane and click on the settings button. You'll find a button saying 'Turn off chat for xyz', just click and you are done.

4. Facebook status update from Desired Device (via iPhone without an iPhone):

Login to your Facebook account and update your status, just visit and search for your desired device on top right corner of the page: http://statusvia.org/apps/Facebook/

5. Update Facebook status with symbols:

Facebook status symbols do not have to use the inbuilt facility. But we're cool with the status message through the use of symbols is a Facebook trick. Just visit: http://fsymbols.com/all/
Then double click copy and paste the desired symbol in your status.

6. Post Facebook update in blue

Paste the below mentioned code in your status update box and write your text in place of 'your text':
@@[1:[0:1: your text]]  


Source -  http://www.efytimes.com/e1/fullnews.asp?edid=106004&ntype=mor&edate=5/14/2013
 

Friday, April 12, 2013

command to view memory and processor details in linux

To view cpu info and memory info in linux you can simply cat the related proc files.

cat /proc/cpuinfo -- for cpuinfo

cat /proc/meminfo -- for memory info
For example :

the command :
cat /proc/cpuinfo

will give output :

 cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6004.26
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 4
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.25
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6043.37
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 6
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.28
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 4
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.17
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 5
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 5
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.25
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 6
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.20
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 7
model name      : Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
stepping        : 10
cpu MHz         : 3000.114
cache size      : 6144 KB
physical id     : 1
siblings        : 4
core id         : 7
cpu cores       : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips        : 6000.24
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:
 


Hard Disk Drive (HDD) not working on windows 7 after formatting it on Ubuntu ?


I formatted my Western Digital 500 Gb hard disk on Ubuntu 10.4 and now I want to use it on Windows 7 but it cannot detect it.
I formatted it with FAT(applicable to all) option.
I tried to Google this problem a bit and as suggested by one of the site i tried to format this drive with NTFS. Still windows cannot detect it.
Drives in windows 7 is not a problem because I tried a different usb drive on it and it works.
I can see the led of the drive glow when I connect it and I can also see remove drive safely option in lower right corner, but i cannot see any option in "my computer" to access the hard disk.


Solution:


I tried to format my HDD using "diskpart" utility available on widows7. It is working now.
Just run "diskpart" on command-promt on diskpart select your HDD and run following commands:
CLEAN
CREATE PARTITION PRIMARY 
SELECT PARTITION 1
ACTIVE
FORMAT FS=FAT32 QUICK
ASSIGN
EXIT
 

Saturday, April 6, 2013

Interesting html code -2 (Facebook like button)


It is very easy to get flike button

comment below if you want to know how to do it

Interesting html code - 1 (Google Plus +1 Button demo)

Just coy paste below code in your address bar to see magic:

data:text/html;charset=utf-8,<div id="Layer8"><html><head><title>+1 demo: Basic page</title><p>"like my blog on google plus"</p><link rel="canonical" href="http://iwriteanything.blogspot.in/" /><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script></head><body><g:plusone></g:plusone></body></html>

My experiences from multi core enabled coding

If you are looking to exploit the new processor technology then multi-core enabled coding is not the only method.
 

You can easily exploit the power of multiple cores by MPI, openmp, threading etc, these technologies will help you get good gains on not only dual core but also on machines with more than 8 cores. I myself have tested my some machines with as much 20 cores (hyperthreading enabled.)

From my personal experience :

I took part in a code contest which took place at my workplace where we were supposed to write CPU-AWARE code which required lots of redundant data manipulations. We were given with very powerful machines to test our codes. One of the machines had 40 cores and was based on nehalem microarchitecture. I was only aware about multi-threading at that time so I wrote a code which created 40 threads (using pthreads ,unix style multi-threading) and these thread worked independently no communication or resource sharing was required for my problem I was able to do the task in 2 second(approx) when single thread code needed about 1 minute(approx) to complete the task. I was expecting a good rank for my code but to my suprise I was nowhere among toppers. Toppers extensively used AVX and SSE instruction along with multi-threading to write codes. The person who won was able to complete the task in 0.1 second.


In short, there are other areas too to exploit than just using multiple cores.

You can refer folllowing optimisation manual for more details :

http://www.intel.com/content/www...

The latest microarchitectures from intel offers great scope for improvements in code if we write CPU-AWARE programs.

These new microarchitectures offers the following innovative features:

  • Intel Advanced Vector Extensions (Intel AVX)

— 256-bit floating-point instruction set extensions to the 128-bit Intel
Streaming SIMD Extensions, providing up to 2X performance benefits relative
to 128-bit code.
— Non-destructive destination encoding offers more flexible coding techniques.
— Supports flexible migration and co-existence between 256-bit AVX code,
128-bit AVX code and legacy 128-bit SSE code.

  • Enhanced front-end and execution engine

— New decoded Icache component that improves front-end bandwidth and
reduces branch misprediction penalty.
— Advanced branch prediction.
— Additional macro-fusion support.
— Larger dynamic execution window.
— Multi-precision integer arithmetic enhancements (ADC/SBB, MUL/IMUL).
— LEA bandwidth improvement.
— Reduction of general execution stalls (read ports, writeback conflicts, bypass
latency, partial stalls).
— Fast floating-point exception handling.
— XSAVE/XRSTORE performance improvements and XSAVEOPT new
instruction.

2-2
  • Cache hierarchy improvements for wider data path

— Doubling of bandwidth enabled by two symmetric ports for memory
operation.
— Simultaneous handling of more in-flight loads and stores enabled by
increased buffers.
— Internal bandwidth of two loads and one store each cycle.
— Improved prefetching.
— High bandwidth low latency LLC architecture.
— High bandwidth ring architecture of on-die interconnect.

  • System-on-a-chip support

— Integrated graphics and media engine in second generation Intel Core
processors.
— Integrated PCIE controller.
— Integrated memory controller.

Wednesday, April 3, 2013

Sending automated mails to Gmail/ Email bomb

While surfing net I found this amazing code which can be used to automated mails to gmail users.

Its written in python so you need to have python installed on your system to get it running.

def send_email():
    import smtplib

    gmail_user = "gmail_user@gmail.com"
    gmail_pwd = "password"
    FROM = 'gmail_uswr@gmail.com'
    TO = ['gmail_target@gmail.com'] #must be a list
    SUBJECT = "Testing sending using gmail"
    TEXT = "Testing sending mail using gmail servers"

    # Prepare actual message
    message = """\From: %s\nTo: %s\nSubject: %s\n\n%s""" % (FROM, ", ".join(TO), SUBJECT, TEXT)
    try:
        #server = smtplib.SMTP(SERVER)
        server = smtplib.SMTP("smtp.gmail.com", 587) #or port 465 doesn't seem to work!
        print "print 1"
        server.ehlo()
        print "print 2"
        server.starttls()
        print "print 3"
        server.ehlo()
        server.login(gmail_user, gmail_pwd)
        print "print 4"
        server.sendmail(FROM, TO, message)
        print "print 5"
        #server.quit()
        server.close()
        print 'successfully sent the mail'
    except:
        print "failed to send mail"

send_email()

In order to send 100's of mail to an user just put send_mail() inside a loop your email bomb is ready. :P

PS: This code is not written by me but I found in while surfing net.

PPS: Do not use this on my email-id :).

Monday, March 4, 2013

basic commands you must know in linux

A small list of Linux commands which every one must know in order to work on console :

1. cd - change directory.
2. cd .. - go one directory level back.
3. pwd - present working directory.
4. rm - remove / delete a file. "rm <file>"
5. rm -r - recursively remove a directory.
6. cp - copy a file " cp<source> <destination>"
7. mv - move similar to cut in windows. "mv <source> <destination>"
8. cat - display contents of a file. "cat <file>"
9. grep - search string in a file. Used with pipe(|). "cat <file> | grep <string> " or. "grep <string> <file>
10. find - find a file in a directory. "find ./ -name <file>"
11. top - to monitor activities running on your system.
12. ls - list contents of a directory.
13. ps - show processes running on present console.
14. rlogin - remote login to server. "rlogin <server-name>"
15. ssh - open a secure shell to other server. "ssh <server-name>"
16 scp - secure copy to other server. "scp <file-name> <server-name>"
17. tar - to create a tar file. compressing a folder.
18. vi/vim/gvim - open file in code editors like vi,vim,gvim.
19. gedit - open file in gedit. "gedit <file>"
20. gcc - compile C code "gcc <file.c>". produces a.out.
21 ./<executable> - run the executable or script file.
22. chmod - change access mode of a file or directory. "777" sets it to all read, all write and all run.