Questions tagged [phpseclib]

phpseclib is a PHP library that provides pure-PHP implementations of: - BigIntegers - ECDSA / ECDH (66 curves supported) - Ed25519 / Ed448 - Curve25519 / Curve448 - RSA - DSA - DH - SSH2 - SFTP - X.509 - Symmetric key encryption - AES - Rijndael - DES - 3DES - RC4 - Blowfish - Twofish - ChaCha20 - GCM - Poly1305

phpseclib is a PHP library that provides pure-PHP implementations of:

  • BigIntegers
  • RSA
  • SSH1
  • SSH2
  • SFTP
  • SCP
  • ASN1
  • X.509
  • Symmetric key encryption
  • AES
  • Rijndael
  • DES
  • 3DES
  • RC4
  • Blowfish
  • Twofish

Repository at GitHub: https://github.com/phpseclib/phpseclib

793 questions
-1
votes
1 answer

What is the PHP equivalent of this JS encrypter code?

I am trying to log in to Steam (not via the API as it's very limited) with cURL, however I got stuck at encrypting the password. Basically the process of logging in is posting a username to https://store.steampowered.com/login/getrsakey The response…
user3210615
  • 7
  • 1
  • 17
-1
votes
2 answers

SSH2 to a remote machine via a webpage (html and php)

I am trying to connect to a remote linux machine via a web page, submit a command and view its output on the webpage itself. This is what i have done so far (after every step I echo a text, just so i can follow up with where the code can reach) The…
user
  • 149
  • 1
  • 6
-1
votes
1 answer

how to know sftp file transfer speed and time taken

Is there a way to calculate the time taken & the speed for downloading/uploading a file via sftp in php as similar to the below? $sftp->get('filename', 'local/filename'); //gets the file $sftp->size('filename'); //gives the size of the file. These…
kumar
  • 1,690
  • 2
  • 14
  • 37
-1
votes
1 answer

how to encrypt plaintext using rsa public key created by c#.net and decrypt in c#

Code Sample in php using phpseclib with RSA XML FORMAT PUBLIC AND PRIVATE KEY : NOTE : IN this PHP SAMPLE : RSA XML FORMAT PUBLIC AND PRIVATE KEY created by c#.net and data decrypt successfully in this php sample. include 'vendor/autoload.php'; $rsa…
test comp
  • 1
  • 1
-1
votes
1 answer

phpseclib SFTP can`t put file with special characters

Following code is used to upload file to SFTP: \SSH::into('server')->put($localFile, $remotePath); It uses phpseclib/phpseclib/Net/SFTP.php behind the scenes. Upload does not work when trying to upload file with special characters in it e.g.…
werd
  • 608
  • 3
  • 11
  • 23
-1
votes
1 answer

Command works in SSH via MobaXterm, but not found in SSH via PHP?

I'm trying to connect to a server in my PHP code via SSH (using the Net_SSH2 class), and run a number of commands on the remote server. The remote server outputs bash: runmqsc: command not found. The odd thing is, that the exact same command is…
Aviv Cohn
  • 11,431
  • 20
  • 52
  • 95
-1
votes
1 answer

unable to pass parameters as part of command in PHP script through AJAX call

I am trying to pass start time and end time values from my front end screen to PHP script and trying to run a command with passed values of start time and end time in it using an AJAX call. I am able to echo the start/end time on screen, but when i…
Goutam
  • 1,257
  • 5
  • 19
  • 37
-1
votes
1 answer

cannot load key using phpseclib

Need help. Im using phpseclib 0.3.10 and i think i cannot load my privatekey. This is my code. include('Net/SFTP.php'); include('Crypt/RSA.php'); $sftp = new Net_SFTP('mydomin.net'); …
Zurreal
  • 191
  • 3
  • 15
-1
votes
1 answer

Phpseclib AES decryption fails on string longer than 16 characters

We are using phpseclib to implement AES decryption on server side and using Java-Android AES client. When the string is longer than 16 characters, the decryption fails, but if the string to decrypt is less than 16 characters it works fine. On server…
-1
votes
2 answers

how do I get the pid of a specific process

I am writing a PHP script that connects to a remove server using SSH. what I need to do is to check if a specific process is running or not so that I can terminate it. I am using the phpseclib. following code connects to the server and lists the…
Afghan Dev
  • 6,691
  • 9
  • 42
  • 71
-1
votes
1 answer

Trying to do so that you can download. With sftp in php

I try to do so that I can download files but I have a problem and don't know how to fix it can you help me find the error? Nothing happens. And help me to get this to work. I don't know how to fix this so need all the help I can…
Big Loser
  • 1
  • 4
-1
votes
1 answer

encrypt/decrypt with Android and PHP

Sorry for this question. I've read all the previous questions, but my code still not work. Thanks in advance to anyone that will help me in understanding where is the problem. In android I use this code for reading the public key and produce the…
Katte
  • 141
  • 1
  • 7
-1
votes
2 answers

Mysql connection to remote server in PHP

I know this question has been asked several times before, but the solutions posted have not worked for me. I have tried all of them. So here is my question Q) I need to login to a @server using a username @username and password @password. On that…
zeemav
  • 1
  • 4
-1
votes
1 answer

SFTP upload very slow with phpseclib

SFTP upload is slow, I tested it in a client and with phpseclib and the client was much faster while phpseclib was much slower. Is this normal behavior? What could cause this? I trimmed down what we were exporting and used tar w/ gzip to archive…
fr332lanc3
  • 101
  • 1
  • 10
-1
votes
1 answer

Is it possible to 'ssh chain' with phpseclib?

Servers aren't visible, they are hidden behind another server. In order to make them visible you have to log into the first server over ssh. Once there the other servers are visible and you can ssh into them from the current server (the one you…
fr332lanc3
  • 101
  • 1
  • 10
1 2 3
52
53